|
|
|
@ -190,23 +190,25 @@ public class IoChangeInoutService {
|
|
|
|
|
String orderNo = gennerOrderUtils.createScOrderNo(new OrderNoTypeBean(Constant.SCAN_ORDER + StrUtil.trimToEmpty(targetBustypeEntity.getPrefix()), "yyyyMMdd"));
|
|
|
|
|
outOrder.setBillNo(orderNo);
|
|
|
|
|
|
|
|
|
|
if (targetBustypeEntity.getCorpType() == ConstantStatus.CORP_TYPE_OUT) {
|
|
|
|
|
if (bussinessChangeTypeEntity.getCreateType() == 1) {//送货至入库补单
|
|
|
|
|
outOrder.setCustomerId(corpName);
|
|
|
|
|
outOrder.setFromCorp(corpName);
|
|
|
|
|
outOrder.setFromInvCode(null);
|
|
|
|
|
outOrder.setFromDeptCode(null);
|
|
|
|
|
} else if (targetBustypeEntity.getActionType() == 2) {
|
|
|
|
|
outOrder.setCustomerId(null);
|
|
|
|
|
outOrder.setFromCorp(null);
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode("1000001");
|
|
|
|
|
outOrder.setFromInvCode(invWarehouseEntity.getCode());
|
|
|
|
|
outOrder.setFromDeptCode(invWarehouseEntity.getParentId());
|
|
|
|
|
} else if (targetBustypeEntity.getActionType() == 3) {
|
|
|
|
|
outOrder.setCustomerId(null);
|
|
|
|
|
outOrder.setFromCorp(null);
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode("1000002");
|
|
|
|
|
outOrder.setFromInvCode(invWarehouseEntity.getCode());
|
|
|
|
|
outOrder.setFromDeptCode(invWarehouseEntity.getParentId());
|
|
|
|
|
} else if (bussinessChangeTypeEntity.getCreateType() == 3) { //寄售、预验收补单
|
|
|
|
|
if (targetBustypeEntity.getActionType() == 2) {
|
|
|
|
|
outOrder.setCustomerId(null);
|
|
|
|
|
outOrder.setFromCorp(null);
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode("1000001");
|
|
|
|
|
outOrder.setFromInvCode(invWarehouseEntity.getCode());
|
|
|
|
|
outOrder.setFromDeptCode(invWarehouseEntity.getParentId());
|
|
|
|
|
} else if (targetBustypeEntity.getActionType() == 3) {
|
|
|
|
|
outOrder.setCustomerId(null);
|
|
|
|
|
outOrder.setFromCorp(null);
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode("1000002");
|
|
|
|
|
outOrder.setFromInvCode(invWarehouseEntity.getCode());
|
|
|
|
|
outOrder.setFromDeptCode(invWarehouseEntity.getParentId());
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
outOrder.setCustomerId(Constant.SYSTEM_CUSTOMER_ID);
|
|
|
|
|
InvWarehouseEntity curInv = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode());
|
|
|
|
@ -227,9 +229,7 @@ public class IoChangeInoutService {
|
|
|
|
|
InvWarehouseEntity invWarehouseEntity = invWarehouseService.findByInvSubByCode(orderEntity.getInvCode());
|
|
|
|
|
outOrder.setInvCode(invWarehouseEntity.getCode());
|
|
|
|
|
outOrder.setDeptCode(invWarehouseEntity.getParentId());
|
|
|
|
|
SystemParamConfigEntity systemParamConfigEntity = systemParamConfigService.selectByParamKey("additional_auto_submit");
|
|
|
|
|
outOrder.setStatus(ConstantStatus.ORDER_STATUS_PROCESS);
|
|
|
|
|
|
|
|
|
|
//互填单号
|
|
|
|
|
orderEntity.setUllageSupNo(outOrder.getBillNo());
|
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
|