update
housequery 建档审核功能
This commit is contained in:
@@ -626,6 +626,11 @@
|
|||||||
房屋详细信息
|
房屋详细信息
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="T:Ewide.Application.Service.HouseSafety.HouseQuery.HouseQueryService">
|
||||||
|
<summary>
|
||||||
|
住宅查询
|
||||||
|
</summary>
|
||||||
|
</member>
|
||||||
<member name="M:Ewide.Application.Service.HouseMemberService.QueryMemberPageList(Ewide.Core.Service.UserInput)">
|
<member name="M:Ewide.Application.Service.HouseMemberService.QueryMemberPageList(Ewide.Core.Service.UserInput)">
|
||||||
<summary>
|
<summary>
|
||||||
分页查询用户
|
分页查询用户
|
||||||
|
|||||||
@@ -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
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 住宅查询
|
||||||
|
/// </summary>
|
||||||
|
[ApiDescriptionSettings(Name = "HouseQuery", Order = 210)]
|
||||||
|
public class HouseQueryService : IHouseQueryService, IDynamicApiController, ITransient
|
||||||
|
{
|
||||||
|
private readonly IRepository<BsHouseCode> _houseCodeRep;
|
||||||
|
private readonly IRepository<BsHouseInfo> _houseInfoRep;
|
||||||
|
private readonly IRepository<BsHouseTask> _houseTaskRep;
|
||||||
|
private readonly IDapperRepository _dapperRepository;
|
||||||
|
|
||||||
|
public HouseQueryService(IRepository<BsHouseCode> HouseCodeRep, IRepository<BsHouseInfo> HouseInfoRep, IRepository<BsHouseTask> HouseTaskRep, IDapperRepository dapperRepository)
|
||||||
|
{
|
||||||
|
_houseCodeRep = HouseCodeRep;
|
||||||
|
_houseInfoRep = HouseInfoRep;
|
||||||
|
_houseTaskRep = HouseTaskRep;
|
||||||
|
_dapperRepository = dapperRepository;
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost("/houseQuery/page")]
|
||||||
|
public async Task<dynamic> 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" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,7 +40,7 @@ namespace Ewide.Application.Service
|
|||||||
[HttpPost("/houseTask/page")]
|
[HttpPost("/houseTask/page")]
|
||||||
public async Task<dynamic> QueryPage([FromBody] QueryHouseTaskInput input)
|
public async Task<dynamic> 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_code HC ON T.HouseCodeId = HC.Id
|
||||||
LEFT JOIN bs_house_info HI ON HI.HouseCodeId = T.HouseCodeId
|
LEFT JOIN bs_house_info HI ON HI.HouseCodeId = T.HouseCodeId
|
||||||
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
|
LEFT JOIN bs_house_projectinfo Proj ON Proj.Id=HC.ProjectId
|
||||||
|
|||||||
@@ -157,35 +157,37 @@ export default class building extends Component {
|
|||||||
onValuesChange(changedValues, allValues) {
|
onValuesChange(changedValues, allValues) {
|
||||||
const form = this.form.current
|
const form = this.form.current
|
||||||
const { houseInfo } = changedValues
|
const { houseInfo } = changedValues
|
||||||
if (
|
if (houseInfo) {
|
||||||
houseInfo.hasOwnProperty('landFloorCount') ||
|
if (
|
||||||
houseInfo.hasOwnProperty('underFloorCount')
|
houseInfo.hasOwnProperty('landFloorCount') ||
|
||||||
) {
|
houseInfo.hasOwnProperty('underFloorCount')
|
||||||
const {
|
) {
|
||||||
houseInfo: { landFloorCount, underFloorCount },
|
const {
|
||||||
} = allValues
|
houseInfo: { landFloorCount, underFloorCount },
|
||||||
form.setFieldsValue({
|
} = allValues
|
||||||
houseInfo: {
|
form.setFieldsValue({
|
||||||
totalFloor: +landFloorCount + +underFloorCount,
|
houseInfo: {
|
||||||
},
|
totalFloor: +landFloorCount + +underFloorCount,
|
||||||
})
|
},
|
||||||
}
|
})
|
||||||
|
}
|
||||||
|
|
||||||
if (houseInfo.hasOwnProperty('insulationMaterial')) {
|
if (houseInfo.hasOwnProperty('insulationMaterial')) {
|
||||||
const value = this.checkedNone(houseInfo.insulationMaterial, 'insulationMaterial')
|
const value = this.checkedNone(houseInfo.insulationMaterial, 'insulationMaterial')
|
||||||
this.setState({
|
this.setState({
|
||||||
showKeepWarmMaterialText: value.includes('100'),
|
showKeepWarmMaterialText: value.includes('100'),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (houseInfo.hasOwnProperty('completedDate')) {
|
if (houseInfo.hasOwnProperty('completedDate')) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'PATROL_INIT_GRADE_BY_COMPLETED_DATE',
|
type: 'PATROL_INIT_GRADE_BY_COMPLETED_DATE',
|
||||||
date: {
|
date: {
|
||||||
id: this.props.id,
|
id: this.props.id,
|
||||||
value: +houseInfo.completedDate.format('YYYY'),
|
value: +houseInfo.completedDate.format('YYYY'),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default class index extends Component {
|
|||||||
children = []
|
children = []
|
||||||
|
|
||||||
formData = {}
|
formData = {}
|
||||||
checkform = React.createRef()
|
checkForm = React.createRef()
|
||||||
|
|
||||||
shouldComponentUpdate(props, state) {
|
shouldComponentUpdate(props, state) {
|
||||||
return !isEqual(this.state, 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) {
|
async onSubmit(action, append) {
|
||||||
for (const child of this.children) {
|
for (const child of this.children) {
|
||||||
try {
|
try {
|
||||||
@@ -163,8 +178,18 @@ export default class index extends Component {
|
|||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Button type="primary">通过</Button>
|
<Button
|
||||||
<Button type="primary">退回</Button>
|
type="primary"
|
||||||
|
onClick={() => this.onCheck(6)}
|
||||||
|
>
|
||||||
|
通过
|
||||||
|
</Button>
|
||||||
|
<Button
|
||||||
|
type="primary"
|
||||||
|
onClick={() => this.onCheck(-1)}
|
||||||
|
>
|
||||||
|
退回
|
||||||
|
</Button>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Form>
|
</Form>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -124,7 +124,6 @@ export default class handling extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, codes, initGradeValue } = this.state
|
const { loading, codes, initGradeValue } = this.state
|
||||||
console.log(initGradeValue)
|
|
||||||
return (
|
return (
|
||||||
<Spin spinning={loading} indicator={<AntIcon type="loading" />}>
|
<Spin spinning={loading} indicator={<AntIcon type="loading" />}>
|
||||||
<Form {...layout} ref={this.form}>
|
<Form {...layout} ref={this.form}>
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ export default class index extends Component {
|
|||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
className="block w-100-p mt-xxs"
|
className="block w-100-p mt-xxs"
|
||||||
onClick={() => this.onOpen(this.selectorModal, record)}
|
onClick={() => this.onOpen(this.selectorModal, id)}
|
||||||
>
|
>
|
||||||
选房
|
选房
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -63,7 +63,9 @@ export default class index extends Component {
|
|||||||
dataIndex: 'type',
|
dataIndex: 'type',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
render: text => this.bindCodeValue(text, 'house_type'),
|
render: (text, record) =>
|
||||||
|
this.bindCodeValue(text, 'house_type') +
|
||||||
|
(text === 2 ? `(${this.bindCodeValue(record.industry, 'house_industry')})` : ''),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地址',
|
title: '地址',
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import auth from 'components/authorized/handler'
|
|||||||
import { isEqual } from 'lodash'
|
import { isEqual } from 'lodash'
|
||||||
import getDictData from 'util/dic'
|
import getDictData from 'util/dic'
|
||||||
import { toCamelCase } from 'util/format'
|
import { toCamelCase } from 'util/format'
|
||||||
|
import { getSearchInfo } from 'util/query'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 注释段[\/**\/]为必须要改
|
* 注释段[\/**\/]为必须要改
|
||||||
@@ -27,6 +28,15 @@ const authName = 'houseTask'
|
|||||||
export default class index extends Component {
|
export default class index extends Component {
|
||||||
state = {
|
state = {
|
||||||
codes: {
|
codes: {
|
||||||
|
status: [
|
||||||
|
{ code: -1, value: '审核退回' },
|
||||||
|
{ code: 0, value: '待处理' },
|
||||||
|
{ code: null, value: '待处理' },
|
||||||
|
{ code: 1, value: '暂存' },
|
||||||
|
{ code: 2, value: '待提交' },
|
||||||
|
{ code: 3, value: '审核中' },
|
||||||
|
{ code: 6, value: '审核通过' },
|
||||||
|
],
|
||||||
houseType: [],
|
houseType: [],
|
||||||
houseIndustry: [],
|
houseIndustry: [],
|
||||||
},
|
},
|
||||||
@@ -63,7 +73,9 @@ export default class index extends Component {
|
|||||||
dataIndex: 'type',
|
dataIndex: 'type',
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
render: text => this.bindCodeValue(text, 'house_type'),
|
render: (text, record) =>
|
||||||
|
this.bindCodeValue(text, 'house_type') +
|
||||||
|
(text === 2 ? `(${this.bindCodeValue(record.industry, 'house_industry')})` : ''),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地址',
|
title: '地址',
|
||||||
@@ -76,6 +88,13 @@ export default class index extends Component {
|
|||||||
sorter: true,
|
sorter: true,
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '建档状态',
|
||||||
|
dataIndex: 'state',
|
||||||
|
sorter: true,
|
||||||
|
width: 100,
|
||||||
|
render: text => this.bindCodeValue(text, 'status'),
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -95,7 +114,13 @@ export default class index extends Component {
|
|||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<QueryTableActions>
|
<QueryTableActions>
|
||||||
<Auth auth={{ houseInfo: 'getByTaskId' }}>
|
<Auth auth={{ houseInfo: 'getByTaskId' }}>
|
||||||
<a onClick={() => this.onOpen(record.id)}>登记</a>
|
<a onClick={() => this.onOpen(record.id)}>
|
||||||
|
{record.state === -1 || record.state === 1 || record.state === 2
|
||||||
|
? `修改`
|
||||||
|
: record.state === 3 || record.state === 6
|
||||||
|
? `查看`
|
||||||
|
: `登记`}
|
||||||
|
</a>
|
||||||
</Auth>
|
</Auth>
|
||||||
</QueryTableActions>
|
</QueryTableActions>
|
||||||
),
|
),
|
||||||
@@ -123,7 +148,7 @@ export default class index extends Component {
|
|||||||
const { onLoading, onLoadData } = this.table.current
|
const { onLoading, onLoadData } = this.table.current
|
||||||
onLoading()
|
onLoading()
|
||||||
getDictData('house_type', 'house_industry').then(codes => {
|
getDictData('house_type', 'house_industry').then(codes => {
|
||||||
this.setState({ codes }, () => {
|
this.setState({ codes: { ...this.state.codes, ...codes } }, () => {
|
||||||
onLoadData()
|
onLoadData()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -137,9 +162,19 @@ export default class index extends Component {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
loadData = async (params, query) => {
|
loadData = async (params, query) => {
|
||||||
|
const searchInfo = getSearchInfo({
|
||||||
|
query,
|
||||||
|
queryType: {
|
||||||
|
type: '=',
|
||||||
|
industry: '=',
|
||||||
|
address: 'like',
|
||||||
|
houseCode: 'like',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
const { data } = await apiAction.page({
|
const { data } = await apiAction.page({
|
||||||
...params,
|
...params,
|
||||||
...query,
|
searchInfo,
|
||||||
})
|
})
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user