预验收单据生成问题

dev_2.5_optimize
yewj 4 months ago
parent 07808dcaa1
commit 90074a0cf0

@ -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) {

@ -107,6 +107,7 @@ public class IoGenInvService {
InvProductBatchEntity batchEntity = new InvProductBatchEntity(); InvProductBatchEntity batchEntity = new InvProductBatchEntity();
BeanUtils.copyProperties(invProductEntity, batchEntity); BeanUtils.copyProperties(invProductEntity, batchEntity);
batchEntity.setId(null);
batchEntities.add(batchEntity); batchEntities.add(batchEntity);
} }

Loading…
Cancel
Save