diff --git a/Api/Ewide.Application/Ewide.Application.xml b/Api/Ewide.Application/Ewide.Application.xml
index 22433b6..5b8cd8b 100644
--- a/Api/Ewide.Application/Ewide.Application.xml
+++ b/Api/Ewide.Application/Ewide.Application.xml
@@ -626,6 +626,11 @@
房屋详细信息
+
+
+ 住宅查询
+
+
分页查询用户
diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs
new file mode 100644
index 0000000..7a97453
--- /dev/null
+++ b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryInput.cs
@@ -0,0 +1,14 @@
+using Ewide.Core;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Ewide.Application
+{
+ public class HouseQueryInput: PageInputBase
+ {
+
+ }
+}
diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryOutput.cs b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryOutput.cs
new file mode 100644
index 0000000..a4464e1
--- /dev/null
+++ b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/Dto/HouseQueryOutput.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Ewide.Application
+{
+ public class HouseQueryOutput
+ {
+ }
+}
diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs
new file mode 100644
index 0000000..1c30dce
--- /dev/null
+++ b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/HouseQueryService.cs
@@ -0,0 +1,48 @@
+using Dapper;
+using Ewide.Core.Extension;
+using Furion.DatabaseAccessor;
+using Furion.DependencyInjection;
+using Furion.DynamicApiController;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Ewide.Application.Service.HouseSafety.HouseQuery
+{
+ ///
+ /// 住宅查询
+ ///
+ [ApiDescriptionSettings(Name = "HouseQuery", Order = 210)]
+ public class HouseQueryService : IHouseQueryService, IDynamicApiController, ITransient
+ {
+ private readonly IRepository _houseCodeRep;
+ private readonly IRepository _houseInfoRep;
+ private readonly IRepository _houseTaskRep;
+ private readonly IDapperRepository _dapperRepository;
+
+ public HouseQueryService(IRepository HouseCodeRep, IRepository HouseInfoRep, IRepository HouseTaskRep, IDapperRepository dapperRepository)
+ {
+ _houseCodeRep = HouseCodeRep;
+ _houseInfoRep = HouseInfoRep;
+ _houseTaskRep = HouseTaskRep;
+ _dapperRepository = dapperRepository;
+ }
+
+ [HttpPost("/houseQuery/page")]
+ public async Task QueryPage([FromBody] HouseQueryInput input)
+ {
+ var sql = @"SELECT HC.ID,HC.HouseCode,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,CA.AdCode AreaCode,Proj.AreaCode,Proj.Note,Proj.Name,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,HC.Address,IFNULL(HI.BuildingName,'') BuildingName,IFNULL(HI.TotalFloor,0) TotalFloor,IFNULL(HI.TotalArea,0) TotalArea,HI.LandAttribute,IFNULL(HI.HouseGrade,0) HouseGrade,HC.Type,HC.No,HI.State FROM bs_house_code HC
+LEFT JOIN bs_house_info HI ON HI.HouseCodeId = HC.Id
+LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
+LEFT JOIN sys_area_code CA ON CA.Code = Proj.AreaCode
+LEFT JOIN sys_area_code RA ON RA.AdCode = SUBSTR(CA.AdCode,1,9)
+LEFT JOIN sys_area_code AA ON AA.AdCode = SUBSTR(CA.AdCode,1,6)
+WHERE 1=1";
+
+ return await _dapperRepository.QueryPageDataDynamic(sql, input, filterFields: new string[] { "HouseCode", "Address", "BuildingName", "State", "AreaCode", "LandAttribute", "HouseGrade" });
+ }
+ }
+}
diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseQuery/IHouseQueryService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/IHouseQueryService.cs
new file mode 100644
index 0000000..aa1e217
--- /dev/null
+++ b/Api/Ewide.Application/Service/HouseSafety/HouseQuery/IHouseQueryService.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Ewide.Application.Service.HouseSafety.HouseQuery
+{
+ public interface IHouseQueryService
+ {
+ }
+}
diff --git a/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs b/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs
index b8340ff..560ba40 100644
--- a/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs
+++ b/Api/Ewide.Application/Service/HouseSafety/HouseTask/HouseTaskService.cs
@@ -40,7 +40,7 @@ namespace Ewide.Application.Service
[HttpPost("/houseTask/page")]
public async Task QueryPage([FromBody] QueryHouseTaskInput input)
{
- var sql = @"SELECT T.Id,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,HC.HouseCode,HC.Address,T.EndTime,HC.Type,HC.Industry,HC.No FROM `bs_house_task` T
+ var sql = @"SELECT T.Id,AA.Name AreaName,RA.Name RoadName,CA.Name CommName,Proj.AreaCode,Proj.Note,Proj.Name,CONCAT(Proj.Name,'(',Proj.Note,')') FullProjName,HC.HouseCode,HC.Address,T.EndTime,HC.Type,HC.Industry,HC.No,T.Status,HI.State FROM `bs_house_task` T
LEFT JOIN bs_house_code HC ON T.HouseCodeId = HC.Id
LEFT JOIN bs_house_info HI ON HI.HouseCodeId = T.HouseCodeId
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
diff --git a/web-react/src/pages/business/house/info/form/base/building.jsx b/web-react/src/pages/business/house/info/form/base/building.jsx
index a70abdc..ac90a87 100644
--- a/web-react/src/pages/business/house/info/form/base/building.jsx
+++ b/web-react/src/pages/business/house/info/form/base/building.jsx
@@ -157,35 +157,37 @@ export default class building extends Component {
onValuesChange(changedValues, allValues) {
const form = this.form.current
const { houseInfo } = changedValues
- if (
- houseInfo.hasOwnProperty('landFloorCount') ||
- houseInfo.hasOwnProperty('underFloorCount')
- ) {
- const {
- houseInfo: { landFloorCount, underFloorCount },
- } = allValues
- form.setFieldsValue({
- houseInfo: {
- totalFloor: +landFloorCount + +underFloorCount,
- },
- })
- }
+ if (houseInfo) {
+ if (
+ houseInfo.hasOwnProperty('landFloorCount') ||
+ houseInfo.hasOwnProperty('underFloorCount')
+ ) {
+ const {
+ houseInfo: { landFloorCount, underFloorCount },
+ } = allValues
+ form.setFieldsValue({
+ houseInfo: {
+ totalFloor: +landFloorCount + +underFloorCount,
+ },
+ })
+ }
- if (houseInfo.hasOwnProperty('insulationMaterial')) {
- const value = this.checkedNone(houseInfo.insulationMaterial, 'insulationMaterial')
- this.setState({
- showKeepWarmMaterialText: value.includes('100'),
- })
- }
+ if (houseInfo.hasOwnProperty('insulationMaterial')) {
+ const value = this.checkedNone(houseInfo.insulationMaterial, 'insulationMaterial')
+ this.setState({
+ showKeepWarmMaterialText: value.includes('100'),
+ })
+ }
- if (houseInfo.hasOwnProperty('completedDate')) {
- dispatch({
- type: 'PATROL_INIT_GRADE_BY_COMPLETED_DATE',
- date: {
- id: this.props.id,
- value: +houseInfo.completedDate.format('YYYY'),
- },
- })
+ if (houseInfo.hasOwnProperty('completedDate')) {
+ dispatch({
+ type: 'PATROL_INIT_GRADE_BY_COMPLETED_DATE',
+ date: {
+ id: this.props.id,
+ value: +houseInfo.completedDate.format('YYYY'),
+ },
+ })
+ }
}
}
diff --git a/web-react/src/pages/business/house/info/form/index.jsx b/web-react/src/pages/business/house/info/form/index.jsx
index 637371a..dcd940b 100644
--- a/web-react/src/pages/business/house/info/form/index.jsx
+++ b/web-react/src/pages/business/house/info/form/index.jsx
@@ -62,7 +62,7 @@ export default class index extends Component {
children = []
formData = {}
- checkform = React.createRef()
+ checkForm = React.createRef()
shouldComponentUpdate(props, state) {
return !isEqual(this.state, state)
@@ -89,6 +89,21 @@ export default class index extends Component {
}
}
+ async onCheck(pass_or_back) {
+ const form = this.checkForm.current
+ const valid = await form.validateFields()
+ if (valid) {
+ var checkRecord = {
+ taskCheckRecord: {
+ taskId: this.props.param.taskId,
+ passOrBack: +pass_or_back,
+ content: form.getFieldValue(['taskCheckRecord', 'content']),
+ },
+ }
+ await this.onSubmit('houseInfoSave', checkRecord)
+ }
+ }
+
async onSubmit(action, append) {
for (const child of this.children) {
try {
@@ -163,8 +178,18 @@ export default class index extends Component {
/>
-
-
+
+
)}
diff --git a/web-react/src/pages/business/house/info/form/patrol/grade.jsx b/web-react/src/pages/business/house/info/form/patrol/grade.jsx
index 3dc1074..1cf1c44 100644
--- a/web-react/src/pages/business/house/info/form/patrol/grade.jsx
+++ b/web-react/src/pages/business/house/info/form/patrol/grade.jsx
@@ -124,7 +124,6 @@ export default class handling extends Component {
render() {
const { loading, codes, initGradeValue } = this.state
- console.log(initGradeValue)
return (
}>