Commit e3f293bf authored by 刘林's avatar 刘林

fix(jg):移装变更接口修改

parent 34711e95
......@@ -954,18 +954,25 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
private void updateUseRegistrationManage(JgChangeRegistrationTransfer transfer, JgRegistrationHistory historyData, String useRegistrationCode, boolean isUpdateRegistrationCode) {
JSONObject historyJson = JSON.parseObject(historyData.getChangeData());
List<JgUseRegistrationManage> registrationList = (List<JgUseRegistrationManage>) historyJson.get("registrationList");
for (JgUseRegistrationManage registrationManage : registrationList) {
List<JgUseRegistrationManage> registrationList = useRegistrationManageService.lambdaQuery()
.in(BaseEntity::getSequenceNbr,
((List<?>) historyJson.get("registrationList")).stream()
.map(obj -> ((JSONObject) obj).getString("sequenceNbr"))
.collect(Collectors.toList())
).list();
registrationList.forEach(registrationManage -> {
registrationManage.setReceiveOrgName(transfer.getReceiveOrgName());
registrationManage.setReceiveCompanyCode(transfer.getReceiveOrgCode());
registrationManage.setAuditPassDate(transfer.getAuditPassDate());
registrationManage.setAuditPassDate(new Date());
registrationManage.setEquUseAddress(transfer.getFullAddress());
if (isUpdateRegistrationCode) {
registrationManage.setUseRegistrationCode(useRegistrationCode);
}
}
});
useRegistrationManageService.updateBatchById(registrationList);
historyData.setChangeData(JSONObject.toJSONString(registrationList));
historyJson.put("registrationList", registrationList);
historyData.setChangeData(historyJson.toJSONString());
}
/**
......
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