diff --git a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java index e79288e8..12938b29 100644 --- a/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java +++ b/src/main/java/com/glxp/api/controller/basic/BasicBussinessTypeController.java @@ -31,6 +31,7 @@ import com.glxp.api.service.auth.CustomerService; import com.glxp.api.service.basic.IBasicBussinessTypeService; import com.glxp.api.util.CustomUtil; import com.glxp.api.util.FileUtils; +import com.glxp.api.util.IntUtil; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.validation.BindingResult; @@ -271,7 +272,7 @@ public class BasicBussinessTypeController extends BaseController { basicDataRequest.setDeleteRequest(deleteRequest); basicDataRequest.setKey(SyncDelType.BASIC_BUSINESS_TYPE); Long userId = getUserId(); - spGetHttpClient.deleteBasicData(basicDataRequest,userId+""); + spGetHttpClient.deleteBasicData(basicDataRequest, userId + ""); return basicBussinessTypeService.deleteBussinessType(id) == true ? ResultVOUtils.success("删除成功") : ResultVOUtils.error(500, "删除失败,系统繁忙"); } @@ -470,7 +471,7 @@ public class BasicBussinessTypeController extends BaseController { }); } else if (filterBussinessTypeRequest.getPdaType() == 5) { list.forEach(bussinessTypeEntity -> { - if (bussinessTypeEntity.isSecCheckChange()) { + if (IntUtil.value(bussinessTypeEntity.getSecCheckEnable())) { results.add(bussinessTypeEntity); } }); 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 484702ee..5221451f 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderController.java @@ -330,6 +330,7 @@ public class IoOrderController extends BaseController { orderEntity.setDeptCode(addOrderRequest.getDeptCode()); orderEntity.setBillNo(addOrderRequest.getBillNo()); orderEntity.setInvCode(addOrderRequest.getInvCode()); + orderService.updateByBillNo(orderEntity); 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 7879fcb6..5f4523f7 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderDetailBizController.java @@ -192,9 +192,9 @@ public class IoOrderDetailBizController extends BaseController { ioOrderDetailBizEntity.setExpireDate(item.getExpireDate()); ioOrderDetailBizEntity.setBatchNo(item.getBatchNo()); ioOrderDetailBizEntity.setSupId(item.getSupId()); - if(null == addBizProductReqeust.getZczbhhzbapzbh() || "".equals(addBizProductReqeust.getZczbhhzbapzbh())){ + if (null == addBizProductReqeust.getZczbhhzbapzbh() || "".equals(addBizProductReqeust.getZczbhhzbapzbh())) { ioOrderDetailBizEntity.setCertCode(udiRelevanceResponse.getZczbhhzbapzbh()); - }else{ + } else { ioOrderDetailBizEntity.setCertCode(addBizProductReqeust.getZczbhhzbapzbh()); } diff --git a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java index faea140b..3ef6a36d 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoOrderReviewController.java @@ -460,8 +460,6 @@ public class IoOrderReviewController extends BaseController { redisUtil.del(ConstantStatus.REDIS_BILLNO_CODES + orderEntity.getBillNo()); //验收完成->进入流程 ioCheckInoutService.checkThird(orderEntity); - - return ResultVOUtils.success("更新成功"); } diff --git a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java index 5d86fcc8..454cccc9 100644 --- a/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoAddInoutService.java @@ -305,7 +305,7 @@ public class IoAddInoutService { //生成扫码单据详情 - public void genOrderDetailCode(IoOrderEntity orderEntity, IoCodeTempEntity codeTempEntity) { + public List genOrderDetailCode(IoOrderEntity orderEntity, IoCodeTempEntity codeTempEntity) { List ioOrderDetailCodeEntities = orderDetailCodeDao.selectList(new QueryWrapper().select("id", "count", "reCount", "bindRlFk", "batchNo").eq("orderIdFk", orderEntity.getBillNo())); UdiRelevanceResponse udiRelevanceResponse = udiRelevanceService.selectSupGroupById(codeTempEntity.getRelId(), codeTempEntity.getSupId()); @@ -332,6 +332,7 @@ public class IoAddInoutService { orderDetailCodeService.insert(buildEntity(orderEntity, codeTempEntity, udiRelevanceResponse)); } } + return ioOrderDetailCodeEntities; } //平衡补单 diff --git a/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java b/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java index 6149a18c..521ecfba 100644 --- a/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java +++ b/src/main/java/com/glxp/api/service/inout/IoCheckInoutService.java @@ -236,23 +236,46 @@ public class IoCheckInoutService { checkThird(orderEntity); } - + /** + * 待校验提交,以比对结果提交 + * + * @param orderId + */ public void checkRightResult(String orderId) { IoOrderEntity orderEntity = orderService.findByBillNo(orderId); orderDetailCodeService.deleteByOrderId(orderId); List codeTempEntities = codeTempService.findByOrderId(orderEntity.getBillNo()); + List orderDetailCodeEntities = null; for (IoCodeTempEntity codeTempEntity : codeTempEntities) { IoCodeEntity codeEnttity = new IoCodeEntity(); BeanUtils.copyProperties(codeTempEntity, codeEnttity); codeEnttity.setId(null); codeService.insert(codeEnttity); - addInoutService.genOrderDetailCode(orderEntity, codeTempEntity); + orderDetailCodeEntities = addInoutService.genOrderDetailCode(orderEntity, codeTempEntity); } codeTempService.deleteByBillNo(orderEntity.getBillNo()); orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS); orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); orderEntity.setUpdateTime(new Date()); orderService.update(orderEntity); + + //删除之前的单据结果 + if (CollUtil.isNotEmpty(orderDetailCodeEntities)) { + if (null != orderDetailCodeEntities.get(0).getOrderIdFk() && !"".equals(orderDetailCodeEntities.get(0).getOrderIdFk())) { + orderDetailResultService.deleteByOrderId(orderDetailCodeEntities.get(0).getOrderIdFk()); + } + orderDetailCodeEntities.forEach(orderDetailCodeEntity -> + { + //生成单据结果 + IoOrderDetailResultEntity orderDetailResultEntity = new IoOrderDetailResultEntity(); + BeanUtils.copyProperties(orderDetailCodeEntity, orderDetailResultEntity); + orderDetailResultEntity.setCount(orderDetailCodeEntity.getReCount()); + orderDetailResultEntity.setReCount(orderDetailCodeEntity.getReCount()); + orderDetailResultEntity.setId(null); + orderDetailResultService.insert(orderDetailResultEntity); + + }); + } genLostCode(orderEntity.getBillNo()); checkThird(orderEntity); } @@ -347,7 +370,7 @@ public class IoCheckInoutService { return null; } - // 无三期拣货校验 + //无三期拣货校验 public String checkNoPiCode(IoCodeTempEntity codeTempEntity) { boolean isBillExit = orderDetailBizService.isExit(codeTempEntity.getOrderId()); if (!isBillExit) { @@ -427,7 +450,7 @@ public class IoCheckInoutService { orderEntity.setUpdateTime(new Date()); orderService.update(orderEntity); //生成预存的库存 - orderService.updateOrderInventory(orderEntity.getBillNo(),orderEntity.getStatus()); + orderService.updateOrderInventory(orderEntity.getBillNo(), orderEntity.getStatus()); genLostCode(orderEntity.getBillNo()); checkThird(orderEntity); } @@ -542,7 +565,7 @@ public class IoCheckInoutService { orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST); orderEntity.setUpdateTime(new Date()); orderService.update(orderEntity); - orderService.updateOrderInventory(orderEntity.getBillNo(),orderEntity.getStatus()); + orderService.updateOrderInventory(orderEntity.getBillNo(), orderEntity.getStatus()); //生成缺失码 genLostCode(orderEntity.getBillNo()); @@ -1053,7 +1076,7 @@ public class IoCheckInoutService { genInvService.genPreInv(orderEntity.getBillNo()); } else { genInvService.genNorInv(orderEntity.getBillNo()); - orderService.updateOrderInventory(orderEntity.getBillNo(),orderEntity.getStatus()); + orderService.updateOrderInventory(orderEntity.getBillNo(), orderEntity.getStatus()); } } else { //不入库存,直接进行单据流转 diff --git a/src/main/java/com/glxp/api/service/sync/HeartService.java b/src/main/java/com/glxp/api/service/sync/HeartService.java index 278b782b..e69924ba 100644 --- a/src/main/java/com/glxp/api/service/sync/HeartService.java +++ b/src/main/java/com/glxp/api/service/sync/HeartService.java @@ -278,9 +278,10 @@ public class HeartService { break; break; case DEVICE_TASK: - if (needExec(info.getDeviceTask())) { - uploadData(exportType, taskId, x -> x.getDeviceTaskData(info, taskId, now, syncTime)); - } +// if (needExec(info.getDeviceTask())) { + //默认开启 + uploadData(exportType, taskId, x -> x.getDeviceTaskData(info, taskId, now, syncTime)); +// } break; } } diff --git a/src/main/resources/schemas/schema_v2.2.sql b/src/main/resources/schemas/schema_v2.2.sql index 5b58b97c..9d9837cb 100644 --- a/src/main/resources/schemas/schema_v2.2.sql +++ b/src/main/resources/schemas/schema_v2.2.sql @@ -173,6 +173,8 @@ CREATE TABLE IF NOT EXISTS `device_inspect_plan_delect` CALL Pro_Temp_ColumnWork('device_inspect_task', 'id', 'bigint', 2); CALL Pro_Temp_ColumnWork('device_inspect_task_detail', 'id', 'bigint', 2); +CALL Pro_Temp_ColumnWork('sync_data_set', 'deviceTask', 'tinyint', 1); + # INSERT ignore 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`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2000, '我的申购单 ', 1674, 2, 'purchase/purApply/pureApplyMySearch', 'purchase/purApply/pureApplyMySearch', NULL, 1, 0, 'C', '0', '0', NULL, NULL, '超级用户', '2023-07-20 17:08:38', NULL, NULL, NULL); # INSERT ignore INTO `udi_wms_wmd`.`auth_menu`(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`) VALUES (2001, '我的领用单', 1685, 1, 'inout/receive/receiveMySearch', 'inout/receive/receiveMySearch', NULL, 1, 0, 'C', '0', '0', NULL, NULL, '超级用户', '2023-08-14 10:35:30', NULL, NULL, NULL);