新增三期拣货,无三期拣货,为配货等页面

master
anthonywj 2 years ago
parent fbd8520229
commit 292462151f

@ -197,6 +197,12 @@ public class Constant {
*/
public static final String ORDER_STATUS_UN_CHECK = "unCheck";
/**
* -/
*/
public static final String ORDER_STATUS_UN_ALLOCATE = "unAllocate";
/**
* -
*/

@ -59,6 +59,11 @@ public class ConstantStatus {
*/
public static final Integer ORDER_STATUS_PROCESSING = 9;
/**
*
*/
public static final Integer ORDER_STATUS_ALLOCATE = 11;
public static final Integer ORDER_DELIVERY_STATUS_UN = 1;
public static final Integer ORDER_DELIVERY_STATUS_ED = 2;
@ -285,5 +290,11 @@ public class ConstantStatus {
public static final int INVIN_BACK = 2;
public static final int INVIN_USE = 3;
public static final int SCAN_NO_BUS = 0; //无业业务单扫码拣货
public static final int SCAN_BUS_PI = 1; //有业务单有三期拣货
public static final int SCAN_NO_PI = 2; //有业务单无三期拣货
public static final int SCAN_ALL_PI = 3; //有业务单拣货(有无三期)
}

@ -630,12 +630,18 @@ public class IoCodeTempController extends BaseController {
}
if (StringUtils.isBlank(exitLocalEntity.getSerialNo())) {
if (bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.isCheckWebNew() && addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL) {
if (bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.getCheckWebNew() == 1 && addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL) {
String errMsg = ioCheckInoutService.checkCode(genDetaiEntity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.updateById(exitLocalEntity);
} else if (bussinessTypeEntity.isCheckEnable() && (bussinessTypeEntity.getCheckWebNew() == 2 || (bussinessTypeEntity.getCheckWebNew() == 3 && addOrderRequest.getFromVailPi() == 1)) && addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL) {
String errMsg = ioCheckInoutService.checkNoPiCode(genDetaiEntity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.updateById(exitLocalEntity);
} else {
codeTempService.updateById(exitLocalEntity);
}
@ -735,8 +741,7 @@ public class IoCodeTempController extends BaseController {
}
if (addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.isCheckWebNew()) {
if (addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.getCheckWebNew() != 0) {
boolean isBillExit = orderDetailBizService.isExit(orderEntity.getBillNo());
if (!isBillExit) {
orderService.deleteByBillNo(orderEntity.getBillNo());
@ -777,12 +782,18 @@ public class IoCodeTempController extends BaseController {
}
//是否边扫边校验
if (addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.isCheckWebNew()) {
if (addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.getCheckWebNew() == 1) {
String errMsg = ioCheckInoutService.checkCode(codeEnttity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.insert(codeEnttity);
} else if (bussinessTypeEntity.isCheckEnable() && (bussinessTypeEntity.getCheckWebNew() == 2 || (bussinessTypeEntity.getCheckWebNew() == 3 && addOrderRequest.getFromVailPi() == 1)) && addOrderRequest.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL) {
String errMsg = ioCheckInoutService.checkNoPiCode(codeEnttity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);
} else
codeTempService.insert(codeEnttity);
} else {
codeTempService.insert(codeEnttity);
}
@ -1002,8 +1013,8 @@ public class IoCodeTempController extends BaseController {
}
IoOrderEntity orderEntity = orderService.findByBillNo(codeTempEntity.getOrderId());
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
if (orderEntity.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.isCheckWebNew()) {
//todo 可能会出问题
if (orderEntity.getOrderType() == ConstantStatus.ORDER_TYPE_NORMAL && bussinessTypeEntity.isCheckEnable() && bussinessTypeEntity.getCheckWebNew() == 1) {
String errMsg = ioCheckInoutService.checkCode(codeTempEntity);
if (errMsg != null) {
return ResultVOUtils.error(500, errMsg);

@ -142,13 +142,16 @@ public class IoOrderController extends BaseController {
if (orderDetailBizEntity.getCount() == 0) {
return ResultVOUtils.error(500, orderDetailBizEntity.getCoName() + "产品数量不能为0");
}
if (StrUtil.isEmpty(orderDetailBizEntity.getBatchNo()) && StrUtil.isEmpty(orderDetailBizEntity.getProductDate()) && StrUtil.isEmpty(orderDetailBizEntity.getExpireDate())) {
if (addOrderRequest.getFromVailPi() != 2 &&
StrUtil.isEmpty(orderDetailBizEntity.getBatchNo())
&& StrUtil.isEmpty(orderDetailBizEntity.getProductDate())
&& StrUtil.isEmpty(orderDetailBizEntity.getExpireDate())) {
return ResultVOUtils.error(500, orderDetailBizEntity.getCoName() + "三期不能全为空!");
}
}
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
ioAddInoutService.dealBusProcess(orderEntity);
ioAddInoutService.dealBusProcess(orderEntity, addOrderRequest.getFromVailPi());
return ResultVOUtils.success("提交成功!");
}
@ -250,6 +253,52 @@ public class IoOrderController extends BaseController {
return ResultVOUtils.success("提交成功!");
}
//带配货-立即提交
@AuthRuleAnnotation("")
@PostMapping("warehouse/inout/waitAllocate/submitOrderWeb")
@Log(title = "单据管理", businessType = BusinessType.UPDATE)
public BaseResponse submitWaitAllocateWeb(@RequestBody AddOrderRequest addOrderRequest) {
//校验单据是否已完成
IoOrderEntity orderEntity = orderService.findByBillNo(addOrderRequest.getBillNo());
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(addOrderRequest.getBillNo());
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = orderDetailCodeService.findByOrderId(addOrderRequest.getBillNo());
if (CollUtil.isEmpty(orderDetailCodeEntities)) {
return ResultVOUtils.error(500, "单据还未扫码或和扫码校验存在异常无法提交!");
}
String errMsg = checkInoutService.bizNoPiCheck(orderDetailBizEntities, orderEntity);
if (StrUtil.isNotEmpty(errMsg)) {
return ResultVOUtils.error(500, errMsg);
}
orderDetailBizService.deleteByOrderId(addOrderRequest.getBillNo());
for (IoOrderDetailCodeEntity orderDetailCodeEntity : orderDetailCodeEntities) {
IoOrderDetailBizEntity orderDetailBizEntity = new IoOrderDetailBizEntity();
BeanUtils.copyProperties(orderDetailCodeEntity, orderDetailBizEntity);
orderDetailBizEntity.setId(null);
getSomeBiz(orderDetailBizEntities, orderDetailBizEntity);
orderDetailBizService.insert(orderDetailBizEntity);
}
saveOrderWeb(addOrderRequest);
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
orderService.update(orderEntity);
ioAddInoutService.dealProcess(orderEntity);
checkInoutService.check(addOrderRequest.getBillNo());
return ResultVOUtils.success("提交成功!");
}
public void getSomeBiz(List<IoOrderDetailBizEntity> orderDetailBizEntities, IoOrderDetailBizEntity resutBizEntity) {
for (IoOrderDetailBizEntity orderDetailBizEntity : orderDetailBizEntities) {
if (orderDetailBizEntity.getBindRlFk().longValue() == resutBizEntity.getBindRlFk().longValue()) {
resutBizEntity.setCertCode(orderDetailBizEntity.getCertCode());
resutBizEntity.setPrice(orderDetailBizEntity.getPrice());
}
}
}
@Resource
IoCodeService codeService;

@ -131,5 +131,13 @@ public class IoOrderDetailResultController extends BaseController {
return ResultVOUtils.success(checkInoutService.combineCheck(orderDetailBizEntities, orderDetailCodeEntities));
}
@AuthRuleAnnotation("")
@GetMapping("/udiwms/inout/waitAllocate/filterList")
public BaseResponse waitAllocate(FilterOrderDetailResultRequest orderDetailResultRequest) {
IoOrderEntity orderEntity = orderService.findByBillNo(orderDetailResultRequest.getOrderIdFk());
List<IoOrderDetailBizEntity> orderDetailBizEntities = orderDetailBizService.findByOrderId(orderDetailResultRequest.getOrderIdFk());
checkInoutService.bizNoPiCheck(orderDetailBizEntities, orderEntity);
return ResultVOUtils.success(orderDetailBizEntities);
}
}

@ -4,6 +4,7 @@ import com.glxp.api.dao.BaseMapperPlus;
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
import com.glxp.api.req.inout.FilterOrderDetailCodeRequest;
import com.glxp.api.res.inout.IoOrderDetailCodeResponse;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -23,4 +24,6 @@ public interface IoOrderDetailCodeDao extends BaseMapperPlus<IoOrderDetailCodeDa
* @param orderDetailCodeEntity
*/
void updateCount(IoOrderDetailCodeEntity orderDetailCodeEntity);
Integer findByRelIdCount(@Param("orderId") String orderId, @Param("relId") Long relId);
}

@ -85,43 +85,43 @@ public class BasicBussinessTypeEntity {
* UDIMS
*/
@TableField(value = "checkUdims")
private boolean checkUdims;
private int checkUdims;
/**
* pda
*/
@TableField(value = "checkPdaEd")
private boolean checkPdaEd;
private int checkPdaEd;
/**
* pda
*/
@TableField(value = "checkPdaUn")
private boolean checkPdaUn;
private int checkPdaUn;
/**
* PC
*/
@TableField(value = "checkPc")
private boolean checkPc;
private int checkPc;
/**
* web
*/
@TableField(value = "checkWebNew")
private boolean checkWebNew;
private int checkWebNew;
/**
*
*/
@TableField(value = "checkSp")
private boolean checkSp;
private int checkSp;
/**
*
*/
@TableField(value = "checkChange")
private boolean checkChange;
private int checkChange;
/**
* UDIMS
@ -181,7 +181,7 @@ public class BasicBussinessTypeEntity {
*
*/
@TableField(value = "checkBalance")
private boolean checkBalance;
private int checkBalance;
/**
*
@ -277,7 +277,7 @@ public class BasicBussinessTypeEntity {
*
*/
@TableField(value = "checkCopy")
private boolean checkCopy;
private int checkCopy;
/**
*

@ -74,37 +74,37 @@ public class BussinessTypeSaveRequest {
/**
* UDIMS
*/
private Boolean checkUdims;
private Integer checkUdims;
/**
* pda
*/
private Boolean checkPdaEd;
private Integer checkPdaEd;
/**
* pda
*/
private Boolean checkPdaUn;
private Integer checkPdaUn;
/**
* PC
*/
private Boolean checkPc;
private Integer checkPc;
/**
* web
*/
private Boolean checkWebNew;
private Integer checkWebNew;
/**
*
*/
private Boolean checkSp;
private Integer checkSp;
/**
*
*/
private Boolean checkChange;
private Integer checkChange;
/**
* UDIMS
@ -155,7 +155,7 @@ public class BussinessTypeSaveRequest {
/**
*
*/
private Boolean checkBalance;
private Integer checkBalance;
/**
*
@ -235,7 +235,7 @@ public class BussinessTypeSaveRequest {
/**
*
*/
private Boolean checkCopy;
private Integer checkCopy;
/**
*

@ -28,4 +28,6 @@ public class AddOrderRequest {
private Integer orderType;
private String remark;
private String checkPreInOrders;
private int fromVailPi; //是否需要校验三期1不需要2需要
}

@ -48,12 +48,12 @@ public class BasicBussinessTypeResponse {
private String defaultUnit;
private int spUse;
private Boolean secCheckEnable;
private boolean checkUdims;
private boolean checkPdaEd;
private boolean checkPdaUn;
private boolean checkPc;
private boolean checkWebNew;
private boolean checkChange;
private int checkUdims;
private int checkPdaEd;
private int checkPdaUn;
private int checkPc;
private int checkWebNew;
private int checkChange;
private boolean secCheckUdims;
private boolean secCheckPdaEd;
private boolean secCheckPdaUn;
@ -74,7 +74,7 @@ public class BasicBussinessTypeResponse {
private boolean enableSupplementOrder;
private boolean checkBalance;
private int checkBalance;
private boolean secCheckBalance;
private boolean useDyCount;
@ -104,7 +104,7 @@ public class BasicBussinessTypeResponse {
*
*/
private boolean supplementAll;
private boolean checkCopy;
private int checkCopy;
private boolean secCheckCopy;
/**
@ -112,7 +112,7 @@ public class BasicBussinessTypeResponse {
*/
private boolean checkSelect;
private boolean checkSp;
private int checkSp;
/**
*

@ -1,6 +1,7 @@
package com.glxp.api.service.auth;
import com.baomidou.mybatisplus.extension.service.IService;
import com.glxp.api.entity.auth.InvBusUserEntity;
import com.glxp.api.entity.auth.WarehouseBussinessTypeEntity;
import com.glxp.api.req.auth.FilterInvBusUserRequest;
@ -8,7 +9,7 @@ import com.glxp.api.res.auth.InvBusUserResponse;
import java.util.List;
public interface InvBusUserService {
public interface InvBusUserService extends IService<InvBusUserEntity> {
List<InvBusUserEntity> filterInvBusUser(FilterInvBusUserRequest filterInvBusUserRequest);
@ -28,7 +29,8 @@ public interface InvBusUserService {
boolean deleteByscAction(String subInvCode, List<String> selectedCodes);
boolean isExitByAction(String action);
boolean exitBus(String userId, String action);
}

@ -2,6 +2,7 @@ package com.glxp.api.service.auth.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.glxp.api.dao.auth.InvBusUserDao;
import com.glxp.api.entity.auth.InvBusUserEntity;
@ -19,7 +20,7 @@ import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class InvBusUserServiceImpl implements InvBusUserService {
public class InvBusUserServiceImpl extends ServiceImpl<InvBusUserDao, InvBusUserEntity> implements InvBusUserService {
@Resource
InvBusUserDao invBusUserDao;
@ -110,4 +111,9 @@ public class InvBusUserServiceImpl implements InvBusUserService {
public boolean isExitByAction(String action) {
return invBusUserDao.exists(new QueryWrapper<InvBusUserEntity>().eq("scAction", action));
}
@Override
public boolean exitBus(String userId, String action) {
return invBusUserDao.exists(new QueryWrapper<InvBusUserEntity>().eq("userId", userId).eq("scAction", action));
}
}

@ -239,7 +239,7 @@ public class IoAddInoutService {
//新增业务单据处理
public void dealBusProcess(IoOrderEntity orderEntity) {
public void dealBusProcess(IoOrderEntity orderEntity, Integer fromVailPi) {
orderEntity.setErrMsg("正在处理!");
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_PROCESSING);
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
@ -295,7 +295,11 @@ public class IoAddInoutService {
return;
}
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
if (fromVailPi != null && fromVailPi == 2)
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_ALLOCATE);
else
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK);
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
orderEntity.setUpdateTime(new Date());
orderService.update(orderEntity);

@ -80,39 +80,39 @@ public class IoCheckInoutService {
return false;
} else {
if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDIMS) {
if (!bussinessTypeEntity.isCheckUdims()) {
if (bussinessTypeEntity.getCheckUdims() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
if (!bussinessTypeEntity.isCheckWebNew()) {
if (bussinessTypeEntity.getCheckWebNew() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAED) {
if (!bussinessTypeEntity.isCheckPdaEd()) {
if (bussinessTypeEntity.getCheckPdaEd() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAUN) {
if (!bussinessTypeEntity.isCheckPdaUn()) {
if (bussinessTypeEntity.getCheckPdaUn() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PC) {
if (!bussinessTypeEntity.isCheckPc()) {
if (bussinessTypeEntity.getCheckPc() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE) {
if (!bussinessTypeEntity.isCheckChange()) {
if (bussinessTypeEntity.getCheckChange() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (!bussinessTypeEntity.isCheckBalance()) {
if (bussinessTypeEntity.getCheckBalance() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDISP) {
if (!bussinessTypeEntity.isCheckSp()) {
if (bussinessTypeEntity.getCheckSp() == 0) {
return false;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_COPY) {
if (!bussinessTypeEntity.isCheckCopy()) {
if (bussinessTypeEntity.getCheckCopy() == 0) {
return false;
}
}
@ -131,47 +131,47 @@ public class IoCheckInoutService {
unCheckFirstFinish(orderEntity);
} else {
if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDIMS) {
if (!bussinessTypeEntity.isCheckUdims()) {
if (bussinessTypeEntity.getCheckUdims() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_WEBNEW) {
if (!bussinessTypeEntity.isCheckWebNew()) {
if (bussinessTypeEntity.getCheckWebNew() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAED) {
if (!bussinessTypeEntity.isCheckPdaEd()) {
if (bussinessTypeEntity.getCheckPdaEd() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PDAUN) {
if (!bussinessTypeEntity.isCheckPdaUn()) {
if (bussinessTypeEntity.getCheckPdaUn() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PC) {
if (!bussinessTypeEntity.isCheckPc()) {
if (bussinessTypeEntity.getCheckPc() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_CHANGE) {
if (!bussinessTypeEntity.isCheckChange()) {
if (bussinessTypeEntity.getCheckChange() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_PEACE_CHANGE) {
if (!bussinessTypeEntity.isCheckBalance()) {
if (bussinessTypeEntity.getCheckBalance() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_UDISP) {
if (!bussinessTypeEntity.isCheckSp()) {
if (bussinessTypeEntity.getCheckSp() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
} else if (orderEntity.getFromType().intValue() == ConstantStatus.FROM_COPY) {
if (!bussinessTypeEntity.isCheckCopy()) {
if (bussinessTypeEntity.getCheckCopy() == 0) {
unCheckFirstFinish(orderEntity);
return;
}
@ -192,7 +192,7 @@ public class IoCheckInoutService {
UdiEntity udiEntity = FilterUdiUtils.getUdi(codeEntity.getCode());
IoCodeLostEntity codeLostEntity = codeLostService.findByCode(codeEntity.getCode());
if (codeLostEntity == null) {
if (codeLostEntity == null) {
codeLostEntity = new IoCodeLostEntity();
codeLostEntity.setNameCode(udiEntity.getUdi());
codeLostEntity.setCode(codeEntity.getCode());
@ -251,6 +251,31 @@ public class IoCheckInoutService {
return null;
}
// 无三期拣货校验
public String checkNoPiCode(IoCodeTempEntity codeTempEntity) {
boolean isBillExit = orderDetailBizService.isExit(codeTempEntity.getOrderId());
if (!isBillExit) {
return "请先录入业务详情";
}
IoOrderDetailBizEntity bizEntity = orderDetailBizService.findByRelId(codeTempEntity.getOrderId(), codeTempEntity.getRelId());
if (bizEntity == null) {
return "非此单产品!";
}
Integer detailCount = orderDetailCodeService.findByRelIdCount(codeTempEntity.getOrderId(), codeTempEntity.getRelId());
int curCount = 0;
if (detailCount != null) {
curCount = detailCount + codeTempEntity.getMyReCount();
} else {
curCount = codeTempEntity.getMyReCount();
}
if (curCount > bizEntity.getCount()) {
return "当前产品数量超出!";
}
return null;
}
//一次校验(无需校验)完成
public void unCheckFirstFinish(IoOrderEntity orderEntity) {
@ -422,6 +447,35 @@ public class IoCheckInoutService {
}
}
//业务单正向校验
public String bizNoPiCheck(List<IoOrderDetailBizEntity> orderDetailBizEntities, IoOrderEntity orderEntity) {
String errMsg = "";
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
bizEntity.setCheckSuccess(false);
}
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
String msg = "";
int count = orderDetailCodeService.findByRelIdCount(orderEntity.getBillNo(), bizEntity.getBindRlFk());
if (bizEntity.getCount() == count) {
bizEntity.setCheckSuccess(true);
bizEntity.setScanCount(count);
} else {
msg = "数量不匹配";
bizEntity.setScanCount(count);
bizEntity.setCheckSuccess(false);
}
bizEntity.setErrMsg(msg);
}
for (IoOrderDetailBizEntity bizEntity : orderDetailBizEntities) {
if (!bizEntity.isCheckSuccess()) {
errMsg = errMsg + bizEntity.getCoName() + bizEntity.getErrMsg() + ";";
}
}
return errMsg;
}
//业务单正向校验
public String bizOrderCheck(List<IoOrderDetailBizEntity> orderDetailBizEntities, List<IoOrderDetailCodeEntity> orderDetailCodeEntities) {
String errMsg = "";

@ -30,6 +30,8 @@ public interface IoOrderDetailBizService {
IoOrderDetailBizEntity findByUnique(String orderId, Long relId, String bacthNo, String productDate, String expireDate);
IoOrderDetailBizEntity findByRelId(String orderId, Long relId);
List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest);
IoOrderDetailBizEntity selectByBatchNoAndBindRlFk(String batchNo, String bindRlFk);

@ -12,6 +12,8 @@ public interface IoOrderDetailCodeService {
IoOrderDetailCodeEntity findByUnique(String orderId, Long relId, String bacthNo);
Integer findByRelIdCount(String orderId, Long relId);
int insert(IoOrderDetailCodeEntity orderDetailCodeEntity);
int update(IoOrderDetailCodeEntity orderDetailCodeEntity);

@ -1,17 +1,21 @@
package com.glxp.api.service.inout.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.glxp.api.constant.ConstantStatus;
import com.glxp.api.dao.inout.IoOrderDetailBizDao;
import com.glxp.api.entity.inout.IoOrderDetailBizEntity;
import com.glxp.api.entity.inout.IoOrderDetailCodeEntity;
import com.glxp.api.entity.inout.IoOrderEntity;
import com.glxp.api.req.inout.FilterOrderDetailBizRequest;
import com.glxp.api.res.inout.IoOrderDetailBizResponse;
import com.glxp.api.res.inout.IoOrderInvoiceResponse;
import com.glxp.api.service.inout.IoCheckInoutService;
import com.glxp.api.service.inout.IoOrderDetailBizService;
import com.glxp.api.service.inout.IoOrderDetailCodeService;
import com.glxp.api.service.inout.IoOrderService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -91,6 +95,17 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
return ioOrderDetailBizDao.selectOrderDetailBiz(orderId, relId, bacthNo, productDate, expireDate);
}
@Override
public IoOrderDetailBizEntity findByRelId(String orderId, Long relId) {
if (relId == null)
return null;
List<IoOrderDetailBizEntity> orderDetailBizEntities = ioOrderDetailBizDao.selectList(new QueryWrapper<IoOrderDetailBizEntity>().eq("orderIdFk", orderId).eq("bindRlFk", relId));
if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
return orderDetailBizEntities.get(0);
}
return null;
}
@Override
public List<IoOrderDetailBizResponse> filterList(FilterOrderDetailBizRequest orderDetailBizRequest) {
if (null == orderDetailBizRequest) {
@ -122,13 +137,20 @@ public class IoOrderDetailBizServiceImpl implements IoOrderDetailBizService {
@Resource
@Lazy
IoCheckInoutService checkInoutService;
@Resource
IoOrderService orderService;
@Override
public List<IoOrderDetailBizEntity> checkOrderList(String orderId) {
IoOrderEntity orderEntity = orderService.findByBillNo(orderId);
List<IoOrderDetailBizEntity> orderDetailBizEntities = findByOrderId(orderId);
List<IoOrderDetailCodeEntity> codeEntities = orderDetailCodeService.findByOrderId(orderId);
checkInoutService.bizOrderCheck(orderDetailBizEntities, codeEntities);
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_ALLOCATE) {
checkInoutService.bizNoPiCheck(orderDetailBizEntities, orderEntity);
} else {
List<IoOrderDetailCodeEntity> codeEntities = orderDetailCodeService.findByOrderId(orderId);
checkInoutService.bizOrderCheck(orderDetailBizEntities, codeEntities);
}
return orderDetailBizEntities;
}

@ -48,6 +48,11 @@ public class IoOrderDetailCodeServiceImpl implements IoOrderDetailCodeService {
.isNull(StrUtil.isEmpty(bacthNo), "batchNo"));
}
@Override
public Integer findByRelIdCount(String orderId, Long relId) {
return ioOrderDetailCodeDao.findByRelIdCount(orderId, relId);
}
@Override
public int insert(IoOrderDetailCodeEntity orderDetailCodeEntity) {
orderDetailCodeEntity.setId(null);

@ -2,6 +2,7 @@ package com.glxp.api.service.inout.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.lang.UUID;
import cn.hutool.core.util.ReflectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
@ -146,6 +147,9 @@ public class IoOrderServiceImpl implements IoOrderService {
@Override
public int insertOrder(IoOrderEntity orderEntity) {
orderEntity.setId(null);
if (StrUtil.isEmpty(orderEntity.getRelKey())) {
orderEntity.setRelKey(UUID.fastUUID().toString(true));
}
orderEntity.setExportStatus(0); //上传状态:未上传
return orderDao.insert(orderEntity);
}
@ -630,6 +634,9 @@ public class IoOrderServiceImpl implements IoOrderService {
filterOrderRequest.setStatuses(Arrays.asList(10, 7));
filterOrderRequest.setDealStatuses(Arrays.asList(3, 4));
break;
case Constant.ORDER_STATUS_UN_ALLOCATE:
filterOrderRequest.setStatuses(Arrays.asList(ConstantStatus.ORDER_STATUS_ALLOCATE));
filterOrderRequest.setDealStatuses(Arrays.asList(2));
default:
break;
}

@ -3,7 +3,6 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.glxp.api.dao.auth.SysMenuDao">
<resultMap type="com.glxp.api.entity.auth.SysMenu" id="SysMenuResult">
<id property="menuId" column="menu_id"/>
<result property="menuName" column="menu_name"/>
@ -36,41 +35,79 @@
</select>
<insert id="insert" keyProperty="id" parameterType="com.glxp.api.entity.auth.SysMenu">
<insert id="insert" keyProperty="menuId" useGeneratedKeys="true" parameterType="com.glxp.api.entity.auth.SysMenu">
INSERT INTO auth_menu(`menu_id`, `menu_name`, parent_id, `order_num`, `path`, component
, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon,
, query_param, is_frame, is_cache, menu_type, visible, status, perms, icon,
remark, create_by, create_time, update_time, update_by)
values (#{menuId},
#{menuName}, #{parentId},
#{orderNum}, #{path}, #{component}, #{queryParam}, #{isFrame}, #{isCache}
, #{menuType}, #{visible}, #{status}, #{perms}, #{icon}, #{remark}
, #{createBy}, #{createTime}, #{updateTime}, #{updateBy})
, #{menuType}, #{visible}, #{status}, #{perms}, #{icon}, #{remark}
, #{createBy}, #{createTime}, #{updateTime}, #{updateBy})
</insert>
<update id="updateById" parameterType="com.glxp.api.entity.auth.SysMenu">
UPDATE auth_menu
<trim prefix="set" suffixOverrides=",">
<if test="menuName != null">`menu_name`=#{menuName},</if>
<if test="parentId != null">`parent_id`=#{parentId},</if>
<if test="orderNum != null">order_num=#{orderNum},</if>
<if test="path != null">`path`=#{path},</if>
<if test="component != null">component=#{component},</if>
<if test="queryParam != null">`query_param`=#{queryParam},</if>
<if test="isFrame != null">is_frame=#{isFrame},</if>
<if test="isCache != null">is_cache=#{isCache},</if>
<if test="updateTime != null">updateTime=#{updateTime},</if>
<if test="menuType != null">`menu_type`=#{menuType},</if>
<if test="visible != null">`visible`=#{visible},</if>
<if test="status != null">status=#{status},</if>
<if test="perms != null">perms=#{perms},</if>
<if test="icon != null">icon=#{icon},</if>
<if test="remark != null">remark=#{remark},</if>
<if test="createBy != null">create_by=#{createBy},</if>
<if test="createTime != null">create_time=#{createTime},</if>
<if test="updateTime != null">update_time=#{updateTime},</if>
<if test="updateBy != null">update_by=#{updateBy},</if>
<if test="menuName != null">
`menu_name`=#{menuName},
</if>
<if test="parentId != null">
`parent_id`=#{parentId},
</if>
<if test="orderNum != null">
order_num=#{orderNum},
</if>
<if test="path != null">
`path`=#{path},
</if>
<if test="component != null">
component=#{component},
</if>
<if test="queryParam != null">
`query_param`=#{queryParam},
</if>
<if test="isFrame != null">
is_frame=#{isFrame},
</if>
<if test="isCache != null">
is_cache=#{isCache},
</if>
<if test="updateTime != null">
updateTime=#{updateTime},
</if>
<if test="menuType != null">
`menu_type`=#{menuType},
</if>
<if test="visible != null">
`visible`=#{visible},
</if>
<if test="status != null">
status=#{status},
</if>
<if test="perms != null">
perms=#{perms},
</if>
<if test="icon != null">
icon=#{icon},
</if>
<if test="remark != null">
remark=#{remark},
</if>
<if test="createBy != null">
create_by=#{createBy},
</if>
<if test="createTime != null">
create_time=#{createTime},
</if>
<if test="updateTime != null">
update_time=#{updateTime},
</if>
<if test="updateBy != null">
update_by=#{updateBy},
</if>
</trim>
WHERE menu_id=#{menuId}
WHERE menu_id = #{menuId}
</update>
<delete id="deleteById" parameterType="java.lang.Long">
@ -81,20 +118,17 @@
<select id="selectMenuTreeAll" parameterType="com.glxp.api.entity.auth.SysMenu"
resultMap="SysMenuResult">
select *
FROM auth_menu
order by order_num
</select>
<select id="selectMenuByName" parameterType="java.lang.String"
resultMap="SysMenuResult">
select *
FROM auth_menu
where menu_name =#{menu_name}
where menu_name = #{menu_name}
</select>
@ -103,22 +137,22 @@
select *
FROM auth_menu
<where>
<if test="menuId != null ">
<if test="menuId != null">
and menu_id = #{menuId}
</if>
<if test="menuName != null and menuName != '' ">
AND menu_name LIKE CONCAT('%',#{menuName},'%')
<if test="menuName != null and menuName != ''">
AND menu_name LIKE CONCAT('%', #{menuName}, '%')
</if>
<if test="parentName != null and parentName != '' ">
<if test="parentName != null and parentName != ''">
AND `parent_name` = #{parentName}
</if>
<if test="parentId != null ">
<if test="parentId != null">
AND `parent_id` = #{parentId}
</if>
<if test="orderNum != null ">
<if test="orderNum != null">
AND `order_num` = #{orderNum}
</if>
<if test="neMenuId != null ">
<if test="neMenuId != null">
and menu_id <![CDATA[ <> ]]> #{neMenuId}
</if>
</where>
@ -144,9 +178,9 @@
m.order_num,
m.create_time
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role ro on sur.role_id = ro.role_id
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role ro on sur.role_id = ro.role_id
</select>
<select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
@ -166,10 +200,10 @@
m.order_num,
m.create_time
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role ro on sur.role_id = ro.role_id
left join auth_user u on sur.user_id = u.id
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role ro on sur.role_id = ro.role_id
left join auth_user u on sur.user_id = u.id
where u.id = #{userId}
and m.menu_type in ('M', 'C')
and m.status = '0'
@ -180,11 +214,13 @@
<select id="selectMenuListByRoleId" resultType="Long">
select m.menu_id
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
left join auth_role_menu rm on m.menu_id = rm.menu_id
where rm.role_id = #{roleId}
<if test="menuCheckStrictly">
and m.menu_id not in (select m.parent_id from auth_menu m inner join auth_role_menu rm on m.menu_id =
rm.menu_id and rm.role_id = #{roleId})
and m.menu_id not in (select m.parent_id
from auth_menu m
inner join auth_role_menu rm on m.menu_id =
rm.menu_id and rm.role_id = #{roleId})
</if>
order by m.parent_id, m.order_num
</select>
@ -192,16 +228,16 @@
<select id="selectMenuPerms" resultType="String">
select distinct m.perms
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
</select>
<select id="selectMenuPermsByUserId" parameterType="Long" resultType="String">
select distinct m.perms
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role r on r.role_id = sur.role_id
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_user_role sur on rm.role_id = sur.role_id
left join auth_role r on r.role_id = sur.role_id
where m.status = '0'
and r.status = '0'
and sur.user_id = #{userId}
@ -210,9 +246,8 @@
<select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String">
select distinct m.perms
from auth_menu m
left join auth_role_menu rm on m.menu_id = rm.menu_id
left join auth_role_menu rm on m.menu_id = rm.menu_id
where m.status = '0'
and rm.role_id = #{roleId}
</select>
</mapper>

@ -5,8 +5,8 @@
select io_order_detail_code.*,
(select `name` from basic_corp where erpId = io_order_detail_code.supId) supName
from io_order_detail_code
left join basic_udirel bu on bu.id = io_order_detail_code.bindRlFk
left join basic_products bp on bp.uuid = bu.uuid
left join basic_udirel bu on bu.id = io_order_detail_code.bindRlFk
left join basic_products bp on bp.uuid = bu.uuid
<where>
<if test="orderIdFk != null and orderIdFk != ''">
AND orderIdFk = #{orderIdFk}
@ -31,6 +31,18 @@
</select>
<update id="updateCount">
update io_order_detail_code set count = #{count}, reCount = #{reCount} where id = #{id}
update io_order_detail_code
set count = #{count},
reCount = #{reCount}
where id = #{id}
</update>
</mapper>
<select id="findByRelIdCount"
resultType="java.lang.Integer">
select sum(reCount)
from io_order_detail_code
where orderIdFk = #{orderId}
and bindRlFk = #{relId}
group by bindRlFk
</select>
</mapper>

Loading…
Cancel
Save