Commit e9ff571e authored by chenzhao's avatar chenzhao

故障报修维修记录 附件数据返回 bug2928 添加户籍,现居住地具体详情地址 字段 liquibase同步更新

parent cca8a9b0
...@@ -68,14 +68,25 @@ public class FireExpertsDto extends BaseDto { ...@@ -68,14 +68,25 @@ public class FireExpertsDto extends BaseDto {
private String politicalOutlook; private String politicalOutlook;
// @ExplicitConstraint(indexNum = 9, sourceClass = RoleNameExplicitConstraint.class, method = "getAdministrativeDivisions") //固定下拉内容 // @ExplicitConstraint(indexNum = 9, sourceClass = RoleNameExplicitConstraint.class, method = "getAdministrativeDivisions") //固定下拉内容
@ExcelProperty(value = "现居住地", index = 9)
@ExplicitConstraint(indexNum = 9,sourceClass = CommonExplicitConstraint.class,method ="getCitys")
@ApiModelProperty(value = "现居住地") @ApiModelProperty(value = "现居住地")
@ExcelProperty(value = "现居住地", index = 9)
private String residence; private String residence;
@ExcelProperty(value = "居住地详情", index = 10) @ExcelProperty(value = "籍贯/户口所在地详细地址", index = 17)
@ApiModelProperty(value = "籍贯/户口所在地详细地址")
private String nativePlaceVal;
@ExplicitConstraint(indexNum =10,sourceClass = CommonExplicitConstraint.class,method ="getCitys")
@ExcelProperty(value = "现居住地", index = 10)
@ApiModelProperty(value = "居住地详情") @ApiModelProperty(value = "居住地详情")
private String residenceDetails; private String residenceDetails;
@ExcelProperty(value = "现居住地详细地址", index = 18)
@ApiModelProperty(value = "现居住地详细地址")
private String residenceDetailVal;
@ExcelProperty(value = "办公电话", index = 11) @ExcelProperty(value = "办公电话", index = 11)
@ApiModelProperty(value = "办公电话") @ApiModelProperty(value = "办公电话")
private String officePhone; private String officePhone;
......
...@@ -106,4 +106,10 @@ public class FireExperts extends BaseEntity { ...@@ -106,4 +106,10 @@ public class FireExperts extends BaseEntity {
@ApiModelProperty(value = "出生日期") @ApiModelProperty(value = "出生日期")
private Date birthdayTime; private Date birthdayTime;
@ApiModelProperty(value = "现居住地详细地址")
private String residenceDetailVal;
@ApiModelProperty(value = "户籍所在地详细地址")
private String nativePlaceVal;
} }
...@@ -128,10 +128,16 @@ ...@@ -128,10 +128,16 @@
<if test="alertSourceCode!= null "> <if test="alertSourceCode!= null ">
and alert_source_code = #{alertSourceCode} and alert_source_code = #{alertSourceCode}
</if> </if>
<if test="data != null and lift == 'ascend'"> <if test="data == 'address' and data != null and lift == 'ascend'">
order by CONVERT(address USING 'gbk') ASC limit #{current},#{size}
</if>
<if test="data == 'address' and data != null and lift == 'descend'">
order by CONVERT(address USING 'gbk') DESC limit #{current},#{size}
</if>
<if test="data != null and data != 'address' and lift == 'ascend'">
order by #{data} ASC limit #{current},#{size} order by #{data} ASC limit #{current},#{size}
</if> </if>
<if test="data != null and lift == 'descend'"> <if test="data != null and data != 'address' and lift == 'descend'">
order by #{data} DESC limit #{current},#{size} order by #{data} DESC limit #{current},#{size}
</if> </if>
<if test="data == null "> <if test="data == null ">
......
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain; import com.yeejoin.amos.boot.module.common.api.entity.FailureMaintain;
import com.yeejoin.amos.boot.module.common.biz.service.impl.SourceFileServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -62,7 +63,7 @@ public class FailureMaintainController extends BaseController { ...@@ -62,7 +63,7 @@ public class FailureMaintainController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "维修列表记录查询", notes = "维修列表记录查询") @ApiOperation(httpMethod = "GET",value = "维修列表记录查询", notes = "维修列表记录查询")
@GetMapping(value = "/list/{faultId}") @GetMapping(value = "/list/{faultId}")
public ResponseModel<List<FailureMaintain>> findByFaultIDFotList(@PathVariable long faultId) { public ResponseModel<List<FailureMaintainDto>> findByFaultIDFotList(@PathVariable long faultId) {
return ResponseHelper.buildResponse(failureMaintainServiceImpl.findByfaultId(faultId)); return ResponseHelper.buildResponse(failureMaintainServiceImpl.findByfaultId(faultId));
} }
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -7,9 +8,11 @@ import java.util.List; ...@@ -7,9 +8,11 @@ import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.entity.SourceFile;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -175,10 +178,19 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto, ...@@ -175,10 +178,19 @@ public class FailureMaintainServiceImpl extends BaseService<FailureMaintainDto,
/** /**
* 根据FaultId查询 * 根据FaultId查询
*/ */
public List<FailureMaintain> findByfaultId(Long faultId) { public List<FailureMaintainDto> findByfaultId(Long faultId) {
LambdaQueryWrapper<FailureMaintain> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<FailureMaintain> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(FailureMaintain::getFaultId, faultId).orderByDesc(FailureMaintain::getMaintainTime); lambdaQueryWrapper.eq(FailureMaintain::getFaultId, faultId).orderByDesc(FailureMaintain::getMaintainTime);
return baseMapper.selectList(lambdaQueryWrapper); List<FailureMaintain> failureMaintains = baseMapper.selectList(lambdaQueryWrapper);
List<FailureMaintainDto> failureMaintainDtos = new ArrayList<>();
for (FailureMaintain failureMaintain : failureMaintains) {
FailureMaintainDto failureMaintainDto = new FailureMaintainDto();
BeanUtils.copyProperties(failureMaintain,failureMaintainDto);
List<SourceFile> attachment = sourceFileServiceImpl.findBySourceId(failureMaintain.getSequenceNbr());
failureMaintainDto.setAttachment(attachment);
failureMaintainDtos.add(failureMaintainDto);
}
return failureMaintainDtos;
} }
/** /**
......
...@@ -1546,4 +1546,32 @@ ...@@ -1546,4 +1546,32 @@
update cb_data_dictionary set type_desc = null where sequence_nbr = 1188 ; update cb_data_dictionary set type_desc = null where sequence_nbr = 1188 ;
</sql> </sql>
</changeSet> </changeSet>
<changeSet id="2021-09-272" author="chenzhao">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_data_dictionary"/>
</preConditions>
<comment>删除无用数据</comment>
<sql>
update cb_data_dictionary set parent = null where sequence_nbr = 1237 ;
update cb_data_dictionary set parent = null where sequence_nbr = 1238 ;
update cb_data_dictionary set parent = null where sequence_nbr = 1239 ;
update cb_data_dictionary set parent = null where sequence_nbr = 1240 ;
update cb_data_dictionary set parent = null where sequence_nbr = 1241 ;
</sql>
</changeSet>
<changeSet author="chenzhao" id="2021-09-27-cz-1">
<preConditions onFail="MARK_RAN">
<tableExists tableName="cb_fire_experts"/>
</preConditions>
<comment>BUG 2928 表中新增两个字段用来保存详细地址值 </comment>
<sql>
ALTER TABLE `cb_fire_experts` add native_place_val varchar(255) COMMENT '户籍所在地详细地址';
ALTER TABLE `cb_fire_experts` add residence_detail_val varchar(255) COMMENT '现居住地详细地址';
</sql>
</changeSet>
</databaseChangeLog> </databaseChangeLog>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment