diff --git a/src/main/java/com/glxp/api/controller/auth/DeptUserController.java b/src/main/java/com/glxp/api/controller/auth/DeptUserController.java index 328d256e..3110a227 100644 --- a/src/main/java/com/glxp/api/controller/auth/DeptUserController.java +++ b/src/main/java/com/glxp/api/controller/auth/DeptUserController.java @@ -37,7 +37,7 @@ public class DeptUserController { IoOrderService ioOrderService; @Resource - WarehouseUserService warehouseUserService; + WarehouseUserService warehouseUserService; @AuthRuleAnnotation("") diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java index ab1b2f1d..db387529 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -90,7 +90,7 @@ public class IoOrderController extends BaseController { if (filterOrderRequest.getSourceLocalType() == 1) { filterOrderRequest.setSourceTypes(Arrays.asList(1, 2, 3, 4, 5)); } else { - filterOrderRequest.setSourceTypes(Arrays.asList(6,7, 8, 9, 10, 11, 12, 13, 14, 15, 17)); + filterOrderRequest.setSourceTypes(Arrays.asList(6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17)); } } @@ -418,7 +418,7 @@ public class IoOrderController extends BaseController { } else if (stockOrderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_SUCCESS) { //1.校验是否为委托验收人 - if (!stockOrderEntity.getEntrustEnd()==true) { + if (!stockOrderEntity.getEntrustEnd() == true) { BasicEntrustRecRequest basicEntrustRecRequest = new BasicEntrustRecRequest(); basicEntrustRecRequest.setAction(stockOrderEntity.getAction()); basicEntrustRecRequest.setEntrustUser(userId); diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java index 01440144..ab41eff7 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -156,7 +156,7 @@ public class IoOrderDetailBizController extends BaseController { datas.add(addBizProductReqeust); } for (AddBizProductReqeust item : datas) { - UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(item.getRelId()); + UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(item.getRelId(), addBizProductReqeust.getSupId()); // todo 查询产品是否已经通过认证 BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction()); @@ -169,6 +169,13 @@ public class IoOrderDetailBizController extends BaseController { } } + if (bussinessTypeEntity.isVailDispatch()) { + if (!udiRelevanceResponse.isDispatch()) { + return ResultVOUtils.error(500, "该产品不可配送,请联系院方!"); + } + } + + IoOrderDetailBizEntity ioOrderDetailBizEntity = new IoOrderDetailBizEntity(); ioOrderDetailBizEntity.setOrderIdFk(orderEntity.getBillNo()); ioOrderDetailBizEntity.setBindRlFk(udiRelevanceResponse.getId()); diff --git a/src/main/java/com/glxp/api/controller/system/CompanyController.java b/src/main/java/com/glxp/api/controller/system/CompanyController.java index 0d8e06ea..9c069218 100644 --- a/src/main/java/com/glxp/api/controller/system/CompanyController.java +++ b/src/main/java/com/glxp/api/controller/system/CompanyController.java @@ -23,7 +23,7 @@ public class CompanyController { @GetMapping("/warehouse/info/company") public BaseResponse getCompanyInfo(CompanyRequest companyRequest) { CompanyEntity companyEntity = companyService.findCompany(companyRequest.getCustomerId()); - if (companyEntity != null) { + if (companyEntity != null) { return ResultVOUtils.success(companyEntity); } return ResultVOUtils.error(500, "企业信息为空"); diff --git a/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java b/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java index f200344e..d6cc9ba1 100644 --- a/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java +++ b/src/main/java/com/glxp/api/req/basic/FilterUdiRelRequest.java @@ -10,6 +10,7 @@ public class FilterUdiRelRequest extends ListPageRequest { private String ylqxzcrbarmc; private String cpmctymc; + private String entireCpmctymc; private String nameCode; private String uuid; private String originUuid; diff --git a/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java b/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java index cf0e7d5b..21ffddf5 100644 --- a/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java +++ b/src/main/java/com/glxp/api/service/auth/impl/DeptUserServiceImpl.java @@ -64,6 +64,9 @@ public class DeptUserServiceImpl implements DeptUserService { @Override public boolean delete(Long deptId, Long userId) { + + + return deptUserDao.deleteByDept(deptId, userId); } diff --git a/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java b/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java index b89b809b..56ff9ade 100644 --- a/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java +++ b/src/main/java/com/glxp/api/service/basic/UdiRelevanceService.java @@ -55,7 +55,7 @@ public interface UdiRelevanceService extends IService { UdiRelevanceResponse selectUdiId(Long id); - UdiRelevanceResponse selectSupGroupById(Long id); + UdiRelevanceResponse selectSupGroupById(Long id, String supId); UdiRelevanceEntity selectUpdateByUuid(String uuid); diff --git a/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java b/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java index 6f571bf0..0fc11ca7 100644 --- a/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java +++ b/src/main/java/com/glxp/api/service/basic/impl/UdiRelevanceServiceImpl.java @@ -208,8 +208,10 @@ public class UdiRelevanceServiceImpl extends ServiceImpl ioOrderDetailCodeEntities = orderDetailCodeDao.selectList(new QueryWrapper().select("id", "count", "reCount", "bindRlFk", "batchNo").eq("orderIdFk", orderEntity.getBillNo())); - UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(codeTempEntity.getRelId()); + UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(codeTempEntity.getRelId(), orderEntity.getFromCorp()); // UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectGroupById(codeTempEntity.getRelId()); if (CollUtil.isEmpty(ioOrderDetailCodeEntities)) { orderDetailCodeService.insert(buildEntity(orderEntity, codeTempEntity, udiRelevanceResponse)); diff --git a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java index be308d25..ef4f50dc 100644 --- a/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/inout/impl/IoOrderServiceImpl.java @@ -491,20 +491,27 @@ public class IoOrderServiceImpl implements IoOrderService { public boolean rollbackUnReOrder(String billNo) { IoOrderEntity orderEntity = findByBillNo(billNo); - List codeEntityList = codeService.findByOrderId(billNo); - List codeTempEntities = new ArrayList<>(); - for (IoCodeEntity codeEntity : codeEntityList) { - IoCodeTempEntity codeTempEntity = new IoCodeTempEntity(); - BeanUtils.copyProperties(codeEntity, codeTempEntity); - codeTempEntity.setId(null); - codeTempEntities.add(codeTempEntity); + if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_SUCCESS) { + List codeEntityList = codeService.findByOrderId(billNo); + List codeTempEntities = new ArrayList<>(); + for (IoCodeEntity codeEntity : codeEntityList) { + IoCodeTempEntity codeTempEntity = new IoCodeTempEntity(); + BeanUtils.copyProperties(codeEntity, codeTempEntity); + codeTempEntity.setId(null); + codeTempEntities.add(codeTempEntity); + } + codeTempService.insertBatch(codeTempEntities); + codeService.deleteCodeByOrderId(billNo); + orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK); + orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); + orderEntity.setUpdateTime(new Date()); + update(orderEntity); + } else if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_CHECK_REW) { + orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS); + orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); + orderEntity.setUpdateTime(new Date()); + update(orderEntity); } - codeTempService.insertBatch(codeTempEntities); - codeService.deleteCodeByOrderId(billNo); - orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK); - orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); - orderEntity.setUpdateTime(new Date()); - update(orderEntity); return true; } @@ -805,7 +812,7 @@ public class IoOrderServiceImpl implements IoOrderService { @Override public List selectList(Long userId) { - List ioOrderEntities = orderDao.selectList(new QueryWrapper().eq("createUser",userId)); + List ioOrderEntities = orderDao.selectList(new QueryWrapper().eq("createUser", userId)); return ioOrderEntities; } diff --git a/src/main/java/com/glxp/api/task/AsyncHeartTask.java b/src/main/java/com/glxp/api/task/AsyncHeartTask.java index 12c59512..93126f28 100644 --- a/src/main/java/com/glxp/api/task/AsyncHeartTask.java +++ b/src/main/java/com/glxp/api/task/AsyncHeartTask.java @@ -21,8 +21,8 @@ import javax.annotation.Resource; import java.util.Arrays; -@Component -@EnableScheduling +//@Component +//@EnableScheduling public class AsyncHeartTask implements SchedulingConfigurer { final Logger logger = LoggerFactory.getLogger(AsyncHeartTask.class); diff --git a/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml b/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml index eae9909f..1c371d0f 100644 --- a/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml +++ b/src/main/resources/mybatis/mapper/basic/UdiRelevanceDao.xml @@ -327,6 +327,10 @@ AND nameCode LIKE concat(#{nameCode}, '%') + + + AND cpmctymc = #{entireCpmctymc} + AND cpmctymc LIKE concat('%', #{cpmctymc}, '%') @@ -335,9 +339,9 @@ and ( - nameCode LIKE concat('%', #{unionCode}, '%') - or ybbm LIKE concat('%', #{unionCode}, '%') - or sptm LIKE concat('%', #{unionCode}, '%')) + nameCode LIKE concat('%', #{unionCode}, '%') + or ybbm LIKE concat('%', #{unionCode}, '%') + or sptm LIKE concat('%', #{unionCode}, '%')) AND (basic_udirel.isDisable is null or basic_udirel.isDisable = false) @@ -367,30 +371,30 @@ AND (thirdId ]]> '' or thirdId1 ]]> '' or thirdId2 ]]> '' or thirdId3 ]]> '' or thirdId4 ]]> '') - and basic_products.originUuid ]]> '' + and basic_products.originUuid ]]> '' AND basic_products.originUuid is NULL AND (mainId is NULL or mainId = '') - and basic_products.originUuid ]]> '' + and basic_products.originUuid ]]> '' AND thirdId1 is NULL - and basic_products.originUuid ]]> '' + and basic_products.originUuid ]]> '' AND thirdId2 is NULL - and basic_products.originUuid ]]> '' + and basic_products.originUuid ]]> '' AND thirdId3 is NULL - and basic_products.originUuid ]]> '' + and basic_products.originUuid ]]> '' AND thirdId4 is NULL - and basic_products.originUuid ]]> '' + and basic_products.originUuid ]]> '' AND basic_udirel.updateTime is NULL @@ -408,7 +412,7 @@ and originUuid = #{originUuid} - and manufactory LIKE concat('%',#{manufactory},'%') + and manufactory LIKE concat('%', #{manufactory}, '%') and basic_udirel.dispatch = #{dispatch} @@ -585,8 +589,6 @@ AND basic_products.tyshxydm = #{tyshxydm} - - GROUP BY cpmctymc, manufactory @@ -1125,65 +1127,65 @@