Commit 0863bd3d authored by KeYong's avatar KeYong

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents 3126b3d2 c32cafb0
...@@ -24,5 +24,5 @@ public interface JgChangeRegistrationNameMapper extends BaseMapper<JgChangeRegis ...@@ -24,5 +24,5 @@ public interface JgChangeRegistrationNameMapper extends BaseMapper<JgChangeRegis
void deleteHistoryInfoById(@Param("code") String code); void deleteHistoryInfoById(@Param("code") String code);
Page<Map<String, Object>> getListPage(Page<Map<String, Object>> page, JgChangeRegistrationNameDto dto, List<String> roleIds, String orgCode); Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationNameDto dto, @Param("roleIds") List<String> roleIds, @Param("orgCode") String orgCode);
} }
...@@ -31,5 +31,5 @@ public interface IJgChangeRegistrationTransferService extends IService<JgChangeR ...@@ -31,5 +31,5 @@ public interface IJgChangeRegistrationTransferService extends IService<JgChangeR
void revocation(String instanceId); void revocation(String instanceId);
void exportUseRegistrationCertificate(String sequenceNbr); String exportUseRegistrationCertificate(String sequenceNbr);
} }
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
AND ur.receive_org_code = #{orgCode} AND ur.receive_org_code = #{orgCode}
</if> </if>
<if test="dto.type == 'enterprise' "> <if test="dto.type == 'enterprise' ">
and ur.use_unit_code = #{orgCode} and ur.use_unit_credit_code = #{orgCode}
</if> </if>
</where> </where>
order by ur.rec_date desc order by ur.rec_date desc
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
<if test="dto.applyNo != null and dto.applyNo != '' "> <if test="dto.applyNo != null and dto.applyNo != '' ">
and jed.apply_no like concat('%',#{dto.applyNo},'%') and jed.apply_no like concat('%',#{dto.applyNo},'%')
</if> </if>
<if test="dto.applyNo != null and dto.applyNo != '' ">
and jed.apply_no = #{dto.receiveOrgCode}
</if>
<if test="dto.auditStatus != null and dto.auditStatus != '' "> <if test="dto.auditStatus != null and dto.auditStatus != '' ">
and jed.audit_status = #{dto.auditStatus} and jed.audit_status = #{dto.auditStatus}
</if> </if>
...@@ -45,6 +42,13 @@ ...@@ -45,6 +42,13 @@
<if test="dto.type == 'supervision'"> <if test="dto.type == 'supervision'">
and jed.receive_org_code = #{dto.useUnitCreditCode} and jed.receive_org_code = #{dto.useUnitCreditCode}
</if> </if>
<if test="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
and jed.receive_org_code = #{dto.receiveOrgCode}
</if>
<if test="dto.applyType != null and dto.applyType != ''">
and jed.apply_type = #{dto.applyType}
</if>
<if test="dto.roleIds != null and dto.type == 'supervision'"> <if test="dto.roleIds != null and dto.type == 'supervision'">
<foreach collection='dto.roleIds' item='role' open='and (' close=')' separator='or'> <foreach collection='dto.roleIds' item='role' open='and (' close=')' separator='or'>
execute_sequence like concat('%',#{role},'%') execute_sequence like concat('%',#{role},'%')
......
...@@ -107,7 +107,7 @@ public class JgChangeRegistrationNameController extends BaseController { ...@@ -107,7 +107,7 @@ public class JgChangeRegistrationNameController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "列表全部数据查询", notes = "列表全部数据查询") @ApiOperation(httpMethod = "POST", value = "列表全部数据查询", notes = "列表全部数据查询")
@PostMapping(value = "/getList") @PostMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(@RequestBody JgChangeRegistrationNameDto dto, public ResponseModel<Page<Map<String, Object>>> getList(JgChangeRegistrationNameDto dto,
@RequestParam(value = "current") int current, @RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) { @RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size); Page<Map<String, Object>> page = new Page<>(current, size);
......
...@@ -114,7 +114,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg ...@@ -114,7 +114,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
List<Map<String, Object>> deviceList = jgChangeRegistrationNameMapper.getEquipInfoByOrgCode(reginParams.getCompany().getCompanyCode()); List<Map<String, Object>> deviceList = jgChangeRegistrationNameMapper.getEquipInfoByOrgCode(reginParams.getCompany().getCompanyCode());
// 获取告知单号 // 获取告知单号
ResponseModel<List<String>> listResponseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.SBZX.getCode(), 1); ResponseModel<List<String>> listResponseModel = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.GMBG.getCode(), 1);
if (!ObjectUtils.isEmpty(listResponseModel) && listResponseModel.getStatus() != HttpStatus.OK.value()) { if (!ObjectUtils.isEmpty(listResponseModel) && listResponseModel.getStatus() != HttpStatus.OK.value()) {
log.error(" 获取告知单号失败"); log.error(" 获取告知单号失败");
throw new RuntimeException(); throw new RuntimeException();
......
...@@ -62,6 +62,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -62,6 +62,7 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.IOException; import java.io.IOException;
import java.time.LocalDate;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Date; import java.util.Date;
...@@ -242,10 +243,9 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -242,10 +243,9 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
oldTransfer.setSupervisoryCode(supervisoryCode); oldTransfer.setSupervisoryCode(supervisoryCode);
} }
} }
//使用登记编号 //使用登记编号
if (!ValidationUtil.isEmpty(dto2.get("USE_REGISTRATION_CODE"))) { if (!ValidationUtil.isEmpty(dto2.get("USE_ORG_CODE"))) {
oldTransfer.setUseRegistrationCode((String) dto2.get("USE_REGISTRATION_CODE")); oldTransfer.setUseRegistrationCode((String) dto2.get("USE_ORG_CODE"));
} else { } else {
//使用登记编号 //使用登记编号
oldTransfer.setUseRegistrationCode(idxBizJgRegisterInfoMapper.getUseOrgCodeByEquip(equId)); oldTransfer.setUseRegistrationCode(idxBizJgRegisterInfoMapper.getUseOrgCodeByEquip(equId));
...@@ -534,6 +534,53 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -534,6 +534,53 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*/ */
public Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params) { public Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params) {
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, params, params.getRoleIds()); Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, params, params.getRoleIds());
listPage.getRecords().stream().forEach(item->{
// 流程未走完时,移装地址需从 历史表中获取
if (item.containsKey("status") && !FlowStatusEnum.TO_BE_FINISHED.getName().equals(item.get("status").toString())) {
String fullAddress = "";
if(item.containsKey("equipId") && item.containsKey("applyNo")){
JgRegistrationHistory history = jgRegistrationHistoryService.getDteailByRecord(item.get("equipId").toString(), item.get("applyNo").toString());
if(!ValidationUtil.isEmpty(history)){
JSONObject newPosition = JSON.parseObject(history.getChangeData());
String province = newPosition.getString("province");
String city = newPosition.getString("city");
String county = newPosition.getString("county");
String street = newPosition.getString("street");
String address = newPosition.getString("address");
// 分割省市区街道字段
if (!ObjectUtils.isEmpty(province)) {
String[] provinceList = province.split("_");
if (provinceList.length > 1) {
fullAddress += provinceList[1];
}
}
if (!ObjectUtils.isEmpty(city)) {
String[] cityList = city.split("_");
if (cityList.length > 1) {
fullAddress += cityList[1];
}
}
if (!ObjectUtils.isEmpty(county)) {
String[] countyList = county.split("_");
if (countyList.length > 1) {
fullAddress += countyList[1];
}
}
if (!ObjectUtils.isEmpty(street)) {
String[] streetList = street.split("_");
if (streetList.length > 1) {
fullAddress += streetList[1];
}
}
if (!ObjectUtils.isEmpty(address)) {
fullAddress += address;
}
}
}
item.put("allAddress", fullAddress);
}
});
return listPage; return listPage;
} }
...@@ -781,7 +828,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -781,7 +828,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* *
* @param sequenceNbr * @param sequenceNbr
*/ */
public void exportUseRegistrationCertificate(String sequenceNbr) { public String exportUseRegistrationCertificate(String sequenceNbr) {
Map<String, Object> exportParamsMap = new HashMap<>(); Map<String, Object> exportParamsMap = new HashMap<>();
//查询移装变更详情 //查询移装变更详情
JgChangeRegistrationTransfer transfer = this.getById(sequenceNbr); JgChangeRegistrationTransfer transfer = this.getById(sequenceNbr);
...@@ -801,7 +848,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -801,7 +848,10 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
//监管码 //监管码
exportParamsMap.put("supervisoryCode", transfer.getSupervisoryCode()); exportParamsMap.put("supervisoryCode", transfer.getSupervisoryCode());
//发证日期(当前时间) //发证日期(当前时间)
exportParamsMap.put("issueData", new Date()); LocalDate today = LocalDate.now();
exportParamsMap.put("giveOutYear", today.getYear());
exportParamsMap.put("giveOutMonth", today.getMonthValue());
exportParamsMap.put("giveOutDay", today.getDayOfMonth());
//设备使用地址 //设备使用地址
if(!ValidationUtil.isEmpty(transferHistory)){ if(!ValidationUtil.isEmpty(transferHistory)){
String fullAddress=""; String fullAddress="";
...@@ -876,7 +926,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -876,7 +926,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
if(!ValidationUtil.isEmpty(factoryInfo)){ if(!ValidationUtil.isEmpty(factoryInfo)){
exportParamsMap.put("factoryNum", factoryInfo.getFactoryNum()); exportParamsMap.put("factoryNum", factoryInfo.getFactoryNum());
} }
//调用生成使用登记证
return commonService.generateCertificateReport(exportParamsMap);
} }
} }
\ No newline at end of file
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