业务单直接生成扫码单

test
anthonywj 1 year ago
parent 1c202156b4
commit 21a94967d8

@ -252,11 +252,7 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.error(500, orderDetailBizEntity.getCoName() + "三期不能全为空!");
}
}
}
ioAddInoutService.dealBusProcess(orderEntity, bussinessTypeEntity);
return ResultVOUtils.success("提交成功!");
}

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase;
import com.glxp.api.service.purchase.impl.PurApplyDetailService;
import com.glxp.api.service.purchase.impl.PurApplyService;
import com.glxp.api.service.purchase.impl.PurOrderDetailService;
import com.glxp.api.service.purchase.impl.PurPlanDetailService;
import org.springframework.beans.BeanUtils;

@ -1,6 +1,7 @@
package com.glxp.api.controller.purchase;
import com.glxp.api.service.purchase.impl.PurApplyDetailService;
import com.glxp.api.service.purchase.impl.PurApplyService;
import com.glxp.api.service.purchase.impl.PurOrderDetailService;
import com.glxp.api.service.purchase.impl.PurPlanDetailService;
import org.springframework.beans.BeanUtils;

@ -111,6 +111,7 @@ public class BasicBussinessTypeEntity {
* 1./
* 2./
* 3.
* 4.
*/
@TableField(value = "checkWebNew")
@ -445,4 +446,5 @@ public class BasicBussinessTypeEntity {
*/
@TableField(value = "editType")
private Integer editType;
}

@ -306,10 +306,66 @@ public class IoAddInoutService {
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity);
//业务单直接生成扫码单
if (bussinessTypeEntity.getCheckWebNew() == 4) {
boolean exit = codeTempService.isExit(orderEntity.getBillNo());
if (!exit)
stockGenScan(orderEntity);
}
return;
}
/**
*
*/
public void stockGenScan(IoOrderEntity orderEntity) {
List<IoOrderDetailBizEntity> bizEntities = orderDetailBizService.findByOrderId(orderEntity.getBillNo());
List<IoCodeTempEntity> codeTempEntities = new ArrayList<>();
for (IoOrderDetailBizEntity bizEntity : bizEntities) {
IoCodeTempEntity codeTempEntity = new IoCodeTempEntity();
String udiCode = "#" + bizEntity.getNameCode() + "#" + bizEntity.getProductDate() + "#" + bizEntity.getExpireDate() +
"#" + bizEntity.getBatchNo() + "#" + "#" + "#";
codeTempEntity.setCode(udiCode);
codeTempEntity.setMainAction(orderEntity.getMainAction());
codeTempEntity.setAction(orderEntity.getAction());
codeTempEntity.setOrderId(orderEntity.getBillNo());
codeTempEntity.setCorpOrderId(orderEntity.getCorpOrderId());
codeTempEntity.setBatchNo(bizEntity.getBatchNo());
codeTempEntity.setProduceDate(bizEntity.getProductDate());
codeTempEntity.setExpireDate(bizEntity.getExpireDate());
codeTempEntity.setSupId(bizEntity.getSupId());
codeTempEntity.setRelId(bizEntity.getBindRlFk());
codeTempEntity.setCount(bizEntity.getCount());
codeTempEntity.setReCount(bizEntity.getCount());
codeTempEntity.setDeptCode(orderEntity.getDeptCode());
codeTempEntity.setInvCode(orderEntity.getDeptCode());
codeTempEntity.setUpdateTime(new Date());
codeTempEntity.setCreateTime(new Date());
codeTempEntity.setPrice(bizEntity.getPrice());
if (orderEntity.getBillNo() != null && orderEntity.getBillNo().length() >= 12) {
codeTempEntity.setInBatchNo(orderEntity.getBillNo().substring(orderEntity.getBillNo().length() - 12));
}
codeTempEntities.add(codeTempEntity);
}
codeTempService.insertBatch(codeTempEntities);
bizEntities.forEach(orderDetailBizEntity -> {
IoOrderDetailCodeEntity orderDetailCodeEntity = new IoOrderDetailCodeEntity();
BeanUtils.copyProperties(orderDetailBizEntity, orderDetailCodeEntity);
orderDetailCodeEntity.setId(null);
orderDetailCodeEntity.setReCount(orderDetailBizEntity.getCount());
orderDetailCodeEntity.setCount(orderDetailBizEntity.getCount());
orderDetailCodeService.insert(orderDetailCodeEntity);
});
ioCheckInoutService.check(orderEntity.getBillNo());
}
//生成扫码单据详情
public List<IoOrderDetailCodeEntity> genOrderDetailCode(IoOrderEntity orderEntity, IoCodeTempEntity codeTempEntity) {

@ -147,7 +147,7 @@ public class IoCheckInoutService {
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
if (bussinessTypeEntity.getCheckWebNew() == 0) {
if (bussinessTypeEntity.getCheckWebNew() == 0 || bussinessTypeEntity.getCheckWebNew() == 4) {
unCheckFirstFinish(orderEntity);
return;
}

Loading…
Cancel
Save