From a167c1ba9816896114debe769b8247a72f3a1a99 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期二, 23 九月 2025 12:33:33 +0800
Subject: [PATCH] 缓冲区功能调整
---
src/main/java/com/zy/asrs/entity/LocCache.java | 3
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java | 22 +-
src/main/java/com/zy/asrs/mapper/WrkMastLogMapper.java | 2
src/main/java/com/zy/asrs/entity/WrkMast.java | 3
src/main/webapp/static/js/locCache/locCache.js | 22 ++
src/main/java/com/zy/asrs/entity/WrkMastLog.java | 217 ++++++++++++++++---------------
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 3
src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java | 28 +++
src/main/webapp/views/locCache/locCache.html | 3
src/main/webapp/static/js/common.js | 22 +++
src/main/webapp/views/locCache/locDetail.html | 93 +++++++++++++
11 files changed, 294 insertions(+), 124 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/LocCache.java b/src/main/java/com/zy/asrs/entity/LocCache.java
index 8f7800c..8fad291 100644
--- a/src/main/java/com/zy/asrs/entity/LocCache.java
+++ b/src/main/java/com/zy/asrs/entity/LocCache.java
@@ -156,6 +156,9 @@
@TableField("area_name")
private String areaName;
+ @ApiModelProperty("浼樺厛绾�")
+ private Integer sort;
+
/**
* 鏄惁鍐荤粨,0.鏈喕缁擄紝1.宸插喕缁�
*/
diff --git a/src/main/java/com/zy/asrs/entity/WrkMast.java b/src/main/java/com/zy/asrs/entity/WrkMast.java
index 1fb3f13..1bf9d7a 100644
--- a/src/main/java/com/zy/asrs/entity/WrkMast.java
+++ b/src/main/java/com/zy/asrs/entity/WrkMast.java
@@ -22,11 +22,12 @@
private static final long serialVersionUID = 1L;
+ private Long id;
+
/**
* 宸ヤ綔鍙�
*/
@ApiModelProperty(value= "宸ヤ綔鍙�")
- @TableId(value = "wrk_no", type = IdType.INPUT)
@TableField("wrk_no")
private Integer wrkNo;
diff --git a/src/main/java/com/zy/asrs/entity/WrkMastLog.java b/src/main/java/com/zy/asrs/entity/WrkMastLog.java
index 77b7e24..820f59d 100644
--- a/src/main/java/com/zy/asrs/entity/WrkMastLog.java
+++ b/src/main/java/com/zy/asrs/entity/WrkMastLog.java
@@ -25,481 +25,488 @@
/**
* 缂栧彿
*/
- @ApiModelProperty(value= "缂栧彿")
+ @ApiModelProperty(value = "缂栧彿")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
+
+ @ApiModelProperty("鏃ュ織ID")
+ private Long logId;
/**
* 宸ヤ綔鍙�
*/
- @ApiModelProperty(value= "宸ヤ綔鍙�")
+ @ApiModelProperty(value = "宸ヤ綔鍙�")
@TableField("wrk_no")
private Integer wrkNo;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("inv_wh")
private String invWh;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
private Date ymd;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
private String mk;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("whs_type")
private Integer whsType;
/**
* 宸ヤ綔鐘舵��
*/
- @ApiModelProperty(value= "宸ヤ綔鐘舵��")
+ @ApiModelProperty(value = "宸ヤ綔鐘舵��")
@TableField("wrk_sts")
private Integer wrkSts;
/**
* 鍏ュ嚭搴撶被鍨�
*/
- @ApiModelProperty(value= "鍏ュ嚭搴撶被鍨�")
+ @ApiModelProperty(value = "鍏ュ嚭搴撶被鍨�")
@TableField("io_type")
private Integer ioType;
/**
* 鍫嗗灈鏈哄彿
*/
- @ApiModelProperty(value= "鍫嗗灈鏈哄彿")
+ @ApiModelProperty(value = "鍫嗗灈鏈哄彿")
@TableField("crn_no")
private Integer crnNo;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("sheet_no")
private String sheetNo;
/**
* 浼樺厛绾�
*/
- @ApiModelProperty(value= "浼樺厛绾�")
+ @ApiModelProperty(value = "浼樺厛绾�")
@TableField("io_pri")
private Double ioPri;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("wrk_date")
private Date wrkDate;
/**
* 鐩爣搴撲綅
*/
- @ApiModelProperty(value= "鐩爣搴撲綅")
+ @ApiModelProperty(value = "鐩爣搴撲綅")
@TableField("loc_no")
private String locNo;
/**
* 鐩爣绔�
*/
- @ApiModelProperty(value= "鐩爣绔�")
+ @ApiModelProperty(value = "鐩爣绔�")
@TableField("sta_no")
private Integer staNo;
/**
* 婧愮珯
*/
- @ApiModelProperty(value= "婧愮珯")
+ @ApiModelProperty(value = "婧愮珯")
@TableField("source_sta_no")
private Integer sourceStaNo;
/**
* 婧愬簱浣�
*/
- @ApiModelProperty(value= "婧愬簱浣�")
+ @ApiModelProperty(value = "婧愬簱浣�")
@TableField("source_loc_no")
private String sourceLocNo;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("loc_sts")
private String locSts;
/**
* 鎷f枡
*/
- @ApiModelProperty(value= "鎷f枡")
+ @ApiModelProperty(value = "鎷f枡")
private String picking;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("link_mis")
private String linkMis;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("online_yn")
private String onlineYn;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("upd_mk")
private String updMk;
/**
* 閫�鍑�
*/
- @ApiModelProperty(value= "閫�鍑�")
+ @ApiModelProperty(value = "閫�鍑�")
@TableField("exit_mk")
private String exitMk;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("plt_type")
private Integer pltType;
/**
* 绌烘澘
*/
- @ApiModelProperty(value= "绌烘澘")
+ @ApiModelProperty(value = "绌烘澘")
@TableField("empty_mk")
private String emptyMk;
/**
* 宸ヤ綔鏃堕棿
*/
- @ApiModelProperty(value= "宸ヤ綔鏃堕棿")
+ @ApiModelProperty(value = "宸ヤ綔鏃堕棿")
@TableField("io_time")
private Date ioTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("ctn_type")
private Integer ctnType;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
private String packed;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("ove_mk")
private String oveMk;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("mtn_type")
private Double mtnType;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("user_no")
private String userNo;
/**
* 鍫嗗灈鏈哄惎鍔ㄦ椂闂�
*/
- @ApiModelProperty(value= "鍫嗗灈鏈哄惎鍔ㄦ椂闂�")
+ @ApiModelProperty(value = "鍫嗗灈鏈哄惎鍔ㄦ椂闂�")
@TableField("crn_str_time")
private Date crnStrTime;
/**
* 鍫嗗灈鏈哄仠姝㈡椂闂�
*/
- @ApiModelProperty(value= "鍫嗗灈鏈哄仠姝㈡椂闂�")
+ @ApiModelProperty(value = "鍫嗗灈鏈哄仠姝㈡椂闂�")
@TableField("crn_end_time")
private Date crnEndTime;
/**
* 鎷f枡鏃堕棿
*/
- @ApiModelProperty(value= "鎷f枡鏃堕棿")
+ @ApiModelProperty(value = "鎷f枡鏃堕棿")
@TableField("plc_str_time")
private Date plcStrTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("crn_pos_time")
private Date crnPosTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("load_time")
private Double loadTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("exp_time")
private Double expTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("ref_wrkno")
private Double refWrkno;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("ref_iotime")
private Date refIotime;
/**
* 淇敼浜哄憳
*/
- @ApiModelProperty(value= "淇敼浜哄憳")
+ @ApiModelProperty(value = "淇敼浜哄憳")
@TableField("modi_user")
private Long modiUser;
/**
* 淇敼鏃堕棿
*/
- @ApiModelProperty(value= "淇敼鏃堕棿")
+ @ApiModelProperty(value = "淇敼鏃堕棿")
@TableField("modi_time")
private Date modiTime;
/**
* 鍒涘缓鑰�
*/
- @ApiModelProperty(value= "鍒涘缓鑰�")
+ @ApiModelProperty(value = "鍒涘缓鑰�")
@TableField("appe_user")
private Long appeUser;
/**
* 娣诲姞鏃堕棿
*/
- @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ @ApiModelProperty(value = "娣诲姞鏃堕棿")
@TableField("appe_time")
private Date appeTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("pause_mk")
private String pauseMk;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("error_time")
private Date errorTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("error_memo")
private String errorMemo;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("ctn_kind")
private Integer ctnKind;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("manu_type")
private String manuType;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("memo_m")
private String memoM;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("sc_weight")
private Double scWeight;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("log_mk")
private String logMk;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("log_err_time")
private Date logErrTime;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("log_err_memo")
private String logErrMemo;
/**
* 鏉$爜
*/
- @ApiModelProperty(value= "鏉$爜")
+ @ApiModelProperty(value = "鏉$爜")
private String barcode;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("Pdc_type")
private String PdcType;
- @ApiModelProperty(value= "")
+ @ApiModelProperty(value = "")
@TableField("ctn_no")
private String ctnNo;
/**
* 婊℃澘
*/
- @ApiModelProperty(value= "婊℃澘")
+ @ApiModelProperty(value = "婊℃澘")
@TableField("full_plt")
private String fullPlt;
/**
* 鍏堝叆鍝� / 鍙岄噸鍏ュ簱
*/
- @ApiModelProperty(value= "鍏堝叆鍝�")
+ @ApiModelProperty(value = "鍏堝叆鍝�")
@TableField("pre_have")
private String preHave;
/**
* 绌烘搷浣� / 鍙栬揣鏃犵
*/
- @ApiModelProperty(value= "绌烘搷浣�")
+ @ApiModelProperty(value = "绌烘搷浣�")
@TableField("take_none")
private String takeNone;
- public WrkMastLog() {}
+ public WrkMastLog() {
+ }
- public String getWrkNo$(){
+ public String getWrkNo$() {
WrkMastService service = SpringUtils.getBean(WrkMastService.class);
WrkMast wrkMast = service.selectById(this.wrkNo);
- if (!Cools.isEmpty(wrkMast)){
+ if (!Cools.isEmpty(wrkMast)) {
return String.valueOf(wrkMast.getWrkNo());
}
return null;
}
- public String getYmd$(){
- if (Cools.isEmpty(this.ymd)){
+ public String getYmd$() {
+ if (Cools.isEmpty(this.ymd)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ymd);
}
- public String getWrkSts$(){
+ public String getWrkSts$() {
BasWrkStatusService service = SpringUtils.getBean(BasWrkStatusService.class);
BasWrkStatus basWrkStatus = service.selectById(this.wrkSts);
- if (!Cools.isEmpty(basWrkStatus)){
+ if (!Cools.isEmpty(basWrkStatus)) {
return String.valueOf(basWrkStatus.getWrkDesc());
}
return null;
}
- public long getWrkSts(){
- return (long)this.wrkSts;
+ public long getWrkSts() {
+ if (wrkSts == null) {
+ return 0;
+ }
+ return (long) this.wrkSts;
}
- public String getIoType$(){
+ public String getIoType$() {
BasWrkIotypeService service = SpringUtils.getBean(BasWrkIotypeService.class);
BasWrkIotype basWrkIotype = service.selectById(this.ioType);
- if (!Cools.isEmpty(basWrkIotype)){
+ if (!Cools.isEmpty(basWrkIotype)) {
return String.valueOf(basWrkIotype.getIoDesc());
}
return null;
}
- public String getCrnNo$(){
+ public String getCrnNo$() {
BasCrnpService service = SpringUtils.getBean(BasCrnpService.class);
BasCrnp basCrnp = service.selectById(this.crnNo);
- if (!Cools.isEmpty(basCrnp)){
+ if (!Cools.isEmpty(basCrnp)) {
return String.valueOf(basCrnp.getCrnNo());
}
return null;
}
- public String getWrkDate$(){
- if (Cools.isEmpty(this.wrkDate)){
+ public String getWrkDate$() {
+ if (Cools.isEmpty(this.wrkDate)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.wrkDate);
}
- public String getLocNo$(){
+ public String getLocNo$() {
LocMastService service = SpringUtils.getBean(LocMastService.class);
LocMast locMast = service.selectById(this.locNo);
- if (!Cools.isEmpty(locMast)){
+ if (!Cools.isEmpty(locMast)) {
return String.valueOf(locMast.getLocNo());
}
return null;
}
- public String getStaNo$(){
+ public String getStaNo$() {
BasDevpService service = SpringUtils.getBean(BasDevpService.class);
BasDevp basDevp = service.selectById(this.staNo);
- if (!Cools.isEmpty(basDevp)){
+ if (!Cools.isEmpty(basDevp)) {
return String.valueOf(basDevp.getDevNo());
}
return null;
}
- public String getSourceStaNo$(){
+ public String getSourceStaNo$() {
BasDevpService service = SpringUtils.getBean(BasDevpService.class);
BasDevp basDevp = service.selectById(this.sourceStaNo);
- if (!Cools.isEmpty(basDevp)){
+ if (!Cools.isEmpty(basDevp)) {
return String.valueOf(basDevp.getDevNo());
}
return null;
}
- public String getSourceLocNo$(){
+ public String getSourceLocNo$() {
LocMastService service = SpringUtils.getBean(LocMastService.class);
LocMast locMast = service.selectById(this.sourceLocNo);
- if (!Cools.isEmpty(locMast)){
+ if (!Cools.isEmpty(locMast)) {
return String.valueOf(locMast.getLocNo());
}
return null;
}
- public String getIoTime$(){
- if (Cools.isEmpty(this.ioTime)){
+ public String getIoTime$() {
+ if (Cools.isEmpty(this.ioTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime);
}
- public String getCrnStrTime$(){
- if (Cools.isEmpty(this.crnStrTime)){
+ public String getCrnStrTime$() {
+ if (Cools.isEmpty(this.crnStrTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnStrTime);
}
- public String getCrnEndTime$(){
- if (Cools.isEmpty(this.crnEndTime)){
+ public String getCrnEndTime$() {
+ if (Cools.isEmpty(this.crnEndTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnEndTime);
}
- public String getPlcStrTime$(){
- if (Cools.isEmpty(this.plcStrTime)){
+ public String getPlcStrTime$() {
+ if (Cools.isEmpty(this.plcStrTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.plcStrTime);
}
- public String getCrnPosTime$(){
- if (Cools.isEmpty(this.crnPosTime)){
+ public String getCrnPosTime$() {
+ if (Cools.isEmpty(this.crnPosTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.crnPosTime);
}
- public String getRefIotime$(){
- if (Cools.isEmpty(this.refIotime)){
+ public String getRefIotime$() {
+ if (Cools.isEmpty(this.refIotime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.refIotime);
}
- public String getModiUser$(){
+ public String getModiUser$() {
UserService service = SpringUtils.getBean(UserService.class);
User user = service.selectById(this.modiUser);
- if (!Cools.isEmpty(user)){
+ if (!Cools.isEmpty(user)) {
return String.valueOf(user.getUsername());
}
return null;
}
- public String getModiTime$(){
- if (Cools.isEmpty(this.modiTime)){
+ public String getModiTime$() {
+ if (Cools.isEmpty(this.modiTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
}
- public String getAppeUser$(){
+ public String getAppeUser$() {
UserService service = SpringUtils.getBean(UserService.class);
User user = service.selectById(this.appeUser);
- if (!Cools.isEmpty(user)){
+ if (!Cools.isEmpty(user)) {
return String.valueOf(user.getUsername());
}
return null;
}
- public String getAppeTime$(){
- if (Cools.isEmpty(this.appeTime)){
+ public String getAppeTime$() {
+ if (Cools.isEmpty(this.appeTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
}
- public String getErrorTime$(){
- if (Cools.isEmpty(this.errorTime)){
+ public String getErrorTime$() {
+ if (Cools.isEmpty(this.errorTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.errorTime);
}
- public String getLogErrTime$(){
- if (Cools.isEmpty(this.logErrTime)){
+ public String getLogErrTime$() {
+ if (Cools.isEmpty(this.logErrTime)) {
return "";
}
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.logErrTime);
diff --git a/src/main/java/com/zy/asrs/mapper/WrkMastLogMapper.java b/src/main/java/com/zy/asrs/mapper/WrkMastLogMapper.java
index 27eaca7..15c5c77 100644
--- a/src/main/java/com/zy/asrs/mapper/WrkMastLogMapper.java
+++ b/src/main/java/com/zy/asrs/mapper/WrkMastLogMapper.java
@@ -15,7 +15,7 @@
@Repository
public interface WrkMastLogMapper extends BaseMapper<WrkMastLog> {
- @Insert("insert into asr_wrk_mast_log select * from asr_wrk_mast where wrk_no=#{workNo}")
+ @Insert("insert into asr_wrk_mast_log select *, id as log_id from asr_wrk_mast where wrk_no=#{workNo}")
int save(Integer workNo);
/**
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 9048fa9..c48df3a 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -572,7 +572,6 @@
// 鏃犲崟缁勬墭
if (Cools.isEmpty(param.getOrderNo())) {
-
// 鐢熸垚鍏ュ簱閫氱煡妗�
List<DetlDto> detlDtos = new ArrayList<>();
param.getCombMats().forEach(elem -> {
@@ -1202,7 +1201,7 @@
wrkMast.setFullPlt("Y"); // 婊℃澘锛歒
wrkMast.setPicking("N"); // 鎷f枡
wrkMast.setExitMk("N"); // 閫�鍑�
- wrkMast.setSourceStaNo(orgSite);
+ wrkMast.setSourceLocNo(orgSite);
wrkMast.setEmptyMk(loc.getLocSts().equals("D") ? "Y" : "N"); // 绌烘澘
wrkMast.setBarcode(barcode); // 鎵樼洏鐮�
wrkMast.setLinkMis("N");
diff --git a/src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java
index 149724b..0321a08 100644
--- a/src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WrkMastLogServiceImpl.java
@@ -1,22 +1,48 @@
package com.zy.asrs.service.impl;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.core.common.R;
+import com.core.exception.CoolException;
import com.zy.asrs.entity.InventoryFlowDto;
+import com.zy.asrs.entity.WrkMast;
import com.zy.asrs.entity.WrkMastLog;
import com.zy.asrs.mapper.WrkMastLogMapper;
import com.zy.asrs.service.WrkMastLogService;
+import com.zy.asrs.service.WrkMastService;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
import java.util.Map;
+import java.util.Objects;
@Service("wrkMastLogService")
public class WrkMastLogServiceImpl extends ServiceImpl<WrkMastLogMapper, WrkMastLog> implements WrkMastLogService {
+ @Autowired
+ private WrkMastService wrkMastService;
+ @Autowired
+ private WrkMastLogService wrkMastLogService;
+
@Override
+ @Transactional(rollbackFor = Exception.class)
public boolean save(Integer workNo) {
- return this.baseMapper.save(workNo) > 0;
+ WrkMast mast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("wrk_no", workNo));
+ if (Objects.isNull(mast)) {
+ throw new CoolException("鏁版嵁閿欒锛氫换鍔′笉瀛樺湪锛侊紒");
+ }
+ WrkMastLog mastLog = new WrkMastLog();
+ BeanUtils.copyProperties(mast, mastLog);
+ mastLog.setLogId(mast.getId());
+
+ if (!wrkMastLogService.insert(mastLog)) {
+ throw new CoolException("浠诲姟鏃ュ織淇濆瓨澶辫触锛侊紒");
+ }
+
+ return true;
}
@Override
diff --git a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
index f9b67b0..ea7db5a 100644
--- a/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -59,7 +59,6 @@
return SUCCESS;
}
- @Transactional(rollbackFor = Exception.class)
public ReturnT<String> doIn(WrkMast wrkMast) {
if (wrkMast.getTaskType().equals("agv")) {
Date now = new Date();
@@ -67,12 +66,11 @@
if (Objects.isNull(locCache)) {
throw new CoolException("鏁版嵁閿欒锛屽簱浣嶄笉瀛樺湪锛侊紒");
}
- List<WaitPakin> apallet = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("apallet", wrkMast.getBarcode()));
+ List<WaitPakin> apallet = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode()));
if (Objects.isNull(apallet)) {
throw new CoolException("鏁版嵁閿欒锛氱粍鎵樻暟鎹笉瀛樺湪锛侊紒");
}
- List<LocDetl> detls = new ArrayList<>();
apallet.forEach(pakin -> {
LocDetl detl = new LocDetl();
BeanUtils.copyProperties(pakin, detl);
@@ -88,19 +86,25 @@
.setAreaName(locCache.getAreaName())
.setUnit(pakin.getUnit())
.setBatch(pakin.getBatch());
- detls.add(detl);
- });
- if (!locDetlService.insertBatch(detls)) {
- throw new CoolException("搴撲綅鏄庣粏淇濆瓨澶辫触锛侊紒");
- }
+ if (!locDetlService.insert(detl)) {
+ throw new CoolException("搴撲綅鏄庣粏淇濆瓨澶辫触锛侊紒");
+ }
+ });
locCache.setLocSts(LocStsType.LOC_STS_TYPE_F.type);
locCache.setModiTime(new Date());
-
+ locCache.setBarcode("");
+ locCache.setModiTime(new Date());
+ locCache.setIoTime(new Date());
if (!locCacheService.updateById(locCache)) {
throw new CoolException("搴撲綅鐘舵�佷慨鏀瑰け璐ワ紒");
}
+ wrkMast.setWrkSts(5L);
+ wrkMast.setModiTime(new Date());
+ if (!wrkMastService.updateById(wrkMast)) {
+ throw new CoolException("浠诲姟鐘舵�佷慨鏀瑰け璐ワ紒锛�");
+ }
} else {
Date now = new Date();
LocMast locMast = locMastService.selectById(wrkMast.getLocNo());
diff --git a/src/main/webapp/static/js/common.js b/src/main/webapp/static/js/common.js
index 286afbc..a6cda0d 100644
--- a/src/main/webapp/static/js/common.js
+++ b/src/main/webapp/static/js/common.js
@@ -218,6 +218,28 @@
,{field: 'updateBy$', align: 'center',title: '淇敼浜哄憳', hide: true}
,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿', hide: true}
,{field: 'memo', align: 'center',title: '澶囨敞', hide: true}
+
+]
+
+var cacheCols = [
+ {field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿锛堝搧鍙凤級', sort:true}
+ ,{field: 'maktx', align: 'center',title: '鍟嗗搧鍚嶇О锛堝搧鍚嶏級', sort:true}
+ ,{field: 'batch', align: 'center',title: '璐у搧鐗瑰緛', sort:true}
+ ,{field: 'anfme', align: 'center',title: '鏁伴噺', hide: false}
+ ,{field: 'specs', align: 'center',title: '瑙勬牸', hide: false}
+ ,{field: 'model', align: 'center',title: '浠g爜', hide: true}
+ ,{field: 'color', align: 'center',title: '棰滆壊', hide: true}
+ ,{field: 'brand', align: 'center',title: '鍝佺墝', hide: true}
+ ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: false}
+ ,{field: 'frozen$', align: 'center',title: '鍐荤粨鍚�',hide: true,
+ templet: function(d) {
+ // 鏍规嵁鏉′欢鍒ゆ柇瀛椾綋棰滆壊
+ if (d.frozen$ === '宸插喕缁�') {
+ return '<span style="color: #34a8de;">' +d.frozen$ + '</span>';
+ } else {
+ return '<span">' +d.frozen$ + '</span>';
+ }
+ }}
]
var detlCols = [
diff --git a/src/main/webapp/static/js/locCache/locCache.js b/src/main/webapp/static/js/locCache/locCache.js
index eeebfef..c2e12b0 100644
--- a/src/main/webapp/static/js/locCache/locCache.js
+++ b/src/main/webapp/static/js/locCache/locCache.js
@@ -36,10 +36,9 @@
field: 'lev1',
align: 'center',
title: '灞�'
- }, {field: 'locType', align: 'center', title: '搴撲綅绫诲瀷'}, {
- field: 'modiUser$',
- align: 'center',
- title: '淇敼浜哄憳'
+ }, {field: 'locType', align: 'center', title: '搴撲綅绫诲瀷'}
+ ,{field: 'sort', align: 'center', title: '浼樺厛绾�'}
+ ,{field: 'modiUser$', align: 'center', title: '淇敼浜哄憳'
}, {field: 'modiTime$', align: 'center', title: '淇敼鏃堕棿'}, {
field: 'appeUser$',
align: 'center',
@@ -133,7 +132,22 @@
// 鐩戝惉琛屽伐鍏蜂簨浠�
table.on('tool(locCache)', function (obj) {
var data = obj.data;
+ console.log(data)
switch (obj.event) {
+ case 'showDetl':
+ locNo = data?.locNo;
+ // 寮瑰眰鏄剧ず
+ layer.open({
+ type: 2,
+ title: '搴撲綅鏄庣粏',
+ maxmin: true,
+ area: [top.detailWidth, top.detailHeight],
+ shadeClose: true,
+ content: 'locDetail.html',
+ success: function(layero, index){
+ }
+ });
+ break;
case 'edit':
showEditModel(data);
break;
diff --git a/src/main/webapp/views/locCache/locCache.html b/src/main/webapp/views/locCache/locCache.html
index 0f81f03..b346397 100644
--- a/src/main/webapp/views/locCache/locCache.html
+++ b/src/main/webapp/views/locCache/locCache.html
@@ -193,7 +193,8 @@
</script>
<script type="text/html" id="operate">
- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>
+ <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="showDetl">鏄庣粏</a>
+<!-- <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>-->
<a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a>
</script>
diff --git a/src/main/webapp/views/locCache/locDetail.html b/src/main/webapp/views/locCache/locDetail.html
new file mode 100644
index 0000000..e509b24
--- /dev/null
+++ b/src/main/webapp/views/locCache/locDetail.html
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title></title>
+ <meta name="renderer" content="webkit">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
+ <link rel="stylesheet" href="../../static/css/cool.css" media="all">
+ <link rel="stylesheet" href="../../static/css/common.css" media="all">
+ <style>
+ </style>
+</head>
+<body>
+<div class="layui-inline" style="width:31%;margin-top: 20px">
+ <label class="layui-form-label">搴� 浣� 鍙凤細</label>
+ <div class="layui-input-inline">
+ <input id="locNo" class="layui-input" type="text" disabled="disabled">
+ </div>
+</div>
+<table class="layui-hide" id="locCacheDetls" lay-filter="locCacheDetls"></table>
+</body>
+<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
+<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
+<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script>
+<script type="text/javascript">
+ var pageCur;
+
+ function getCol() {
+ var cols = [
+ {field: 'locNo', align: 'center', title: '搴撲綅鍙�'}
+ , {field: 'ioTime$', align: 'center', title: '宸ヤ綔鏃堕棿'}
+ ];
+ cols.push.apply(cols, cacheCols);
+ return cols;
+ }
+
+ layui.use(['table', 'laydate', 'form'], function () {
+ table = layui.table;
+ var $ = layui.jquery;
+ var form = layui.form;
+
+ $('#locNo').val(parent.locNo);
+ // 鏁版嵁娓叉煋
+ tableIns1 = table.render({
+ elem: '#locCacheDetls',
+ headers: {token: localStorage.getItem('token')},
+ url: baseUrl + '/locDetl/list/auth',
+ where: {loc_no: parent.locNo},
+ page: true,
+ limit: 16,
+ limits: [16, 30, 50, 100, 200, 500],
+ even: true,
+ toolbar: '#toolbar',
+ cellMinWidth: 50,
+ cols: [getCol()],
+ request: {
+ pageName: 'curr',
+ pageSize: 'limit'
+ },
+ parseData: function (res) {
+ return {
+ 'code': res.code,
+ 'msg': res.msg,
+ 'count': res.data.total,
+ 'data': res.data.records
+ }
+ },
+ response: {
+ statusCode: 200
+ },
+ done: function (res, curr, count) {
+ if (res.code === 403) {
+ top.location.href = baseUrl + "/";
+ }
+ pageCur = curr;
+ form.on('checkbox(tableCheckbox)', function (data) {
+ var _index = $(data.elem).attr('table-index') || 0;
+ if (data.elem.checked) {
+ res.data[_index][data.value] = 'Y';
+ } else {
+ res.data[_index][data.value] = 'N';
+ }
+ });
+ }
+ });
+ });
+</script>
+</html>
+
--
Gitblit v1.9.1