预验收单据生成问题

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

@ -473,7 +473,7 @@ public class IoAddInoutService {
for (IoOrderDetailCodeEntity orderDetailCodeEntity : ioOrderDetailCodeEntities) { for (IoOrderDetailCodeEntity orderDetailCodeEntity : ioOrderDetailCodeEntities) {
if (orderDetailCodeEntity.getBindRlFk().longValue() == udiRelevanceResponse.getId().longValue() if (orderDetailCodeEntity.getBindRlFk().longValue() == udiRelevanceResponse.getId().longValue()
&& StrUtil.trimToEmpty(orderDetailCodeEntity.getBatchNo()).equals(StrUtil.trimToEmpty(codeTempEntity.getBatchNo()) && StrUtil.trimToEmpty(orderDetailCodeEntity.getBatchNo()).equals(StrUtil.trimToEmpty(codeTempEntity.getBatchNo())
) )
) { ) {
orderDetailCodeEntity.setCount(orderDetailCodeEntity.getCount() + codeTempEntity.getMyCount()); orderDetailCodeEntity.setCount(orderDetailCodeEntity.getCount() + codeTempEntity.getMyCount());
orderDetailCodeEntity.setReCount(orderDetailCodeEntity.getReCount() + codeTempEntity.getMyReCount()); orderDetailCodeEntity.setReCount(orderDetailCodeEntity.getReCount() + codeTempEntity.getMyReCount());
@ -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) {

@ -106,11 +106,12 @@ public class IoGenInvService {
invProductService.update(invProductEntity); invProductService.update(invProductEntity);
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);
} }
if (CollUtil.isNotEmpty(batchEntities)){ if (CollUtil.isNotEmpty(batchEntities)) {
invProductBatchService.saveBatch(batchEntities); invProductBatchService.saveBatch(batchEntities);
} }

Loading…
Cancel
Save