|
@@ -533,11 +533,14 @@ public class U9InfoTask {
|
|
|
String newDate = dateTimeFormatter.format(chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getPeriod());
|
|
|
LocalDateTime dt = LocalDateTime.parse(newDate,dateTimeFormatter);
|
|
|
chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().setPeriod(dt);
|
|
|
- ChuanyunOutDepartmentDO chuanyunOutDepartmentDO = chuanyunOutDepartmentDao.findByDepartment(chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getDepartment());
|
|
|
- if (chuanyunOutDepartmentDO!=null){
|
|
|
- chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().setDepartment(chuanyunOutDepartmentDO.getDepartmentId());
|
|
|
- }
|
|
|
+ String[] department = chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getDepartment().split("/");
|
|
|
+// if (department!=null&&department.length>0){
|
|
|
+// chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().setDepartment(department[department.length-1]);
|
|
|
+// }
|
|
|
LaborCostDTO laborCostDTO = new LaborCostDTO(chuanyunLaborCostDTO);
|
|
|
+ if (department.length>1 && (department[1].equals("EBG")||department[1].equals("IBG"))){
|
|
|
+ laborCostDTO.setBg(department[1]);
|
|
|
+ }
|
|
|
laborCostDTO.setDataType("U9");
|
|
|
var purcostString=objectMapper.writeValueAsString(laborCostDTO);
|
|
|
ChuanyunSaveDTO chuanyunSaveDTO;
|
|
@@ -545,7 +548,7 @@ public class U9InfoTask {
|
|
|
List<String> matchers = new ArrayList<>();
|
|
|
matchers.add("F0000005_2,"+chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getProjectcode());
|
|
|
matchers.add("F0000002_2,"+chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getPeriod());
|
|
|
- matchers.add("F0000015_2,"+chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getDepartment());
|
|
|
+ matchers.add("F0000018_2,"+chuanyunLaborCostDTO.getChuanyunLaborCostPrimaryKey().getDepartment());
|
|
|
var filter= Filter.instance(0,1,true,"And",matchers);
|
|
|
var chuanyunFindAllResponse=chuanYunManager.findAll(ChuanyunMonthLaborCostDO.SCHEMA_CODE,filter);
|
|
|
if (chuanyunFindAllResponse.getReturnData() == null) {
|
|
@@ -558,7 +561,7 @@ public class U9InfoTask {
|
|
|
chuanyunSaveDTO = chuanYunManager.update(ChuanyunMonthLaborCostDO.SCHEMA_CODE,result.get(0).getObjectId(),purcostString);
|
|
|
}
|
|
|
if(chuanyunSaveDTO.getSuccessful()){
|
|
|
-// log.info("新增项目人力成本成功");
|
|
|
+ log.info("新增项目人力成本成功");
|
|
|
}else{
|
|
|
log.warn("新增项目人力成本失败");
|
|
|
}
|
|
@@ -784,9 +787,12 @@ public class U9InfoTask {
|
|
|
@JsonDeserialize(using = ChuanyunLocalDateTimeDeserializer.class)
|
|
|
private LocalDateTime logDate;
|
|
|
|
|
|
- @JsonProperty("F0000015")
|
|
|
+ @JsonProperty("F0000018")
|
|
|
private String departmentCode;
|
|
|
|
|
|
+ @JsonProperty("F0000017")
|
|
|
+ private String bg;
|
|
|
+
|
|
|
@JsonProperty("F0000004")
|
|
|
private String dataType;
|
|
|
|