From 53fab3f56e8335fbf39fc07c4e10f6abdb0505bb Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 03 十二月 2025 18:48:11 +0800
Subject: [PATCH] 登记、化验、称重页面调整,及登记化验数据提交
---
fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java | 273 ++++++++++++++++++++----------------------------------
1 files changed, 101 insertions(+), 172 deletions(-)
diff --git a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java
index 4ad68b4..2da89b8 100644
--- a/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java
+++ b/fzzy-igdss-web/src/main/java/com/fzzy/sys/controller/inout/InoutController.java
@@ -1,12 +1,14 @@
package com.fzzy.sys.controller.inout;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fzzy.common.dto.BaseParam;
import com.fzzy.igds.constant.Constant;
+import com.fzzy.igds.constant.RespCodeEnum;
+import com.fzzy.igds.data.IgdsBaseParam;
import com.fzzy.igds.data.InoutParam;
+import com.fzzy.igds.data.NoticeParam;
import com.fzzy.igds.data.PageResponse;
-import com.fzzy.igds.domain.Depot;
-import com.fzzy.igds.domain.InoutConf;
-import com.fzzy.igds.domain.InoutRecord;
+import com.fzzy.igds.domain.*;
import com.fzzy.igds.utils.ContextUtil;
import com.fzzy.igds.utils.DateUtil;
import com.fzzy.sys.manager.common.CommonManager;
@@ -46,23 +48,21 @@
private CommonManager commonManager;
/**
- * 鍑哄叆搴撳揩閫熺櫥璁�
- *
+ * 鐧昏锛屽嚭鍏ュ簱鍏辩敤
* @param httpRequest
- * @param sort 閰嶅鍙�
- * @param type 涓氬姟绫诲瀷锛欼N-鍏ュ簱锛孫UT-鍑哄簱
+ * @param sort 閰嶅鍙�
+ * @param type 涓氬姟绫诲瀷锛欼N-鍏ュ簱锛孫UT-鍑哄簱
* @param view
* @return
*/
@RequestMapping("/register")
public String register(HttpServletRequest httpRequest,
- @RequestParam(value = "sort", required = false) String sort,
- @RequestParam(value = "type", required = false) String type,
- ModelMap view) {
+ @RequestParam(value = "sort", required = false) String sort,
+ @RequestParam(value = "type", required = false) String type,
+ ModelMap view) {
SysUser user = ContextUtil.getLoginUser();
view.put(Constant.MODEL_KEY_LOGIN_USER, user);
-
String deptId = ContextUtil.subDeptId(user);
view.put("deptId", deptId);
@@ -73,46 +73,31 @@
sort = inoutManager.getInoutWeightByClient(httpRequest);
}
- if (StringUtils.isEmpty(type)) {
+ if (StringUtils.isBlank(type)) {
//榛樿鍏ュ簱
type = Constant.TYPE_IN;
}
view.put("type", type);
- //绉伴噸鏄惁鍙紪杈戞爣绛�
- String weightEditTag = inoutManager.getWeightEditTag(user.getCompanyId(), deptId);
- view.put("weightEditTag", weightEditTag);
+ // 绫诲瀷鍒楄〃
+ List<SysDictData> listInoutType = commonManager.getInoutType();
+ view.put("listInoutType", listInoutType);
//鍑哄叆搴撴祦绋�
String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), ContextUtil.subDeptId(user), type);
view.put("inoutProgress", inoutProgress);
+
// 褰撳墠娴佺▼鑺傜偣
view.put("progress", Constant.PROGRESS_REGISTER);
// 鑾峰彇鍑哄叆搴撻厤缃俊鎭�
List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId);
- //鏍规嵁鍑哄叆搴撹澶囦俊鎭瓫閫夊湴纾呴厤缃俊鎭紝鎵�鏈夊湴纾咃紝鏀寔鐢ㄦ埛鎵嬪姩閫夋嫨
- List<InoutConf> listWeight = inoutManager.getInoutConf(listInoutConf, Constant.CONF_TYPE_30);
- view.put("listWeight", listWeight);
+ // 杞︾墝璇嗗埆鍙傛暟灏佽
+ InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_10, Constant.PROGRESS_REGISTER, 1);
+ view.put("lprDto", conf);
- // 鑾峰彇褰撳墠鍦扮
- InoutConf weightDto = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_30);
- view.put("weightDto", weightDto);
-
- // 杩囩▼鎽勫儚澶�1
- InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 1);
- view.put("snapDto1", conf);
-
- // 杩囩▼鎽勫儚澶�2
- conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 2);
- view.put("snapDto2", conf);
-
- // 杩囩▼鎽勫儚澶�3
- conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 3);
- view.put("snapDto3", conf);
-
- return prefix + "/inout-register";
+ return prefix + "/register";
}
/**
@@ -120,15 +105,14 @@
* @return
*/
@RequestMapping("/check")
- public String check(HttpServletRequest httpRequest, ModelMap view) {
+ public String check(ModelMap view) {
SysUser user = ContextUtil.getLoginUser();
view.put(Constant.MODEL_KEY_LOGIN_USER, user);
String deptId = ContextUtil.subDeptId(user);
-
- view.put("type", Constant.TYPE_IN);
view.put("deptId", deptId);
+ view.put("type", Constant.TYPE_IN);
// 浠撳簱鍒楄〃鍋氫笅鎷夋浣跨敤
List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
@@ -141,14 +125,13 @@
// 褰撳墠娴佺▼鑺傜偣
view.put("progress", Constant.PROGRESS_CHECK);
- // 绮鍝佺涓嬫媺妗�
- List<SysDictData> listFoodVariety = commonManager.getDicTrigger(
- Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
- view.put("listFoodVariety", listFoodVariety);
+ // 绫诲瀷鍒楄〃
+ List<SysDictData> listInoutType = commonManager.getInoutType();
+ view.put("listInoutType", listInoutType);
- // 绮鎬ц川涓嬫媺妗�
- List<SysDictData> listFoodType = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_TYPE, user.getCompanyId());
- view.put("listFoodType", listFoodType);
+ // 绮鍝佺涓嬫媺妗�
+ List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
+ view.put("listFoodVariety", listFoodVariety);
// 绮绛夌骇涓嬫媺妗�
List<SysDictData> listFoodLevel = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
@@ -157,9 +140,8 @@
view.put("endTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
view.put("startTime", DateFormatUtils.format(DateUtil.getNewByDay(null, -30), "yyyy-MM-dd"));
- return prefix + "/inout-check";
+ return prefix + "/check";
}
-
/**
* 鍏ュ簱绉伴噸鎿嶄綔锛屽寘鎷┖杞︾О閲嶅拰婊¤溅绉伴噸锛屽叡鐢ㄤ竴涓〉闈�
@@ -171,8 +153,12 @@
public String weight(HttpServletRequest httpRequest,
@RequestParam(value = "sort", required = false) String sort,
@RequestParam(value = "type", required = false) String type,
+ @RequestParam(value = "viewTag", required = false) String viewTag,
ModelMap view) {
+ if (StringUtils.isEmpty(viewTag)) {
+ viewTag = "1";
+ }
//濡傛灉娌℃湁鎸囧畾鍦扮锛屼粠鐢ㄦ埛涓婁竴涓�夋嫨涓幏鍙�
if (StringUtils.isEmpty(sort)) {
sort = "1";
@@ -189,25 +175,27 @@
SysUser user = ContextUtil.getLoginUser();
view.put(Constant.MODEL_KEY_LOGIN_USER, user);
-
String deptId = ContextUtil.subDeptId(user);
- view.put("type", type);
view.put("deptId", deptId);
- // 浠撳簱鍒楄〃鍋氫笅鎷夋浣跨敤
- List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
- view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
+ //绉伴噸鏄惁鍙紪杈戞爣绛�
+ String weightEditTag = inoutManager.getWeightEditTag(user.getCompanyId(), deptId);
+ view.put("weightEditTag", weightEditTag);
// 褰撳墠娴佺▼鏍囩
view.put("progress", Constant.PROGRESS_WEIGHT_TAG);
//鍏ュ簱娴佺▼閰嶇疆
- String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), deptId, Constant.TYPE_IN);
+ String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), deptId, type);
view.put("inoutProgress", inoutProgress);
- //绉伴噸鏄惁鍙紪杈戞爣绛�
- String weightEditTag = inoutManager.getWeightEditTag(user.getCompanyId(), deptId);
- view.put("weightEditTag", weightEditTag);
+ // 绫诲瀷
+ List<SysDictData> listInoutType = commonManager.getInoutType();
+ view.put("listInoutType", listInoutType);
+
+ // 浠撳簱鍒楄〃鍋氫笅鎷夋浣跨敤
+ List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
+ view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
// 绮鍝佺涓嬫媺妗�
List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
@@ -236,127 +224,21 @@
conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 3);
view.put("snapDto3", conf);
- return prefix + "/inout-weight";
- }
-
- /**
- * 鍑哄簱鐧昏
- *
- * @param sort 琛ㄧず浣跨敤鐨勫嚭鍏ュ簱璁惧閰嶅鍙凤紝涓嶄紶閫掗粯璁や负1
- * @return
- */
- @RequestMapping("/out-register")
- public String outRegister(HttpServletRequest httpRequest,
- @RequestParam(value = "sort", required = false) String sort,
- ModelMap view) {
-
- SysUser user = ContextUtil.getLoginUser();
- view.put(Constant.MODEL_KEY_LOGIN_USER, user);
-
- if (StringUtils.isEmpty(sort)) {
- sort = inoutManager.getInoutWeightByClient(httpRequest);
- }
-
- if (StringUtils.isEmpty(sort)) {
- sort = "1";
- }
-
- String deptId = ContextUtil.subDeptId(user);
- view.put("type", Constant.TYPE_OUT);
- view.put("deptId", deptId);
-
- // 绫诲瀷
- List<SysDictData> listInoutType = commonManager.getInoutType();
- view.put("listInoutType", listInoutType);
-
- //鍏ュ簱娴佺▼
- String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(), ContextUtil.subDeptId(user), Constant.TYPE_OUT);
- view.put("inoutProgress", inoutProgress);
- // 褰撳墠娴佺▼鑺傜偣
- view.put("progress", Constant.PROGRESS_REGISTER);
-
- // 鑾峰彇鍑哄叆搴撻厤缃俊鎭�
- List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId);
-
- // 杞︾墝璇嗗埆鍙傛暟灏佽
- InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_10, Constant.PROGRESS_REGISTER, 1);
- view.put("lprDto", conf);
-
- return prefix + "/out-register";
- }
-
- /**
- * 鍑哄簱绠�鏄撴搷浣滈〉闈�
- *
- * @param sort 琛ㄧず浣跨敤鐨勫嚭鍏ュ簱璁惧閰嶅鍙凤紝涓嶄紶閫掗粯璁や负1
- * @return
- */
- @RequestMapping("/out-easy")
- public String outEasy(@RequestParam(value = "sort", required = false) String sort,
- @RequestParam(value = "type", required = false) String type,
- ModelMap view) {
-
- SysUser user = ContextUtil.getLoginUser();
- view.put(Constant.MODEL_KEY_LOGIN_USER, user);
-
- view.put("type", Constant.TYPE_OUT);
- String deptId = ContextUtil.subDeptId(user);
- view.put("deptId", deptId);
-
- // 浠撳簱鍒楄〃鍋氫笅鎷夋浣跨敤
- List<Depot> listDepot = commonManager.listDepotByDeptId(deptId);
- view.put(Constant.MODEL_KEY_DEPOT_LIST, listDepot);
-
- //鍏ュ簱娴佺▼
- String inoutProgress = inoutManager.getInoutProgressConf(user.getCompanyId(),
- ContextUtil.subDeptId(user), Constant.TYPE_IN);
- view.put("inoutProgress", inoutProgress);
-
-
- // 绮鍝佺涓嬫媺妗�
- List<SysDictData> listFoodVariety = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_VARIETY, user.getCompanyId());
- view.put("listFoodVariety", listFoodVariety);
-
- // 绮鎬ц川涓嬫媺妗�
- List<SysDictData> listFoodType = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_TYPE, user.getCompanyId());
- view.put("listFoodType", listFoodType);
-
- // 绮绛夌骇涓嬫媺妗�
- List<SysDictData> listFoodLevel = commonManager.getDicTrigger(Constant.TRIGGER_PARENT_FOOD_LEVEL, user.getCompanyId());
- view.put("listFoodLevel", listFoodLevel);
-
- // 绫诲瀷
- List<SysDictData> listInoutType = commonManager.getInoutType();
- view.put("listInoutType", listInoutType);
-
- // 褰撳墠娴佺▼鏍囩
- view.put("progress", Constant.PROGRESS_WEIGHT_TAG);
-
- // 鑾峰彇鍑哄叆搴撻厤缃俊鎭�
- List<InoutConf> listInoutConf = inoutManager.getListInoutConf(user.getCompanyId(), deptId);
-
- // 鑾峰彇鍦扮淇℃伅
- InoutConf weightDto = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_30);
- view.put("weightDto", weightDto);
-
- // 杩囩▼鎽勫儚澶�1
- InoutConf conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 1);
- view.put("snapDto1", conf);
-
- // 杩囩▼鎽勫儚澶�2
- conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 2);
- view.put("snapDto2", conf);
-
- // 杩囩▼鎽勫儚澶�3
- conf = inoutManager.getInoutConf(listInoutConf, sort, Constant.CONF_TYPE_60, Constant.PROGRESS_WEIGHT_TAG, 3);
- view.put("snapDto3", conf);
-
//榛樿鏌ヨ鏃堕棿
view.put("endTime", DateFormatUtils.format(new Date(), "yyyy-MM-dd"));
view.put("startTime", DateFormatUtils.format(DateUtil.getNewByDay(null, -30), "yyyy-MM-dd"));
- return prefix + "/out-easy";
+
+ String viewStr = prefix + "/weight";
+ if ("1".equals(viewTag)) {
+ viewStr = prefix + "/weight";
+ }
+ if ("2".equals(viewTag)) {
+ viewStr = prefix + "/weight2";
+ }
+ return viewStr;
}
+
/**
* 鍒嗛〉鑾峰彇娴佺▼鏈畬鎴愮殑鏁版嵁
@@ -368,6 +250,18 @@
@ResponseBody
public PageResponse<Page<InoutRecord>> pageInoutData(@RequestBody InoutParam param) {
return inoutManager.pageInoutData(param);
+ }
+
+ /**
+ * 鑾峰彇寰呯О閲嶇殑鏁版嵁
+ *
+ * @param param
+ * @return
+ */
+ @RequestMapping("/list-weight-data")
+ @ResponseBody
+ public PageResponse<List<InoutRecord>> listWeightData(@RequestBody InoutParam param) {
+ return inoutManager.listWeightData(param);
}
/**
@@ -437,4 +331,39 @@
return inoutManager.submitHandle(data);
}
+
+ /**
+ * 鑾峰彇琛屾斂鍖哄煙
+ *
+ * @return
+ */
+ @RequestMapping("/page-dicArea")
+ @ResponseBody
+ public PageResponse<Page<DicArea>> pageDicArea(@RequestBody IgdsBaseParam param) {
+
+ return inoutManager.pageDicArea(param);
+ }
+
+ /**
+ * 鍏ュ簱閫氱煡鍗�-鑾峰彇娌℃湁瀹屾垚鐨勯�氱煡鍗曞垪琛�
+ *
+ * @return
+ */
+ @RequestMapping("/list-notice-in")
+ @ResponseBody
+ public PageResponse<List<InoutNoticeIn>> listNoticeIn(@RequestBody NoticeParam param) {
+ return inoutManager.listNoticeIn(param);
+ }
+
+
+ /**
+ * 鍑哄簱閫氱煡鍗�-鑾峰彇娌℃湁瀹屾垚鐨勯�氱煡鍗曞垪琛�
+ *
+ * @return
+ */
+ @RequestMapping("/list-notice-out")
+ @ResponseBody
+ public PageResponse<List<InoutNoticeOut>> listNoticeOut(@RequestBody NoticeParam param) {
+ return inoutManager.listNoticeOut(param);
+ }
}
--
Gitblit v1.9.3