From 6d5fcddb3dc64e069422160170752faecf3269ac Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期六, 02 四月 2022 15:37:44 +0800
Subject: [PATCH] #
---
src/main/webapp/views/adjDetl/adjDetl.html | 2
src/main/resources/mapper/ViewWorkInMapper.xml | 66 ++---
src/main/webapp/static/js/report/workIn.js | 2
src/main/resources/mapper/ViewStayTimeMapper.xml | 28 +
src/main/webapp/static/js/adjDetl/adjDetl.js | 5
src/main/java/com/zy/asrs/entity/ViewWorkInBean.java | 556 ++++++++++++++-----------------------------------
6 files changed, 218 insertions(+), 441 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
index 0d8a904..4ce76d7 100644
--- a/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
+++ b/src/main/java/com/zy/asrs/entity/ViewWorkInBean.java
@@ -1,6 +1,15 @@
package com.zy.asrs.entity;
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.core.common.Cools;
+import com.core.common.SpringUtils;
+import com.zy.system.entity.User;
+import com.zy.system.service.UserService;
+import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
/**
* 鍏ュ簱鏄庣粏缁熻
@@ -10,400 +19,162 @@
@Data
public class ViewWorkInBean {
- private int tbnum; //杞偍璇锋眰缂栧彿
- private int tbpos; //琛岄」鐩�
- private String zmatid; //鐗╂枡鏍囩ID
-
- private String matnr; //鐗╂枡
- private String maktx; //鐗╂枡鎻忚堪
- private String werks; //宸ュ巶
- private double anfme; //鏁伴噺
- private String altme; //鍗曚綅
- private String zpallet; //鎵樼洏鏉$爜
- private String bname; //鐢ㄦ埛ID
- private String lgnum; //瑙勬牸
- private String type; // 鐗╂枡绫诲埆
- private String color; // 棰滆壊
- private String supplier; // 渚涘簲鍟�
- private String warehouse; // 浠撳簱
- private String brand; // 鍝佺墝
-
- private String io_time;
- private String loc_no;
- private String mat_no;
- private String mat_name;
- private String str1;
- private String str2;
- private String str3;
- private String str4;
- private String str5;
- private String str6;
- private String str7;
- private String str8;
- private String str9;
- private String str10;
- private String str11;
- private String str12;
- private String str13;
- private String str14;
- private String str15;
- private String str16;
- private String str17;
- private String str18;
- private String str19;
- private String str20;
- private String str21;
- private String str22;
- private String str23;
- private Long ctns; //绠辨暟
- private Long qty; //鏁伴噺
- private double wt; //閲嶉噺
- private int pageNumber;
- private int pageSize;
- private String query_date;
- private String begin_date; //鏌ヨ寮�濮嬫棩鏈�
- private String end_date; //鏌ヨ鎴鏃ユ湡
- private double num1;
- private double num2;
- private double num3;
- private double num4;
- private double num5;
- private double num6;
- private String barcode;
- private String date1;
- private String crn_str_time;
- private String crn_end_time;
-
- public String getLgnum() {
- return lgnum;
+ private int pageNumber;
+ private int pageSize;
+
+ private int stay_time;
+
+ private String begin_date;
+ private String end_date;
+ private String query_date;
+
+ private Integer row;
+
+ @ApiModelProperty(value= "宸ヤ綔鍙�")
+ private Integer wrk_no;
+
+ @ApiModelProperty(value= "宸ヤ綔鏃堕棿")
+ private Date io_time;
+
+ @ApiModelProperty(value= "搴撲綅鍙�")
+ private String loc_no;
+
+ @ApiModelProperty(value= "鎵樼洏鏉$爜")
+ private String zpallet;
+
+ @ApiModelProperty(value= "鏁伴噺")
+ private Double anfme;
+
+ @ApiModelProperty(value= "鍟嗗搧缂栧彿")
+ private String matnr;
+
+ @ApiModelProperty(value= "鍟嗗搧鍚嶇О")
+ private String maktx;
+
+ @ApiModelProperty(value= "鎵瑰彿")
+ private String batch;
+
+ @ApiModelProperty(value= "鍗曟嵁缂栧彿")
+ @TableField("order_no")
+ private String orderNo;
+
+ @ApiModelProperty(value= "瑙勬牸")
+ private String specs;
+
+ @ApiModelProperty(value= "鍨嬪彿")
+ private String model;
+
+ @ApiModelProperty(value= "棰滆壊")
+ private String color;
+
+ @ApiModelProperty(value= "鍝佺墝")
+ private String brand;
+
+ @ApiModelProperty(value= "鍗曚綅")
+ private String unit;
+
+ @ApiModelProperty(value= "鍗曚环")
+ private Double price;
+
+ @ApiModelProperty(value= "sku")
+ private String sku;
+
+ @ApiModelProperty(value= "鍗曚綅閲�")
+ private Double units;
+
+ @ApiModelProperty(value= "鏉$爜")
+ private String barcode;
+
+ @ApiModelProperty(value= "浜у湴")
+ private String origin;
+
+ @ApiModelProperty(value= "鍘傚")
+ private String manu;
+
+ @ApiModelProperty(value= "鐢熶骇鏃ユ湡")
+ private String manu_date;
+
+ @ApiModelProperty(value= "鍝侀」鏁�")
+ private String item_num;
+
+ @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�")
+ private Double safe_qty;
+
+ @ApiModelProperty(value= "閲嶉噺")
+ private Double weight;
+
+ @ApiModelProperty(value= "闀垮害")
+ private Double length;
+
+ @ApiModelProperty(value= "浣撶Н")
+ private Double volume;
+
+ @ApiModelProperty(value= "涓夋柟缂栫爜")
+ private String three_code;
+
+ @ApiModelProperty(value= "渚涘簲鍟�")
+ private String supp;
+
+ @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�")
+ private String supp_code;
+
+ @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ")
+ private Integer be_batch;
+
+ @ApiModelProperty(value= "淇濊川鏈�")
+ private String dead_time;
+
+ @ApiModelProperty(value= "棰勮澶╂暟")
+ private Integer dead_warn;
+
+ @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ")
+ private Integer source;
+
+ @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ")
+ private Integer inspect;
+
+ @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ")
+ private Integer danger;
+
+ @ApiModelProperty(value= "淇敼浜哄憳")
+ private Long modi_user;
+
+ @ApiModelProperty(value= "淇敼鏃堕棿")
+ private Object modi_time;
+
+ @ApiModelProperty(value= "鍒涘缓鑰�")
+ private Long appe_user;
+
+ @ApiModelProperty(value= "娣诲姞鏃堕棿")
+ private Object appe_time;
+
+ @ApiModelProperty(value= "澶囨敞")
+ private String memo;
+
+ public String getModiUser$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.selectById(this.modi_user);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getUsername());
+ }
+ return null;
}
- public void setLgnum(String lgnum) {
- this.lgnum = lgnum;
+
+ public String getAppeUser$(){
+ UserService service = SpringUtils.getBean(UserService.class);
+ User user = service.selectById(this.appe_user);
+ if (!Cools.isEmpty(user)){
+ return String.valueOf(user.getUsername());
+ }
+ return null;
}
- public int getTbnum() {
- return tbnum;
- }
- public void setTbnum(int tbnum) {
- this.tbnum = tbnum;
- }
- public int getTbpos() {
- return tbpos;
- }
- public void setTbpos(int tbpos) {
- this.tbpos = tbpos;
- }
- public String getZmatid() {
- return zmatid;
- }
- public void setZmatid(String zmatid) {
- this.zmatid = zmatid;
- }
- public String getMatnr() {
- return matnr;
- }
- public void setMatnr(String matnr) {
- this.matnr = matnr;
- }
- public String getMaktx() {
- return maktx;
- }
- public void setMaktx(String maktx) {
- this.maktx = maktx;
- }
- public String getWerks() {
- return werks;
- }
- public void setWerks(String werks) {
- this.werks = werks;
- }
- public double getAnfme() {
- return anfme;
- }
- public void setAnfme(double anfme) {
- this.anfme = anfme;
- }
- public String getAltme() {
- return altme;
- }
- public void setAltme(String altme) {
- this.altme = altme;
- }
- public String getZpallet() {
- return zpallet;
- }
- public void setZpallet(String zpallet) {
- this.zpallet = zpallet;
- }
- public String getBname() {
- return bname;
- }
- public void setBname(String bname) {
- this.bname = bname;
- }
- public String getIo_time() {
- return io_time.substring(0,19);
- }
- public void setIo_time(String io_time) {
- this.io_time = io_time;
- }
- public String getLoc_no() {
- return loc_no;
- }
- public void setLoc_no(String loc_no) {
- this.loc_no = loc_no;
- }
- public String getMat_no() {
- return mat_no;
- }
- public void setMat_no(String mat_no) {
- this.mat_no = mat_no;
- }
- public String getMat_name() {
- return mat_name;
- }
- public void setMat_name(String mat_name) {
- this.mat_name = mat_name;
- }
- public String getStr1() {
- return str1;
- }
- public void setStr1(String str1) {
- this.str1 = str1;
- }
- public String getStr2() {
- return str2;
- }
- public void setStr2(String str2) {
- this.str2 = str2;
- }
- public Long getCtns() {
- return ctns;
- }
- public void setCtns(Long ctns) {
- this.ctns = ctns;
- }
- public Long getQty() {
- return qty;
- }
- public void setQty(Long qty) {
- this.qty = qty;
- }
- public double getWt() {
- return wt;
- }
- public void setWt(double wt) {
- this.wt = wt;
- }
- public int getPageNumber() {
- return pageNumber;
- }
- public void setPageNumber(int pageNumber) {
- this.pageNumber = pageNumber;
- }
- public int getPageSize() {
- return pageSize;
- }
- public void setPageSize(int pageSize) {
- this.pageSize = pageSize;
- }
- public String getBegin_date() {
- return begin_date;
- }
- public void setBegin_date(String begin_date) {
- this.begin_date = begin_date;
- }
- public String getEnd_date() {
- return end_date;
- }
- public void setEnd_date(String end_date) {
- this.end_date = end_date;
- }
- public String getStr3() {
- return str3;
- }
- public void setStr3(String str3) {
- this.str3 = str3;
- }
- public String getStr4() {
- return str4;
- }
- public void setStr4(String str4) {
- this.str4 = str4;
- }
- public String getStr5() {
- return str5;
- }
- public void setStr5(String str5) {
- this.str5 = str5;
- }
- public String getStr6() {
- return str6;
- }
- public void setStr6(String str6) {
- this.str6 = str6;
- }
- public String getStr7() {
- return str7;
- }
- public void setStr7(String str7) {
- this.str7 = str7;
- }
- public String getStr8() {
- return str8;
- }
- public void setStr8(String str8) {
- this.str8 = str8;
- }
- public String getStr9() {
- return str9;
- }
- public void setStr9(String str9) {
- this.str9 = str9;
- }
- public String getStr10() {
- return str10;
- }
- public void setStr10(String str10) {
- this.str10 = str10;
- }
- public String getStr11() {
- return str11;
- }
- public void setStr11(String str11) {
- this.str11 = str11;
- }
- public String getStr12() {
- return str12;
- }
- public void setStr12(String str12) {
- this.str12 = str12;
- }
- public String getStr13() {
- return str13;
- }
- public void setStr13(String str13) {
- this.str13 = str13;
- }
- public String getStr14() {
- return str14;
- }
- public void setStr14(String str14) {
- this.str14 = str14;
- }
- public String getStr15() {
- return str15;
- }
- public void setStr15(String str15) {
- this.str15 = str15;
- }
- public String getStr16() {
- return str16;
- }
- public void setStr16(String str16) {
- this.str16 = str16;
- }
- public String getStr17() {
- return str17;
- }
- public void setStr17(String str17) {
- this.str17 = str17;
- }
- public String getStr18() {
- return str18;
- }
- public void setStr18(String str18) {
- this.str18 = str18;
- }
- public String getStr19() {
- return str19;
- }
- public void setStr19(String str19) {
- this.str19 = str19;
- }
- public String getStr20() {
- return str20;
- }
- public void setStr20(String str20) {
- this.str20 = str20;
- }
- public String getStr21() {
- return str21;
- }
- public void setStr21(String str21) {
- this.str21 = str21;
- }
- public String getStr22() {
- return str22;
- }
- public void setStr22(String str22) {
- this.str22 = str22;
- }
- public String getStr23() {
- return str23;
- }
- public void setStr23(String str23) {
- this.str23 = str23;
- }
- public double getNum1() {
- return num1;
- }
- public void setNum1(double num1) {
- this.num1 = num1;
- }
- public double getNum2() {
- return num2;
- }
- public void setNum2(double num2) {
- this.num2 = num2;
- }
- public double getNum3() {
- return num3;
- }
- public void setNum3(double num3) {
- this.num3 = num3;
- }
- public double getNum4() {
- return num4;
- }
- public void setNum4(double num4) {
- this.num4 = num4;
- }
- public double getNum5() {
- return num5;
- }
- public void setNum5(double num5) {
- this.num5 = num5;
- }
- public double getNum6() {
- return num6;
- }
- public void setNum6(double num6) {
- this.num6 = num6;
- }
- public String getBarcode() {
- return barcode;
- }
- public void setBarcode(String barcode) {
- this.barcode = barcode;
- }
- public String getDate1() {
- return date1;
- }
- public void setDate1(String date1) {
- this.date1 = date1;
- }
- public String getCrn_str_time() {
- return crn_str_time;
- }
- public void setCrn_str_time(String crn_str_time) {
- this.crn_str_time = crn_str_time;
- }
- public String getCrn_end_time() {
- return crn_end_time;
- }
- public void setCrn_end_time(String crn_end_time) {
- this.crn_end_time = crn_end_time;
+
+ public String getIoTime$(){
+ if (Cools.isEmpty(this.io_time)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.io_time);
}
public void setQuery_date(String query_date) {
@@ -415,4 +186,5 @@
}
}
-}
\ No newline at end of file
+
+}
diff --git a/src/main/resources/mapper/ViewStayTimeMapper.xml b/src/main/resources/mapper/ViewStayTimeMapper.xml
index 7ce92fe..bb44371 100644
--- a/src/main/resources/mapper/ViewStayTimeMapper.xml
+++ b/src/main/resources/mapper/ViewStayTimeMapper.xml
@@ -84,16 +84,24 @@
<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 -->
<select id="getViewStayTimeAll" parameterType="com.zy.asrs.entity.ViewStayTimeBean" resultType="com.zy.asrs.entity.ViewStayTimeBean">
-select * from asr_stk_staytime_view a
-<where>
- <![CDATA[
- 1=1
- ]]>
- <include refid="viewStayTimeConditionSql"></include>
- <![CDATA[
- order by appe_time asc
- ]]>
-</where>
+ select
+ *
+ from (
+ select
+ ROW_NUMBER() over (order by stay_time desc) as row
+ , *
+ from
+ (
+ SELECT
+ GETDATE() AS today
+ , CONVERT(decimal, DATEDIFF(second,asr_loc_detl.appe_time, GETDATE()) / 86400.0, 9) AS stay_time
+ , dbo.asr_loc_detl.*
+ FROM asr_loc_detl
+ INNER JOIN asr_loc_mast ON asr_loc_detl.loc_no = asr_loc_mast.loc_no
+ where 1=1
+ <include refid="viewStayTimeConditionSql"></include>
+ ) t
+ ) a
</select>
</mapper>
diff --git a/src/main/resources/mapper/ViewWorkInMapper.xml b/src/main/resources/mapper/ViewWorkInMapper.xml
index b8c0865..1adbe97 100644
--- a/src/main/resources/mapper/ViewWorkInMapper.xml
+++ b/src/main/resources/mapper/ViewWorkInMapper.xml
@@ -4,7 +4,7 @@
<mapper namespace="com.zy.asrs.mapper.ReportQueryMapper">
<!-- mapper涓嶆敮鎸乻ql璇彞宓屽鏃讹紝閲囩敤sql鐗囨鍖呭惈鏂瑰紡锛岃В鍐硏ml鏍囩闂 -->
-<sql id="viewWorkInConditionSql">
+<sql id="viewWorkInConditionSql">
<if test="loc_no!=null and loc_no!='' ">
and loc_no like '%' + #{loc_no} + '%'
</if>
@@ -28,17 +28,17 @@
</if>
<if test="begin_date!=null and begin_date!='' ">
<![CDATA[
- and io_time >= #{begin_date}
- ]]>
- </if>
+ and io_time >= #{begin_date}
+ ]]>
+ </if>
<if test="end_date!=null and end_date!='' ">
<![CDATA[
- and io_time <= #{end_date}
- ]]>
+ and io_time <= #{end_date}
+ ]]>
</if>
</sql>
-<sql id="viewWorkOutConditionSql">
+<sql id="viewWorkOutConditionSql">
<if test="loc_no!=null and loc_no!='' ">
and loc_no like '%' + #{loc_no} + '%'
</if>
@@ -62,43 +62,39 @@
</if>
<if test="begin_date!=null and begin_date!='' ">
<![CDATA[
- and crn_str_time >= #{begin_date}
- ]]>
- </if>
+ and crn_str_time >= #{begin_date}
+ ]]>
+ </if>
<if test="end_date!=null and end_date!='' ">
<![CDATA[
- and crn_str_time <= #{end_date}
- ]]>
+ and crn_str_time <= #{end_date}
+ ]]>
</if>
</sql>
<!-- 鍏ュ簱缁熻 -->
<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� -->
<select id="queryViewWorkInList" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
-select * from (
-select *,ROW_NUMBER() OVER(Order by io_time desc) as rowid
- from asr_wrkin_view
-<where>
- 1=1
- <include refid="viewWorkInConditionSql"></include>
-</where>
- ) as a
-<where>
- rowid between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
- <![CDATA[
- order by io_time desc
- ]]>
-</where>
+ select
+ *
+ from (
+ select
+ ROW_NUMBER() OVER(Order by t.io_time desc) as row
+ , *
+ from (
+ select *
+ from asr_wrkin_view
+ where 1=1
+ <include refid="viewWorkInConditionSql"></include>
+ ) t
+ ) a where 1=1 and a.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
</select>
<select id="getViewWorkInCount" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="Integer">
-select count(1) from asr_wrkin_view a
-<where>
-<![CDATA[
- 1=1
-]]>
-<include refid="viewWorkInConditionSql"></include>
-</where>
+ select count(1)
+ from asr_wrkin_view a
+ where 1=1
+ <include refid="viewWorkInConditionSql"></include>
</select>
<!-- 涓嶅垎椤垫煡璇㈡墍鏈変俊鎭紝鐢ㄤ簬excel瀵煎嚭 -->
@@ -118,7 +114,7 @@
<!-- 鍑哄簱缁熻 -->
<!-- 鍒嗛〉鏌ヨ鎵�鏈変俊鎭� -->
<select id="queryViewWorkOutList" parameterType="com.zy.asrs.entity.ViewWorkInBean" resultType="com.zy.asrs.entity.ViewWorkInBean">
-select * from (
+select * from (
select *,ROW_NUMBER() OVER(Order by io_time desc) as rowid
from asr_wrkout_view
<where>
@@ -158,4 +154,4 @@
</where>
</select>
-</mapper>
\ No newline at end of file
+</mapper>
diff --git a/src/main/webapp/static/js/adjDetl/adjDetl.js b/src/main/webapp/static/js/adjDetl/adjDetl.js
index 80f8af8..cf5c1f8 100644
--- a/src/main/webapp/static/js/adjDetl/adjDetl.js
+++ b/src/main/webapp/static/js/adjDetl/adjDetl.js
@@ -21,8 +21,9 @@
// {type: 'checkbox'}
// ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80}
// {field: 'adjId', align: 'center',title: '搴忓彿'}
- {field: 'locNo$', align: 'center',title: '搴撲綅鍙�'}
- ,{field: 'matNo$', align: 'center',title: '鐗╂枡缂栧彿'}
+ {field: 'locNo', align: 'center',title: '搴撲綅鍙�'}
+ ,{field: 'matnr', align: 'center',title: '鍟嗗搧缂栧彿'}
+ ,{field: 'batch', align: 'center',title: '鎵瑰彿'}
// ,{field: 'oriCtns', align: 'center',title: '鍘熺鏁�'}
,{field: 'oriQty', align: 'center',title: '鍘熸暟閲�'}
// ,{field: 'oriWt', align: 'center',title: '鍘熼噸閲�'}
diff --git a/src/main/webapp/static/js/report/workIn.js b/src/main/webapp/static/js/report/workIn.js
index 367d367..ec329f9 100644
--- a/src/main/webapp/static/js/report/workIn.js
+++ b/src/main/webapp/static/js/report/workIn.js
@@ -1,7 +1,7 @@
var pageCurr;
function getCol() {
var cols = [
- {field: 'io_time', align: 'center', title: '鍏ュ簱鏃ユ湡', width: 200}
+ {field: 'ioTime$', align: 'center', title: '鍏ュ簱鏃ユ湡', width: 200}
,{field: 'loc_no', align: 'center',title: '搴撲綅鍙�'}
];
cols.push.apply(cols, detlCols);
diff --git a/src/main/webapp/views/adjDetl/adjDetl.html b/src/main/webapp/views/adjDetl/adjDetl.html
index 6e62391..ff4a9d8 100644
--- a/src/main/webapp/views/adjDetl/adjDetl.html
+++ b/src/main/webapp/views/adjDetl/adjDetl.html
@@ -21,7 +21,7 @@
</div>
<div class="layui-inline">
<div class="layui-input-inline">
- <input class="layui-input" type="text" name="mat_no" placeholder="鐗╂枡缂栧彿" autocomplete="off">
+ <input class="layui-input" type="text" name="matnr" placeholder="鍟嗗搧" autocomplete="off">
</div>
</div>
<!-- 鏃ユ湡鑼冨洿 -->
--
Gitblit v1.9.1