From c42346453608186971fad5e80ffd08fd58d38d06 Mon Sep 17 00:00:00 2001 From: zc <zc@123> Date: 星期三, 16 七月 2025 16:42:45 +0800 Subject: [PATCH] 完善erp对接 --- src/main/java/com/zy/asrs/controller/LocMastController.java | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/LocMastController.java b/src/main/java/com/zy/asrs/controller/LocMastController.java index 2eae903..ac44727 100644 --- a/src/main/java/com/zy/asrs/controller/LocMastController.java +++ b/src/main/java/com/zy/asrs/controller/LocMastController.java @@ -17,12 +17,11 @@ import com.zy.asrs.service.BasWhsService; import com.zy.asrs.service.LocDetlService; import com.zy.asrs.service.LocMastService; -import com.zy.asrs.utils.Utils; import com.zy.common.entity.Parameter; import com.zy.common.model.Shelves; +import com.zy.common.utils.RoleUtils; import com.zy.common.web.BaseController; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import java.util.*; @@ -67,6 +66,23 @@ excludeTrash(param); EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); convert(param, wrapper); + // 涓嶅悓缁ф壙瑙掕壊鏄剧ず涓嶅悓搴撲俊鎭� + RoleUtils.addRoleWrapperByCrn(getUserId(),wrapper); + if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} + return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper)); + } + + @RequestMapping(value = "/locMast/crn/list/auth") + @ManagerAuth + public R crnList(@RequestParam(defaultValue = "1")Integer curr, + @RequestParam(defaultValue = "10")Integer limit, + @RequestParam(required = false)String orderByField, + @RequestParam(required = false)String orderByType, + @RequestParam Map<String, Object> param){ + excludeTrash(param); + EntityWrapper<LocMast> wrapper = new EntityWrapper<>(); + convert(param, wrapper); + wrapper.in("crn_no", 1,2); if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));} return R.ok(locMastService.selectPage(new Page<>(curr, limit), wrapper)); } @@ -120,6 +136,9 @@ locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); } } + if (locMast.getLocSts().equals("O")){ + locMast.setBarcode(""); + } locMast.setModiUser(getUserId()); locMast.setModiTime(new Date()); locMastService.updateById(locMast); -- Gitblit v1.9.1