Przeglądaj źródła

流转和现场使用

LiangtongHe 2 miesięcy temu
rodzic
commit
3a5bf54230

+ 21 - 9
zkqy-custom-business/src/main/java/com/zkqy/business/domain/OperationLog.java

@@ -34,9 +34,17 @@ public class OperationLog extends BaseEntity
     @Excel(name = "类型")
     private String productType;
 
+    public String getBatchNumber() {
+        return batchNumber;
+    }
+
+    public void setBatchNumber(String batchNumber) {
+        this.batchNumber = batchNumber;
+    }
+
     /** 批号 */
     @Excel(name = "批号")
-    private Long batchNumber;
+    private String batchNumber;
 
     /** 色泽 */
     @Excel(name = "色泽")
@@ -90,6 +98,18 @@ public class OperationLog extends BaseEntity
     @Excel(name = "确认时间")
     private String confirmTime;
 
+    public String getScid() {
+        return scid;
+    }
+
+    public void setScid(String scid) {
+        this.scid = scid;
+    }
+
+    /** 丝车id */
+    @Excel(name = "丝车id")
+    private String scid;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -135,15 +155,7 @@ public class OperationLog extends BaseEntity
     {
         return productType;
     }
-    public void setBatchNumber(Long batchNumber) 
-    {
-        this.batchNumber = batchNumber;
-    }
 
-    public Long getBatchNumber() 
-    {
-        return batchNumber;
-    }
     public void setColours(String colours) 
     {
         this.colours = colours;

+ 13 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/LineSideCabinServiceImpl.java

@@ -3,10 +3,13 @@ package com.zkqy.business.service.impl;
 import java.util.Date;
 import java.util.List;
 
+import com.zkqy.business.domain.OperationLog;
 import com.zkqy.business.domain.Silkcart;
 import com.zkqy.business.mapper.SilkcartMapper;
+import com.zkqy.business.service.IOperationLogService;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.zkqy.business.mapper.LineSideCabinMapper;
@@ -28,6 +31,8 @@ public class LineSideCabinServiceImpl implements ILineSideCabinService
     @Autowired
     private SilkcartMapper silkcartMapper;
 
+    @Autowired
+    private IOperationLogService operationLogService;
     /**
      * 查询线边舱库存
      * 
@@ -71,6 +76,14 @@ public class LineSideCabinServiceImpl implements ILineSideCabinService
         lineSideCabin.setStandby1(pz.toString());//赋值皮重
         lineSideCabin.setCreateTime(DateUtils.getNowDate());//新增时间
         lineSideCabin.setCreateBy(SecurityUtils.getUsername());//创建人
+        /** 新增流转日志 */
+        OperationLog operationLog = new OperationLog();
+        BeanUtils.copyProperties(lineSideCabin, operationLog);
+        operationLog.setStatus("1");//状态为入库
+        operationLog.setJt(lineSideCabin.getMachineTool());//机台
+        operationLog.setProductType(lineSideCabin.getProductId());//货品编号
+        operationLog.setBatchNumber(lineSideCabin.getBatchNumber());
+        operationLogService.insertOperationLog(operationLog);
         return lineSideCabinMapper.insertLineSideCabin(lineSideCabin);
     }
 

+ 47 - 21
zkqy-custom-business/src/main/resources/mapper/business/OperationLogMapper.xml

@@ -24,39 +24,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="collectTime"    column="collectTime"    />
         <result property="confirm"    column="confirm"    />
         <result property="confirmTime"    column="confirmTime"    />
+        <result property="scid"    column="scid"    />
     </resultMap>
 
     <sql id="selectOperationLogVo">
-        select id, product_no, product_name, product_specifications, product_type, batchNumber, colours, jt, js, status, standby, standby1, standby2, standby3, workshop, recipient, collectTime, confirm, confirmTime from {DBNAME}.operationLog
-    </sql>
+        SELECT a.id,
+               a.product_no,
+               a.product_name,
+               a.product_specifications,
+               a.product_type,
+               a.batchNumber,
+               a.colours,
+               c.production_line_name as jt,
+               a.js,
+               a.STATUS,
+               a.standby,
+               a.standby1,
+               a.standby2,
+               a.standby3,
+               a.workshop,
+               a.recipient,
+               a.collectTime,
+               a.confirm,
+               a.confirmTime,
+               b.scname as scid
+        FROM {DBNAME}.operationlog as a
+                 LEFT JOIN {DBNAME}.silkcart b ON a.scid = b.id
+                 LEFT JOIN {DBNAME}.production_line c ON a.jt = c.id
+            </sql>
 
     <select id="selectOperationLogList" parameterType="com.zkqy.business.domain.OperationLog" resultMap="OperationLogResult">
         <include refid="selectOperationLogVo"/>
         <where>  
-            <if test="productNo != null "> and product_no = #{productNo}</if>
-            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
-            <if test="productSpecifications != null  and productSpecifications != ''"> and product_specifications = #{productSpecifications}</if>
-            <if test="productType != null  and productType != ''"> and product_type = #{productType}</if>
-            <if test="batchNumber != null "> and batchNumber = #{batchNumber}</if>
-            <if test="colours != null  and colours != ''"> and colours = #{colours}</if>
-            <if test="jt != null  and jt != ''"> and jt = #{jt}</if>
-            <if test="js != null  and js != ''"> and js = #{js}</if>
-            <if test="status != null  and status != ''"> and status = #{status}</if>
-            <if test="standby != null  and standby != ''"> and standby = #{standby}</if>
-            <if test="standby1 != null  and standby1 != ''"> and standby1 = #{standby1}</if>
-            <if test="standby2 != null  and standby2 != ''"> and standby2 = #{standby2}</if>
-            <if test="standby3 != null  and standby3 != ''"> and standby3 = #{standby3}</if>
-            <if test="workshop != null  and workshop != ''"> and workshop = #{workshop}</if>
-            <if test="recipient != null  and recipient != ''"> and recipient = #{recipient}</if>
-            <if test="collectTime != null  and collectTime != ''"> and collectTime = #{collectTime}</if>
-            <if test="confirm != null  and confirm != ''"> and confirm = #{confirm}</if>
-            <if test="confirmTime != null  and confirmTime != ''"> and confirmTime = #{confirmTime}</if>
+            <if test="productNo != null "> and a.product_no = #{productNo}</if>
+            <if test="productName != null  and productName != ''"> and a.product_name like concat('%', #{productName}, '%')</if>
+            <if test="productSpecifications != null  and productSpecifications != ''"> and a.product_specifications = #{productSpecifications}</if>
+            <if test="productType != null  and productType != ''"> and a.product_type = #{productType}</if>
+            <if test="batchNumber != null "> and a.batchNumber = #{batchNumber}</if>
+            <if test="colours != null  and colours != ''"> and a.colours = #{colours}</if>
+            <if test="jt != null  and jt != ''"> and a.jt = #{jt}</if>
+            <if test="js != null  and js != ''"> and a.js = #{js}</if>
+            <if test="status != null  and status != ''"> and a.status = #{status}</if>
+            <if test="standby != null  and standby != ''"> and a.standby = #{standby}</if>
+            <if test="standby1 != null  and standby1 != ''"> and a.standby1 = #{standby1}</if>
+            <if test="standby2 != null  and standby2 != ''"> and a.standby2 = #{standby2}</if>
+            <if test="standby3 != null  and standby3 != ''"> and a.standby3 = #{standby3}</if>
+            <if test="workshop != null  and workshop != ''"> and a.workshop = #{workshop}</if>
+            <if test="recipient != null  and recipient != ''"> and a.recipient = #{recipient}</if>
+            <if test="collectTime != null  and collectTime != ''"> and a.collectTime = #{collectTime}</if>
+            <if test="confirm != null  and confirm != ''"> and a.confirm = #{confirm}</if>
+            <if test="confirmTime != null  and confirmTime != ''"> and a.confirmTime = #{confirmTime}</if>
+            <if test="scid != null  and scid != ''"> and a.scid = #{scid}</if>
         </where>
     </select>
     
     <select id="selectOperationLogById" parameterType="Long" resultMap="OperationLogResult">
         <include refid="selectOperationLogVo"/>
-        where id = #{id}
+        where a.id = #{id}
     </select>
 
     <insert id="insertOperationLog" parameterType="com.zkqy.business.domain.OperationLog">
@@ -81,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="collectTime != null">collectTime,</if>
             <if test="confirm != null">confirm,</if>
             <if test="confirmTime != null">confirmTime,</if>
+            <if test="scid != null">scid,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -102,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="collectTime != null">#{collectTime},</if>
             <if test="confirm != null">#{confirm},</if>
             <if test="confirmTime != null">#{confirmTime},</if>
+            <if test="scid != null">#{scid},</if>
          </trim>
     </insert>
 

+ 1 - 1
zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml

@@ -148,7 +148,7 @@
         inner join huaxian.production as pd on sp.product_no= pd.product_no
         left join huaxian.production_line as pl on sp.production_line_no=pl.id
         where sp.del_flag = '0' and cs.del_flag = '0'  AND sp.product_number > 0.0
-        AND so.order_type = 2 and so.`status`in (3,4) and sp.`status` in (3,4,6)
+        AND so.order_type = 2 and so.`status`in (3,4,9) and sp.`status` in (3,4,6)
         <if test="saleProductNo != null  and saleProductNo != ''">and sale_product_no = #{saleProductNo}</if>
         <if test="saleOrderNo != null  and saleOrderNo != ''">and sale_order_no = #{saleOrderNo}</if>
         <if test="productNo != null  and productNo != ''">and product_no = #{productNo}</if>

+ 3 - 3
zkqy-ui/src/views/orderMange/lineSideCabin/InboundManagement.vue

@@ -134,7 +134,7 @@ export default {
         productNo: null,
         productName: null,
         productSpecifications: null,
-        productType: null,
+        productId: null,
         batchNumber: null,
         colours: null,
         machineTool: null,
@@ -217,7 +217,7 @@ export default {
         productNo: null,
         productName: null,
         productSpecifications: null,
-        productType: null,
+        productId: null,
         batchNumber: null,
         colours: null,
         machineTool: null,//机台号
@@ -351,7 +351,7 @@ export default {
         this.form.productNo = this.xzbatchTableData.productNo;
         this.form.productName = this.xzbatchTableData.productName;
         this.form.productSpecifications = this.xzbatchTableData.productSpecifications;
-        this.form.productType = this.xzbatchTableData.productId;//类型字段变更为存储产品id
+        this.form.productId = this.xzbatchTableData.productId;//类型字段变更为存储产品id
         this.form.batchNumber = this.xzbatchTableData.lotNum;
         this.form.colours = this.xzbatchTableData.productColor;
         this.form.standby3 = this.xzbatchTableData.id;//任务id

+ 7 - 3
zkqy-ui/src/views/orderMange/operationLog/index.vue

@@ -101,7 +101,7 @@
       <el-table-column label="产品编号" align="center" prop="productNo" />
       <el-table-column label="品名" align="center" prop="productName" />
       <el-table-column label="产品规格" align="center" prop="productSpecifications" />
-      <el-table-column label="类型" align="center" prop="productType" />
+<!--      <el-table-column label="类型" align="center" prop="productType" />-->
       <el-table-column label="批号" align="center" prop="batchNumber" />
       <el-table-column label="色泽" align="center" prop="colours" />
       <el-table-column label="机台" align="center" prop="jt" />
@@ -110,11 +110,13 @@
       <el-table-column label="毛重" align="center" prop="standby" />
       <el-table-column label="皮重" align="center" prop="standby1" />
       <el-table-column label="净重" align="center" prop="standby2" />
+      <el-table-column label="丝车号" align="center" prop="scid" />
       <el-table-column label="领料车间" align="center" prop="workshop" />
       <el-table-column label="领料人" align="center" prop="recipient" />
       <el-table-column label="领料时间" align="center" prop="collectTime" />
       <el-table-column label="确认人" align="center" prop="confirm" />
       <el-table-column label="确认时间" align="center" prop="confirmTime" />
+
 <!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
 <!--        <template slot-scope="scope">-->
 <!--          <el-button-->
@@ -249,7 +251,8 @@ export default {
         recipient: null,
         collectTime: null,
         confirm: null,
-        confirmTime: null
+        confirmTime: null,
+        scid:null
       },
       // 表单参数
       form: {},
@@ -297,7 +300,8 @@ export default {
         recipient: null,
         collectTime: null,
         confirm: null,
-        confirmTime: null
+        confirmTime: null,
+        scid:null
       };
       this.resetForm("form");
     },