|
|
@ -985,16 +985,20 @@ public class IoAddInoutService {
|
|
|
|
basicCorpEntity = new BasicCorpEntity();
|
|
|
|
basicCorpEntity = new BasicCorpEntity();
|
|
|
|
basicCorpEntity.setName(basicSkSickerEntity.getName() + " " + basicSkSickerEntity.getAdNum());
|
|
|
|
basicCorpEntity.setName(basicSkSickerEntity.getName() + " " + basicSkSickerEntity.getAdNum());
|
|
|
|
basicCorpEntity.setAdSickNum(basicSkSickerEntity.getAdNum());
|
|
|
|
basicCorpEntity.setAdSickNum(basicSkSickerEntity.getAdNum());
|
|
|
|
genBasicCorp(basicCorpEntity);
|
|
|
|
String erpId = genBasicCorp(basicCorpEntity);
|
|
|
|
|
|
|
|
basicCorpEntity.setErpId(erpId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
basicCorpEntity = basicCorpService.selectByName(fromCorp);
|
|
|
|
basicCorpEntity = basicCorpService.selectByName(fromCorp);
|
|
|
|
|
|
|
|
if (basicCorpEntity == null)
|
|
|
|
|
|
|
|
basicCorpEntity = basicCorpService.selectByErpId(fromCorp + " ");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (basicCorpEntity == null) {
|
|
|
|
if (basicCorpEntity == null) {
|
|
|
|
basicCorpEntity = new BasicCorpEntity();
|
|
|
|
basicCorpEntity = new BasicCorpEntity();
|
|
|
|
basicCorpEntity.setName(fromCorp);
|
|
|
|
basicCorpEntity.setName(fromCorp);
|
|
|
|
genBasicCorp(basicCorpEntity);
|
|
|
|
String erpId = genBasicCorp(basicCorpEntity);
|
|
|
|
|
|
|
|
basicCorpEntity.setErpId(erpId);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return basicCorpEntity.getErpId();
|
|
|
|
return basicCorpEntity.getErpId();
|
|
|
|
|
|
|
|
|
|
|
@ -1004,12 +1008,13 @@ public class IoAddInoutService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void genBasicCorp(BasicCorpEntity basicCorpEntity) {
|
|
|
|
public String genBasicCorp(BasicCorpEntity basicCorpEntity) {
|
|
|
|
basicCorpEntity.setErpId(CustomUtil.getUnitId());
|
|
|
|
basicCorpEntity.setErpId(CustomUtil.getUnitId());
|
|
|
|
basicCorpEntity.setCorpType(ConstantStatus.CORP_SICK);
|
|
|
|
basicCorpEntity.setCorpType(ConstantStatus.CORP_SICK);
|
|
|
|
basicCorpEntity.setOutType(ConstantStatus.CORP_SICK_SICK);
|
|
|
|
basicCorpEntity.setOutType(ConstantStatus.CORP_SICK_SICK);
|
|
|
|
basicCorpEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
basicCorpEntity.setId(IdUtil.getSnowflakeNextId());
|
|
|
|
basicCorpService.insert(basicCorpEntity);
|
|
|
|
basicCorpService.insert(basicCorpEntity);
|
|
|
|
|
|
|
|
return basicCorpEntity.getErpId();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) {
|
|
|
|
public BaseResponse checkSubmitEnable(IoOrderEntity orderEntity) {
|
|
|
|