Pārlūkot izejas kodu

feat:纺丝排产限制

lucky 3 mēneši atpakaļ
vecāks
revīzija
201429aefc

+ 17 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleProductsController.java

@@ -55,6 +55,23 @@ public class SaleProductsController extends BaseController {
         return AjaxResult.success(list);
     }
 
+    /**
+     * @RequestParam("saleNo") String saleNo
+     * //saleProducts.setSaleOrderNo(saleNo);
+     * @return
+     */
+    @GetMapping("/fsGetProducts")
+    @ApiOperation(value = "查询销售产品列表")
+    @Anonymous
+    public AjaxResult fsGetProducts(@RequestParam(value = "productionLineNo", required = false) String productionLineNo) {
+        //销售单什么状态为3的(待生产)
+        SaleProducts saleProducts=new SaleProducts();
+//        saleProducts.setStatus("3");
+//        saleProducts.setProductionLineNo(productionLineNo); //不查在当前产线投产过的产品了
+        List<SaleProductsVo> list = saleProductsService.selectSaleProductsListAndCustomerNameFs(saleProducts);
+        return AjaxResult.success(list);
+    }
+
 
     /**
      * 查询全部的销售产品

+ 15 - 8
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleProductsMapper.java

@@ -11,16 +11,16 @@ import org.apache.ibatis.annotations.Mapper;
 
 /**
  * 销售产品Mapper接口
- * 
+ *
  * @author zkqy
  * @date 2024-03-14
  */
 @Mapper
-public interface SaleProductsMapper 
+public interface SaleProductsMapper
 {
     /**
      * 查询销售产品
-     * 
+     *
      * @param id 销售产品主键
      * @return 销售产品
      */
@@ -28,7 +28,7 @@ public interface SaleProductsMapper
 
     /**
      * 查询销售产品列表
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 销售产品集合
      */
@@ -57,7 +57,7 @@ public interface SaleProductsMapper
 
     /**
      * 新增销售产品
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 结果
      */
@@ -65,7 +65,7 @@ public interface SaleProductsMapper
 
     /**
      * 修改销售产品
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 结果
      */
@@ -94,7 +94,7 @@ public interface SaleProductsMapper
     public int updateSaleProduct(SaleProducts saleProduct);
     /**
      * 删除销售产品
-     * 
+     *
      * @param id 销售产品主键
      * @return 结果
      */
@@ -102,7 +102,7 @@ public interface SaleProductsMapper
 
     /**
      * 批量删除销售产品
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
@@ -175,4 +175,11 @@ public interface SaleProductsMapper
      * @return
      */
     int  updateSaleProductsBySaleOrderNoBgsl(SaleProducts saleProducts);
+
+    /**
+     * 纺丝查询排产产品
+     * @param saleProducts
+     * @return
+     */
+    List<SaleProductsVo> selectSaleProductsListAndCustomInfoFs(SaleProducts saleProducts);
 }

+ 15 - 8
zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleProductsService.java

@@ -6,15 +6,15 @@ import com.zkqy.business.domain.vo.SaleProductsVo;
 
 /**
  * 销售产品Service接口
- * 
+ *
  * @author zkqy
  * @date 2024-03-14
  */
-public interface ISaleProductsService 
+public interface ISaleProductsService
 {
     /**
      * 查询销售产品
-     * 
+     *
      * @param id 销售产品主键
      * @return 销售产品
      */
@@ -22,7 +22,7 @@ public interface ISaleProductsService
 
     /**
      * 查询销售产品列表
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 销售产品集合
      */
@@ -39,7 +39,7 @@ public interface ISaleProductsService
 
     /**
      * 新增销售产品
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 结果
      */
@@ -47,7 +47,7 @@ public interface ISaleProductsService
 
     /**
      * 修改销售产品
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 结果
      */
@@ -55,7 +55,7 @@ public interface ISaleProductsService
 
     /**
      * 批量删除销售产品
-     * 
+     *
      * @param ids 需要删除的销售产品主键集合
      * @return 结果
      */
@@ -63,7 +63,7 @@ public interface ISaleProductsService
 
     /**
      * 删除销售产品信息
-     * 
+     *
      * @param id 销售产品主键
      * @return 结果
      */
@@ -82,4 +82,11 @@ public interface ISaleProductsService
      * @return
      */
     List<SaleProductsVo> selectSaleProductsListAndCustomerNameAll(SaleProducts saleProducts);
+
+    /**
+     * 纺丝查询待排产的
+     * @param saleProducts
+     * @return
+     */
+    List<SaleProductsVo> selectSaleProductsListAndCustomerNameFs(SaleProducts saleProducts);
 }

+ 13 - 8
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleProductsServiceImpl.java

@@ -12,19 +12,19 @@ import com.zkqy.business.service.ISaleProductsService;
 
 /**
  * 销售产品Service业务层处理
- * 
+ *
  * @author zkqy
  * @date 2024-03-14
  */
 @Service
-public class SaleProductsServiceImpl implements ISaleProductsService 
+public class SaleProductsServiceImpl implements ISaleProductsService
 {
     @Autowired
     private SaleProductsMapper saleProductsMapper;
 
     /**
      * 查询销售产品
-     * 
+     *
      * @param id 销售产品主键
      * @return 销售产品
      */
@@ -36,7 +36,7 @@ public class SaleProductsServiceImpl implements ISaleProductsService
 
     /**
      * 查询销售产品列表
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 销售产品
      */
@@ -59,7 +59,7 @@ public class SaleProductsServiceImpl implements ISaleProductsService
 
     /**
      * 新增销售产品
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 结果
      */
@@ -72,7 +72,7 @@ public class SaleProductsServiceImpl implements ISaleProductsService
 
     /**
      * 修改销售产品
-     * 
+     *
      * @param saleProducts 销售产品
      * @return 结果
      */
@@ -85,7 +85,7 @@ public class SaleProductsServiceImpl implements ISaleProductsService
 
     /**
      * 批量删除销售产品
-     * 
+     *
      * @param ids 需要删除的销售产品主键
      * @return 结果
      */
@@ -97,7 +97,7 @@ public class SaleProductsServiceImpl implements ISaleProductsService
 
     /**
      * 删除销售产品信息
-     * 
+     *
      * @param id 销售产品主键
      * @return 结果
      */
@@ -116,4 +116,9 @@ public class SaleProductsServiceImpl implements ISaleProductsService
     public List<SaleProductsVo> selectSaleProductsListAndCustomerNameAll(SaleProducts saleProducts) {
         return saleProductsMapper.selectSaleProductsListAndCustomInfoTwo(saleProducts);
     }
+
+    @Override
+    public List<SaleProductsVo> selectSaleProductsListAndCustomerNameFs(SaleProducts saleProducts) {
+        return saleProductsMapper.selectSaleProductsListAndCustomInfoFs(saleProducts);
+    }
 }

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

@@ -170,6 +170,40 @@
         <if test="lotNumber != null  and lotNumber != ''">and lot_number = #{lotNumber}</if>
     </select>
 
+    <select id="selectSaleProductsListAndCustomInfoFs"   resultMap="SaleProductsResultAndCustomInfo" parameterType="com.zkqy.business.domain.SaleProducts">
+        SELECT
+        sp.*,cs.custom_name,pd.product_specifications,sp.colours,
+        pl.production_line_no as ccc
+        FROM
+        huaxian.sale_products AS sp
+        INNER JOIN huaxian.sale_order AS so ON sp.sale_order_no = so.sale_no
+        Inner Join huaxian.customer as cs ON so.sale_custom_no= cs.custom_no
+        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)
+        <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>
+        <if test="productName != null  and productName != ''">and product_name like concat('%', #{productName}, '%')</if>
+        <if test="productNumber != null ">and product_number = #{productNumber}</if>
+        <if test="productWeight != null  and productWeight != ''">and product_weight = #{productWeight}</if>
+        <if test="productUnitPrice != null  and productUnitPrice != ''">and product_unit_price = #{productUnitPrice}</if>
+        <if test="productAmounts != null  and productAmounts != ''">and product_amounts = #{productAmounts}</if>
+        <if test="productNotes != null  and productNotes != ''">and product_notes = #{productNotes}</if>
+        <if test="createById != null ">and create_by_id = #{createById}</if>
+        <if test="updateById != null ">and update_by_id = #{updateById}</if>
+        <if test="taskProcessKey != null  and taskProcessKey != ''">and task_process_key = #{taskProcessKey}</if>
+        <if test="taskNodeKey != null  and taskNodeKey != ''">and task_node_key = #{taskNodeKey}</if>
+        <if test="processKey != null  and processKey != ''">and process_key = #{processKey}</if>
+        <if test="status != null  and status != ''">and sp.status=3</if>
+        <if test="productionLineNo != null  and productionLineNo != ''">and (pl.production_line_no NOT lIKE CONCAT(#{productionLineNo}, '%' )  or pl.production_line_no is null)</if>
+        <if test="sliceType != null  and sliceType != ''">and slice_type = #{sliceType}</if>
+        <if test="colourNumber != null  and colourNumber != ''">and colour_number = #{colourNumber}</if>
+        <if test="lotNumber != null  and lotNumber != ''">and lot_number = #{lotNumber}</if>
+    </select>
+
+
     <!--不管状态,只查关于这个几台的所有产品-->
     <select id="selectSaleProductsListAndCustomInfoTwo" parameterType="com.zkqy.business.domain.SaleProducts"
             resultMap="SaleProductsResultAndCustomInfo">
@@ -417,6 +451,8 @@
         where sale_order_no = #{saleOrderNo}
     </select>
 
+
+
     <select id="selectSaleProductsInfo" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
         SELECT a.*,
                pi.levels,
@@ -556,16 +592,7 @@
           AND p.del_flag = '0'
           and sp.sale_order_no = #{saleOrderNo}
     </select>
-<!--    SELECT-->
-<!--    sp.*,cs.custom_name,m.materie_encoding,m.materie_color_number,pd.product_specifications-->
-<!--    FROM-->
-<!--    {DBNAME}.sale_products AS sp-->
-<!--    INNER JOIN {DBNAME}.sale_order AS so ON sp.sale_order_no = so.sale_no-->
-<!--    Inner Join {DBNAME}.customer as cs ON so.sale_custom_no= cs.custom_no-->
-<!--    inner join {DBNAME}.materiel as m on sp.colour_number= m.materiel_code-->
-<!--    inner join {DBNAME}.production as pd on sp.product_no= pd.product_no-->
-<!--    left join {DBNAME}.production_line as pl on sp.production_line_no=pl.id-->
-<!--    where sp.del_flag = '0' and cs.del_flag = '0' and m.del_flag = '0'  and so.order_type=2-->
+
     <select id="selectSaleProductsListAndCustomInfoThread"
             resultType="com.zkqy.business.domain.vo.SaleProductsVo">
         SELECT
@@ -686,7 +713,6 @@
             <if test="id !=null and id!=''">and id=#{id}</if>
         </where>
     </update>
-
     <update id="updateSaleProductsBySaleOrderNoBgsl">
         update {DBNAME}.sale_products
         <trim prefix="SET" suffixOverrides=",">

+ 9 - 0
zkqy-ui/src/api/plan/paln.js

@@ -18,6 +18,15 @@ export function getProductsInfo(productionLineNo) {
     method: 'GET',
   })
 }
+export function getProductsInfoFs(productionLineNo) {
+  return request({
+    url: '/system/products/fsGetProducts',
+    params: {
+      "productionLineNo": productionLineNo,
+    },
+    method: 'GET',
+  })
+}
 
 
 export function getProductsAll(productionLineNo) {

+ 2 - 2
zkqy-ui/src/views/orderMange/planTable/fangsi.vue

@@ -250,7 +250,7 @@ import {
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
+  updateSpinningInfoPlanOne, getCurrentProductionLineSuperior, getIsTheOrderProductProduced, getProductsInfoFs
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -359,7 +359,7 @@ export default {
     },
     // 新增计划是得到产品信息
     getProductsInfo() {
-      getProductsInfo("FS-").then((response) => {
+      getProductsInfoFs("FS-").then((response) => {
         this.productsInfo = response.data;
         this.productsInfo.forEach(item => {
           // item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber