Эх сурвалжийг харах

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CLIENT

lph 1 жил өмнө
parent
commit
75ebcf5730
56 өөрчлөгдсөн 4632 нэмэгдсэн , 863 устгасан
  1. 11 1
      zkqy-admin/pom.xml
  2. 8 0
      zkqy-admin/src/main/java/com/zkqy/ZkqyServletInitializer.java
  3. 0 1
      zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysUserController.java
  4. 4 2
      zkqy-business/src/main/java/com/zkqy/business/controller/MobilePageDataController.java
  5. 35 4
      zkqy-business/src/main/java/com/zkqy/business/entity/MobilePageData.java
  6. 2 0
      zkqy-business/src/main/java/com/zkqy/business/mapper/MobilePageDataMapper.java
  7. 3 2
      zkqy-business/src/main/java/com/zkqy/business/service/IMobilePageDataService.java
  8. 120 6
      zkqy-business/src/main/java/com/zkqy/business/service/impl/MobilePageDataServiceImpl.java
  9. 5 1
      zkqy-business/src/main/resources/mapper/dragmapper/MobilePageDataMapper.xml
  10. 13 0
      zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysUser.java
  11. 9 1
      zkqy-common/src/main/java/com/zkqy/common/utils/StringUtils.java
  12. 12 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanController.java
  13. 113 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanLogsController.java
  14. 29 22
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanSpinningController.java
  15. 134 0
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanSpinningLogsController.java
  16. 24 1
      zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleProductsController.java
  17. 250 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanLogs.java
  18. 69 147
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinning.java
  19. 255 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinningLogs.java
  20. 29 0
      zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/PurchaseInfoVo.java
  21. 63 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanLogsMapper.java
  22. 9 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanMapper.java
  23. 67 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanSpinningLogsMapper.java
  24. 22 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanSpinningMapper.java
  25. 18 0
      zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleProductsMapper.java
  26. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanLogsService.java
  27. 16 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanService.java
  28. 61 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanSpinningLogsService.java
  29. 22 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanSpinningService.java
  30. 7 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleProductsService.java
  31. 12 88
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/AmmunitionPlanInformationIntermediateTableServiceImpl.java
  32. 93 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanLogsServiceImpl.java
  33. 64 13
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanServiceImpl.java
  34. 96 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningLogsServiceImpl.java
  35. 67 6
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java
  36. 5 0
      zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleProductsServiceImpl.java
  37. 163 0
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanLogsMapper.xml
  38. 34 6
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml
  39. 165 0
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningLogsMapper.xml
  40. 86 23
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml
  41. 1 2
      zkqy-custom-business/src/main/resources/mapper/business/PurchaseInfoMapper.xml
  42. 102 2
      zkqy-custom-business/src/main/resources/mapper/business/SaleProductsMapper.xml
  43. 6 1
      zkqy-system/src/main/resources/mapper/system/SysUserMapper.xml
  44. 60 0
      zkqy-ui/src/api/plan/fslogs.js
  45. 44 0
      zkqy-ui/src/api/plan/logs.js
  46. 74 5
      zkqy-ui/src/api/plan/paln.js
  47. 163 132
      zkqy-ui/src/views/orderMange/planTable/fangsi.vue
  48. 160 129
      zkqy-ui/src/views/orderMange/planTable/fankuang.vue
  49. 112 135
      zkqy-ui/src/views/orderMange/planTable/index.vue
  50. 349 0
      zkqy-ui/src/views/orderMange/planTable/logs/fangsilog.vue
  51. 348 0
      zkqy-ui/src/views/orderMange/planTable/logs/fankuanglog.vue
  52. 424 0
      zkqy-ui/src/views/orderMange/planTable/logs/index.vue
  53. 348 0
      zkqy-ui/src/views/orderMange/planTable/logs/luotonglog.vue
  54. 160 129
      zkqy-ui/src/views/orderMange/planTable/luotong.vue
  55. 4 3
      zkqy-ui/src/views/orderMange/purchase/listInfoTwo.vue
  56. 21 1
      zkqy-ui/src/views/system/user/index.vue

+ 11 - 1
zkqy-admin/pom.xml

@@ -24,7 +24,6 @@
             <artifactId>spring-boot-devtools</artifactId>
             <optional>true</optional> <!-- 表示依赖不会传递 -->
         </dependency>
-
         <!-- swagger3-->
         <dependency>
             <groupId>io.springfox</groupId>
@@ -103,6 +102,17 @@
                     </execution>
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <fork>true</fork>
+                    <meminitial>512m</meminitial>
+                    <!-- 设置最大内存 -->
+                    <maxmem>4096m</maxmem>
+                </configuration>
+            </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-war-plugin</artifactId>

+ 8 - 0
zkqy-admin/src/main/java/com/zkqy/ZkqyServletInitializer.java

@@ -16,4 +16,12 @@ public class ZkqyServletInitializer extends SpringBootServletInitializer
         System.out.println("新仓库第一次提交");
         return application.sources(ZkqyApplication.class);
     }
+
+
+    public static void main(String[] args) {
+        for (int i = 0; i < 10; i++) {
+            System.out.println(i);
+        }
+    }
+
 }

+ 0 - 1
zkqy-admin/src/main/java/com/zkqy/web/controller/system/SysUserController.java

@@ -151,7 +151,6 @@ public class SysUserController extends BaseController {
         if (getTenantId() != null) {
             user.setTenantId(getTenantId());
         }
-
         return toAjax(userService.insertUser(user));
     }
 

+ 4 - 2
zkqy-business/src/main/java/com/zkqy/business/controller/MobilePageDataController.java

@@ -1,5 +1,6 @@
 package com.zkqy.business.controller;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.zkqy.business.entity.MobilePageData;
 import com.zkqy.business.service.IMobilePageDataService;
 import com.zkqy.common.annotation.Log;
@@ -51,7 +52,8 @@ public class MobilePageDataController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:data:list')")
     @GetMapping("/getIndexTrue")
     @ApiOperation(value = "查询当前租户的首页信息")
-    public AjaxResult IndexTrue() {
+    public AjaxResult IndexTrue() throws JsonProcessingException {
+//        return success(mobilePageDataService.selectMobilePageDataById(id));
         MobilePageData mobilePageData = mobilePageDataService.selectMobilePageDataIndexTrue();
         return AjaxResult.success(mobilePageData);
     }
@@ -78,7 +80,7 @@ public class MobilePageDataController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:data:query')")
     @GetMapping(value = "/{id}")
     @ApiOperation(value = "获取移动端数据详细信息")
-    public AjaxResult getInfo(@PathVariable("id") Long id) {
+    public AjaxResult getInfo(@PathVariable("id") Long id) throws JsonProcessingException {
         return success(mobilePageDataService.selectMobilePageDataById(id));
     }
 

+ 35 - 4
zkqy-business/src/main/java/com/zkqy/business/entity/MobilePageData.java

@@ -2,8 +2,6 @@ package com.zkqy.business.entity;
 
 import com.zkqy.common.annotation.Excel;
 import com.zkqy.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 移动端数据对象 mobile_page_data
@@ -26,8 +24,41 @@ public class MobilePageData extends BaseEntity
     @Excel(name = "模版json")
     private String pageJson;
 
-    @Excel
-    private  String isIndex;
+    @Excel(name = "是否是首页")
+    private String isIndex;
+
+    @Excel(name = "表单对应数据库字段")
+    private String  fromMapDb;
+
+    @Excel(name = "下拉框对应的数据表")
+    private String  selectQualifiedField;
+
+    @Excel(name = "下拉框数据(1、默认数据 2、动态数据)")
+    private  String selectMapValueList;
+
+    public String getFromMapDb() {
+        return fromMapDb;
+    }
+
+    public void setFromMapDb(String fromMapDb) {
+        this.fromMapDb = fromMapDb;
+    }
+
+    public String getSelectQualifiedField() {
+        return selectQualifiedField;
+    }
+
+    public void setSelectQualifiedField(String selectQualifiedField) {
+        this.selectQualifiedField = selectQualifiedField;
+    }
+
+    public String getSelectMapValueList() {
+        return selectMapValueList;
+    }
+
+    public void setSelectMapValueList(String selectMapValueList) {
+        this.selectMapValueList = selectMapValueList;
+    }
 
     public String getIsIndex() {
         return isIndex;

+ 2 - 0
zkqy-business/src/main/java/com/zkqy/business/mapper/MobilePageDataMapper.java

@@ -2,6 +2,7 @@ package com.zkqy.business.mapper;
 
 
 import com.zkqy.business.entity.MobilePageData;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
 
@@ -12,6 +13,7 @@ import java.util.List;
  * @author zkqy
  * @date 2024-04-18
  */
+@Mapper
 public interface MobilePageDataMapper 
 {
     /**

+ 3 - 2
zkqy-business/src/main/java/com/zkqy/business/service/IMobilePageDataService.java

@@ -2,6 +2,7 @@ package com.zkqy.business.service;
 
 
 
+import com.fasterxml.jackson.core.JsonProcessingException;
 import com.zkqy.business.entity.MobilePageData;
 
 import java.util.List;
@@ -21,14 +22,14 @@ public interface IMobilePageDataService
      * @param id 移动端数据主键
      * @return 移动端数据
      */
-    public MobilePageData selectMobilePageDataById(Long id);
+    public MobilePageData selectMobilePageDataById(Long id) throws JsonProcessingException;
 
 
     /**
      * 查询首页信息
      * @return 移动端数据
      */
-    public MobilePageData selectMobilePageDataIndexTrue();
+    public MobilePageData selectMobilePageDataIndexTrue() throws JsonProcessingException;
 
     /**
      * 查询移动端数据列表

+ 120 - 6
zkqy-business/src/main/java/com/zkqy/business/service/impl/MobilePageDataServiceImpl.java

@@ -1,13 +1,20 @@
 package com.zkqy.business.service.impl;
 
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.json.JsonMapper;
 import com.zkqy.business.entity.MobilePageData;
 import com.zkqy.business.mapper.MobilePageDataMapper;
 import com.zkqy.business.service.IMobilePageDataService;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.execution.produce.dispersed.mapper.CommonMapper;
+import com.zkqy.execution.produce.dispersed.service.impl.CommonServiceImpl;
+import net.bytebuddy.jar.asm.TypeReference;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import java.util.List;
+import java.util.*;
 
 /**
  * 移动端数据Service业务层处理
@@ -22,6 +29,9 @@ public class MobilePageDataServiceImpl implements IMobilePageDataService
     @Autowired
     private MobilePageDataMapper mobilePageDataMapper;
 
+    @Autowired
+    private CommonMapper commonMapper;
+
     /**
      * 查询移动端数据
      * 
@@ -29,14 +39,117 @@ public class MobilePageDataServiceImpl implements IMobilePageDataService
      * @return 移动端数据
      */
     @Override
-    public MobilePageData selectMobilePageDataById(Long id)
-    {
-        return mobilePageDataMapper.selectMobilePageDataById(id);
+    public MobilePageData selectMobilePageDataById(Long id) throws JsonProcessingException {
+        //JSON转换器
+        ObjectMapper objectMapper = new ObjectMapper();
+        //查询出来的总体数据
+        MobilePageData mobilePageData = mobilePageDataMapper.selectMobilePageDataById(id);
+        //下拉框限定的数据查询
+        String selectQualifiedField = mobilePageData.getSelectQualifiedField();
+        List<Map<String,String>> selectQualifiedFieldListMap=objectMapper.readValue(selectQualifiedField, List.class);
+        //存下拉框回显数据的值
+        String selectMapValueList = mobilePageData.getSelectMapValueList();
+        //new 一个hashMap对象放数据 "{"下拉框数据key":[{"lable","111111,value":"2222"}]}"
+        HashMap<String,Object> stringObjectHashMap=new HashMap<>();
+        //循环映射条件
+        selectQualifiedFieldListMap.forEach(item->{
+            String tableName = item.get("tableName");
+            String label = item.get("label");
+            String value=item.get("label");
+            try {
+                List<Map<String,Object>>  queryCondition= objectMapper.readValue(item.get("queryCondition"), List.class);
+                HashMap<String, Object> objectObjectHashMap = new HashMap<>();
+                //有默认的用户信息值,就替换掉
+                queryCondition.forEach(k->{
+                    k.forEach((key,vl)->{
+                        if(key.equals("#{userId}")){
+                            objectObjectHashMap.put(key,SecurityUtils.getUserId().toString());
+                        }else {
+                            objectObjectHashMap.put(key,vl);
+                        }
+                    });
+                });
+                //查询下拉框数据值
+                List<Map<String, Object>> maps = commonMapper.selectDropDownList(tableName, label, value, objectObjectHashMap);
+              //建立数据key和下拉框数据的对应关系
+              stringObjectHashMap.put(item.get("selectDataKey").toString(),maps);
+            } catch (JsonProcessingException e) {
+                throw new RuntimeException(e);
+            }
+        });
+        //证明以前有默认数据
+        if(selectMapValueList!=null&&selectMapValueList!=""){
+            //默认数据转map
+            Map<String,Object>  defaultJson= objectMapper.readValue(selectMapValueList, Map.class);
+            //查询出来的默认数据所用字段赋值为空
+            mobilePageData.setSelectMapValueList("");
+            //把默认数据往数据map里面堆
+            stringObjectHashMap.putAll(defaultJson);
+            //从新设置下拉框数据信息字段(这字段包含所有的下拉框数据)
+            mobilePageData.setSelectMapValueList(objectMapper.writeValueAsString(stringObjectHashMap));//mao对象转json放入到字段中
+        }else {
+            //直接放数据不存在默认数据
+            mobilePageData.setSelectMapValueList(objectMapper.writeValueAsString(stringObjectHashMap));//mao对象转json放入到字段中
+        }
+        return mobilePageData;
     }
 
     @Override
-    public MobilePageData selectMobilePageDataIndexTrue() {
-        return mobilePageDataMapper.selectMobilePageDataIndexTrue();
+    public MobilePageData selectMobilePageDataIndexTrue() throws JsonProcessingException {
+        //JSON转换器
+        ObjectMapper objectMapper = new ObjectMapper();
+        //查询出来的总体数据
+        MobilePageData mobilePageData = mobilePageDataMapper.selectMobilePageDataIndexTrue();
+        //new 一个hashMap对象放数据 "{"下拉框数据key":[{"lable","111111,value":"2222"}]}"
+        HashMap<String,Object> stringObjectHashMap=new HashMap<>();
+        //下拉框限定的数据查询
+        if(mobilePageData.getSelectQualifiedField()!=null&&mobilePageData.getSelectQualifiedField()!=""){
+            String selectQualifiedField = mobilePageData.getSelectQualifiedField();
+            List<Map<String,String>> selectQualifiedFieldListMap=objectMapper.readValue(selectQualifiedField, List.class);
+            //循环映射条件
+            selectQualifiedFieldListMap.forEach(item->{
+                String tableName = item.get("tableName");
+                String label = item.get("label");
+                String value=item.get("value");
+                try {
+                    List<Map<String,Object>>  queryCondition= objectMapper.readValue(item.get("queryCondition"), List.class);
+                    HashMap<String, Object> objectObjectHashMap = new HashMap<>();
+                    //有默认的用户信息值,就替换掉
+                    queryCondition.forEach(k->{
+                        k.forEach((key,vl)->{
+                            if(key.equals("#{userId}")){
+                                objectObjectHashMap.put(key,SecurityUtils.getUserId().toString());
+                            }else {
+                                objectObjectHashMap.put(key,vl);
+                            }
+                        });
+                    });
+                    //查询下拉框数据值
+                    List<Map<String, Object>> maps = commonMapper.selectDropDownList(tableName, label, value, objectObjectHashMap);
+                    //建立数据key和下拉框数据的对应关系
+                    stringObjectHashMap.put(item.get("selectDataKey").toString(),maps);
+                } catch (JsonProcessingException e) {
+                    throw new RuntimeException(e);
+                }
+            });
+        }
+        //存下拉框回显数据的值
+        String selectMapValueList = mobilePageData.getSelectMapValueList();
+        //证明以前有默认数据
+        if(selectMapValueList!=null&&selectMapValueList!=""){
+            //默认数据转map
+            Map<String,Object>  defaultJson= objectMapper.readValue(selectMapValueList, Map.class);
+            //查询出来的默认数据所用字段赋值为空
+            mobilePageData.setSelectMapValueList("");
+            //把默认数据往数据map里面堆
+            stringObjectHashMap.putAll(defaultJson);
+            //从新设置下拉框数据信息字段(这字段包含所有的下拉框数据)
+            mobilePageData.setSelectMapValueList(objectMapper.writeValueAsString(stringObjectHashMap));//mao对象转json放入到字段中
+        }else {
+            //直接放数据不存在默认数据
+            mobilePageData.setSelectMapValueList(objectMapper.writeValueAsString(stringObjectHashMap));//mao对象转json放入到字段中
+        }
+        return mobilePageData;
     }
 
     /**
@@ -98,4 +211,5 @@ public class MobilePageDataServiceImpl implements IMobilePageDataService
     {
         return mobilePageDataMapper.deleteMobilePageDataById(id);
     }
+
 }

+ 5 - 1
zkqy-business/src/main/resources/mapper/dragmapper/MobilePageDataMapper.xml

@@ -8,10 +8,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="id"    column="id"    />
         <result property="name"    column="name"    />
         <result property="pageJson"    column="pageJson"    />
+        <result property="isIndex"    column="isIndex"    />
+        <result property="fromMapDb"    column="from_map_db"    />
+        <result property="selectQualifiedField"    column="select_qualified_field"    />
+        <result property="selectMapValueList"    column="select_map_value_list"    />
     </resultMap>
 
     <sql id="selectMobilePageDataVo">
-        select id, name, pageJson from {DBNAME}.mobile_page_data
+        select id, name, pageJson,isIndex,from_map_db,select_qualified_field,select_map_value_list from {DBNAME}.mobile_page_data
     </sql>
 
     <select id="selectMobilePageDataList" parameterType="com.zkqy.business.entity.MobilePageData" resultMap="MobilePageDataResult">

+ 13 - 0
zkqy-common/src/main/java/com/zkqy/common/core/domain/entity/SysUser.java

@@ -102,11 +102,24 @@ public class SysUser extends BaseEntity
     /** 租户名称 */
     private String tenantName;
 
+    @Excel(name = "帐号状态", readConverterExp = "0=允许,1=禁止")
+    private  String isCanTools;
+
     public SysUser()
     {
 
     }
 
+    public String getIsCanTools() {
+        return isCanTools;
+    }
+
+    public void setIsCanTools(String isCanTools) {
+        this.isCanTools = isCanTools;
+    }
+
+
+
     public SysUser(Long userId)
     {
         this.userId = userId;

+ 9 - 1
zkqy-common/src/main/java/com/zkqy/common/utils/StringUtils.java

@@ -36,6 +36,11 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
      */
     private static final String DATE_TIME_PATTERN2 = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}";
 
+    /**
+     * 带T的只有十分
+     */
+    private static final String DATE_TIME_PATTERN3 = "\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}";
+
     /**
      * 只有年月日的
      */
@@ -45,10 +50,13 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
     private static final Pattern pattern1 = Pattern.compile(DATE_TIME_PATTERN1);
     private static final Pattern pattern2 = Pattern.compile(DATE_TIME_PATTERN2);
 
+    private static final Pattern pattern3 = Pattern.compile(DATE_TIME_PATTERN3);
+
     public static boolean isValidDateTimeFormat(String input) {
         Matcher matcher1 = pattern1.matcher(input);
         Matcher matcher2 = pattern2.matcher(input);
-        return matcher1.matches() || matcher2.matches();
+        Matcher matcher3= pattern3.matcher(input);
+        return matcher1.matches() || matcher2.matches()||matcher3.matches();
     }
 
     /**

+ 12 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanController.java

@@ -6,6 +6,8 @@ import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import javax.servlet.http.HttpServletResponse;
 
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
+import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
 import com.zkqy.business.mapper.DetailsOfTheRefuelingPlanMapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -234,6 +236,16 @@ public class DetailsOfTheRefuelingPlanController extends BaseController {
         return toAjax(detailsOfTheRefuelingPlanService.deleteDetailsOfTheRefuelingPlanByIds(ids));
     }
 
+    /**
+     * 判断当前计划上的产品订单是否已经开始生产
+     */
+    @GetMapping("/list/getJtIsTheOrderProductProduced")
+    @ApiOperation(value = "查询纺丝计划详细信息列表")
+    public AjaxResult getJtIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        List<DetailsOfTheRefuelingPlanSpinning> list = detailsOfTheRefuelingPlanService.getJtIsTheOrderProductProduced(detailsOfTheRefuelingPlanSpinning);
+        return AjaxResult.success(list);
+    }
+
     /**
      * 删除加弹计划详细信息
      */

+ 113 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanLogsController.java

@@ -0,0 +1,113 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs;
+import com.zkqy.business.service.IDetailsOfTheRefuelingPlanLogsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 加弹计划详细信息日志信息Controller
+ *
+ * @author zkqy
+ * @date 2024-05-16
+ */
+@RestController
+@RequestMapping("/system/logs")
+@Api(value = "/system/logs", description = "加弹计划详细信息日志信息-接口")
+public class DetailsOfTheRefuelingPlanLogsController extends BaseController
+{
+    @Autowired
+    private IDetailsOfTheRefuelingPlanLogsService detailsOfTheRefuelingPlanLogsService;
+
+    /**
+     * 查询加弹计划详细信息日志信息列表
+     */
+    //@PreAuthorize("@ss.hasPermi('system:logs:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询加弹计划详细信息日志信息列表")
+    public TableDataInfo list(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        startPage();
+        List<DetailsOfTheRefuelingPlanLogs> list = detailsOfTheRefuelingPlanLogsService.selectDetailsOfTheRefuelingPlanLogsList(detailsOfTheRefuelingPlanLogs);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出加弹计划详细信息日志信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:export')")
+    @Log(title = "加弹计划详细信息日志信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出加弹计划详细信息日志信息列表")
+    public void export(HttpServletResponse response, DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        List<DetailsOfTheRefuelingPlanLogs> list = detailsOfTheRefuelingPlanLogsService.selectDetailsOfTheRefuelingPlanLogsList(detailsOfTheRefuelingPlanLogs);
+        ExcelUtil<DetailsOfTheRefuelingPlanLogs> util = new ExcelUtil<DetailsOfTheRefuelingPlanLogs>(DetailsOfTheRefuelingPlanLogs.class);
+        util.exportExcel(response, list, "加弹计划详细信息日志信息数据");
+    }
+
+    /**
+     * 获取加弹计划详细信息日志信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取加弹计划详细信息日志信息详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(detailsOfTheRefuelingPlanLogsService.selectDetailsOfTheRefuelingPlanLogsById(id));
+    }
+
+    /**
+     * 新增加弹计划详细信息日志信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:add')")
+    @Log(title = "加弹计划详细信息日志信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增加弹计划详细信息日志信息")
+    public AjaxResult add(@RequestBody DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        return toAjax(detailsOfTheRefuelingPlanLogsService.insertDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs));
+    }
+
+    /**
+     * 修改加弹计划详细信息日志信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:edit')")
+    @Log(title = "加弹计划详细信息日志信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改加弹计划详细信息日志信息")
+    public AjaxResult edit(@RequestBody DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        return toAjax(detailsOfTheRefuelingPlanLogsService.updateDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs));
+    }
+
+    /**
+     * 删除加弹计划详细信息日志信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:remove')")
+    @Log(title = "加弹计划详细信息日志信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除加弹计划详细信息日志信息")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(detailsOfTheRefuelingPlanLogsService.deleteDetailsOfTheRefuelingPlanLogsByIds(ids));
+    }
+}

+ 29 - 22
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanSpinningController.java

@@ -61,6 +61,34 @@ public class DetailsOfTheRefuelingPlanSpinningController extends BaseController
         return AjaxResult.success(list);
     }
 
+    @GetMapping("/list/getUpdatePlanSpinningInfo")
+    @ApiOperation(value = "回显查询不等生产中的产品计划")
+    public AjaxResult updateGetPlanSpinningInfo(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        List<DetailsOfTheRefuelingPlanSpinning> list = detailsOfTheRefuelingPlanSpinningService.updateGetPlanSpinningInfo(detailsOfTheRefuelingPlanSpinning);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 查询除当前机台上,除当前产品外还有没有其他上级产品或者停机产品
+     */
+//    //@PreAuthorize("@ss.hasPermi('system:spinning:list')")
+    @GetMapping("/list/getCurrentProductionLineSuperior")
+    @ApiOperation(value = "除当前产品外还有没有其他上级产品或者停机产品")
+    public AjaxResult getCurrentProductionLineSuperior(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        List<DetailsOfTheRefuelingPlanSpinning> list = detailsOfTheRefuelingPlanSpinningService.getCurrentProductionLineSuperior(detailsOfTheRefuelingPlanSpinning);
+        return AjaxResult.success(list);
+    }
+
+
+    /**
+     * 判断当前计划上的产品订单是否已经开始生产
+     */
+    @GetMapping("/list/getIsTheOrderProductProduced")
+    @ApiOperation(value = "查询纺丝计划详细信息列表")
+    public AjaxResult getIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        List<DetailsOfTheRefuelingPlanSpinning> list = detailsOfTheRefuelingPlanSpinningService.getIsTheOrderProductProduced(detailsOfTheRefuelingPlanSpinning);
+        return AjaxResult.success(list);
+    }
 
 
 
@@ -76,18 +104,7 @@ public class DetailsOfTheRefuelingPlanSpinningController extends BaseController
     }
 
 
-//    /**
-//     * 导出纺丝计划详细信息列表
-//     */
-//    //@PreAuthorize("@ss.hasPermi('system:spinning:export')")
-//    @Log(title = "纺丝计划详细信息", businessType = BusinessType.EXPORT)
-//    @PostMapping("/export")
-//    @ApiOperation(value = "导出纺丝计划详细信息列表")
-//    public void export(HttpServletResponse response, DetailsOfTheRefuelingPlanSpinning detailsOfTheRefuelingPlanSpinning) {
-//        List<DetailsOfTheRefuelingPlanSpinning> list = detailsOfTheRefuelingPlanSpinningService.selectDetailsOfTheRefuelingPlanSpinningList(detailsOfTheRefuelingPlanSpinning);
-//        ExcelUtil<DetailsOfTheRefuelingPlanSpinning> util = new ExcelUtil<DetailsOfTheRefuelingPlanSpinning>(DetailsOfTheRefuelingPlanSpinning.class);
-//        util.exportExcel(response, list, "纺丝计划详细信息数据");
-//    }
+
 
     /**
      * 获取纺丝计划详细信息详细信息
@@ -99,16 +116,6 @@ public class DetailsOfTheRefuelingPlanSpinningController extends BaseController
         return success(detailsOfTheRefuelingPlanSpinningService.selectDetailsOfTheRefuelingPlanSpinningById(id));
     }
 
-    /**
-     * 新增纺丝计划详细信息
-     */
-//    //@PreAuthorize("@ss.hasPermi('system:spinning:add')")
-//    @Log(title = "纺丝计划详细信息", businessType = BusinessType.INSERT)
-//    @PostMapping
-//    @ApiOperation(value = "新增纺丝计划详细信息")
-//    public AjaxResult add(@RequestBody DetailsOfTheRefuelingPlanSpinning detailsOfTheRefuelingPlanSpinning) {
-//        return toAjax(detailsOfTheRefuelingPlanSpinningService.insertDetailsOfTheRefuelingPlanSpinning(detailsOfTheRefuelingPlanSpinning));
-//    }
 
     /**
      * 修改纺丝计划详细信息

+ 134 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/controller/DetailsOfTheRefuelingPlanSpinningLogsController.java

@@ -0,0 +1,134 @@
+package com.zkqy.business.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.controller.BaseController;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.enums.BusinessType;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs;
+import com.zkqy.business.service.IDetailsOfTheRefuelingPlanSpinningLogsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 纺丝/翻框/络桶/计划详细信息Controller
+ *
+ * @author zkqy
+ * @date 2024-05-16
+ */
+@RestController
+@RequestMapping("/system/fsfkltlogs")
+@Api(value = "/system/fsfkltlogs", description = "加弹计划详细信息-接口")
+public class DetailsOfTheRefuelingPlanSpinningLogsController extends BaseController
+{
+    @Autowired
+    private IDetailsOfTheRefuelingPlanSpinningLogsService detailsOfTheRefuelingPlanSpinningLogsService;
+
+/**
+ * 查询加弹计划详细信息列表
+ */
+//@PreAuthorize("@ss.hasPermi('system:logs:list')")
+    @GetMapping("/fslist")
+    @ApiOperation(value = "查询纺丝计划详细信息列表")
+    public TableDataInfo fslist(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        startPage();
+        detailsOfTheRefuelingPlanSpinningLogs.setPlanType("纺丝计划");
+        List<DetailsOfTheRefuelingPlanSpinningLogs> list = detailsOfTheRefuelingPlanSpinningLogsService.selectDetailsOfTheRefuelingPlanSpinningLogsList(detailsOfTheRefuelingPlanSpinningLogs);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/fklist")
+    @ApiOperation(value = "查询加弹计划详细信息列表")
+    public TableDataInfo fklist(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        startPage();
+        detailsOfTheRefuelingPlanSpinningLogs.setPlanType("翻框计划");
+        List<DetailsOfTheRefuelingPlanSpinningLogs> list = detailsOfTheRefuelingPlanSpinningLogsService.selectDetailsOfTheRefuelingPlanSpinningLogsList(detailsOfTheRefuelingPlanSpinningLogs);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/ltlist")
+    @ApiOperation(value = "查询加弹计划详细信息列表")
+    public TableDataInfo ltlist(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        startPage();
+        detailsOfTheRefuelingPlanSpinningLogs.setPlanType("络筒计划");
+        List<DetailsOfTheRefuelingPlanSpinningLogs> list = detailsOfTheRefuelingPlanSpinningLogsService.selectDetailsOfTheRefuelingPlanSpinningLogsList(detailsOfTheRefuelingPlanSpinningLogs);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出加弹计划详细信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:export')")
+    @Log(title = "加弹计划详细信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出加弹计划详细信息列表")
+    public void export(HttpServletResponse response, DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        List<DetailsOfTheRefuelingPlanSpinningLogs> list = detailsOfTheRefuelingPlanSpinningLogsService.selectDetailsOfTheRefuelingPlanSpinningLogsList(detailsOfTheRefuelingPlanSpinningLogs);
+        ExcelUtil<DetailsOfTheRefuelingPlanSpinningLogs> util = new ExcelUtil<DetailsOfTheRefuelingPlanSpinningLogs>(DetailsOfTheRefuelingPlanSpinningLogs.class);
+        util.exportExcel(response, list, "加弹计划详细信息数据");
+    }
+
+    /**
+     * 获取加弹计划详细信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取加弹计划详细信息详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(detailsOfTheRefuelingPlanSpinningLogsService.selectDetailsOfTheRefuelingPlanSpinningLogsById(id));
+    }
+
+    /**
+     * 新增加弹计划详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:add')")
+    @Log(title = "加弹计划详细信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增加弹计划详细信息")
+    public AjaxResult add(@RequestBody DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        return toAjax(detailsOfTheRefuelingPlanSpinningLogsService.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs));
+    }
+
+    /**
+     * 修改加弹计划详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:edit')")
+    @Log(title = "加弹计划详细信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改加弹计划详细信息")
+    public AjaxResult edit(@RequestBody DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        return toAjax(detailsOfTheRefuelingPlanSpinningLogsService.updateDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs));
+    }
+
+    /**
+     * 删除加弹计划详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:logs:remove')")
+    @Log(title = "加弹计划详细信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除加弹计划详细信息")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(detailsOfTheRefuelingPlanSpinningLogsService.deleteDetailsOfTheRefuelingPlanSpinningLogsByIds(ids));
+    }
+}

+ 24 - 1
zkqy-custom-business/src/main/java/com/zkqy/business/controller/SaleProductsController.java

@@ -4,6 +4,8 @@ import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
 import com.zkqy.business.domain.vo.SaleProductsVo;
+import com.zkqy.business.mapper.SaleOrderMapper;
+import com.zkqy.business.mapper.SaleProductsMapper;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -32,6 +34,9 @@ public class SaleProductsController extends BaseController {
     @Autowired
     private ISaleProductsService saleProductsService;
 
+    @Autowired
+    private SaleProductsMapper saleProductsMapper;
+
     /**
      * @RequestParam("saleNo") String saleNo
      * //saleProducts.setSaleOrderNo(saleNo);
@@ -39,15 +44,33 @@ public class SaleProductsController extends BaseController {
      */
     @GetMapping("/getProducts")
     @ApiOperation(value = "查询销售产品列表")
-    public AjaxResult getProducts() {
+    public AjaxResult getProducts(@RequestParam("productionLineNo") String productionLineNo) {
         //销售单什么状态为3的(待生产)
         SaleProducts saleProducts=new SaleProducts();
         saleProducts.setStatus("3");
+        saleProducts.setProductionLineNo(productionLineNo); //不查在当前产线投产过的产品了
         List<SaleProductsVo> list = saleProductsService.selectSaleProductsListAndCustomerName(saleProducts);
         return AjaxResult.success(list);
     }
 
 
+    /**
+     * 查询全部的销售产品
+     * @return
+     */
+    @GetMapping("/getProductsAll")
+    @ApiOperation(value = "查询销售产品列表")
+    public AjaxResult getProductsAll(@RequestParam("productionLineNo") String productionLineNo) {
+        //产线是空且是待生产的订单当前产线的计划产品信息
+        SaleProducts saleProducts2=new SaleProducts();
+        saleProducts2.setProductionLineNo(productionLineNo);
+        //当前产线上的所有计划产品
+        List<SaleProductsVo> saleProductsVos = saleProductsMapper.selectSaleProductsListAndCustomInfoThread(saleProducts2);
+        return AjaxResult.success(saleProductsVos);
+    }
+
+
+
     /**
      * 查询销售产品列表
      */

+ 250 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanLogs.java

@@ -0,0 +1,250 @@
+package com.zkqy.business.domain;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 加弹计划详细信息日志信息对象 details_of_the_refueling_plan_logs
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+public class DetailsOfTheRefuelingPlanLogs extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 机台id */
+    @Excel(name = "机台id")
+    private Long macId;
+
+    /** 机台编号 */
+    @Excel(name = "机台编号")
+    private String machineId;
+
+    /** 产品类型(A面,B面) */
+    @Excel(name = "产品类型", readConverterExp = "A=面,B面")
+    private String productType;
+
+    /** 生产色号 */
+    @Excel(name = "生产色号")
+    private String currentColorCode;
+
+    /** 生产规格 */
+    @Excel(name = "生产规格")
+    private String currentSpecification;
+
+    /** 生产批号 */
+    @Excel(name = "生产批号")
+    private String currentLotNumber;
+
+    /** 锭数 */
+    @Excel(name = "锭数")
+    private String currentSpindleCount;
+
+    /** 产品类型名 */
+    @Excel(name = "产品类型名")
+    private String productTypeName;
+
+    /** 数量    */
+    @Excel(name = "数量   ")
+    private String number;
+
+    /** 上级时间 */
+    @Excel(name = "上级时间")
+    private String startTime;
+
+    /** 计划下级时间 */
+    @Excel(name = "计划下级时间")
+    private String plannedEndTime;
+
+    /** 计划状态(0:待机 1:上机 2: 停机 3:已完成) */
+    @Excel(name = "计划状态", readConverterExp = "0=:待机,1=:上机,2=:,停=机,3=:已完成")
+    private String planStatus;
+
+
+    /** 产品id */
+    @Excel(name = "产品id")
+    private String productId;
+
+    /** 订单id */
+    @Excel(name = "订单id")
+    private String orderId;
+
+    @Excel(name = "操作类型 0.新增 1.删除 2.修改")
+    private String operation;
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setMacId(Long macId) 
+    {
+        this.macId = macId;
+    }
+
+    public Long getMacId() 
+    {
+        return macId;
+    }
+    public void setMachineId(String machineId) 
+    {
+        this.machineId = machineId;
+    }
+
+    public String getMachineId() 
+    {
+        return machineId;
+    }
+    public void setProductType(String productType) 
+    {
+        this.productType = productType;
+    }
+
+    public String getProductType() 
+    {
+        return productType;
+    }
+    public void setCurrentColorCode(String currentColorCode) 
+    {
+        this.currentColorCode = currentColorCode;
+    }
+
+    public String getCurrentColorCode() 
+    {
+        return currentColorCode;
+    }
+    public void setCurrentSpecification(String currentSpecification) 
+    {
+        this.currentSpecification = currentSpecification;
+    }
+
+    public String getCurrentSpecification() 
+    {
+        return currentSpecification;
+    }
+    public void setCurrentLotNumber(String currentLotNumber) 
+    {
+        this.currentLotNumber = currentLotNumber;
+    }
+
+    public String getCurrentLotNumber() 
+    {
+        return currentLotNumber;
+    }
+    public void setCurrentSpindleCount(String currentSpindleCount) 
+    {
+        this.currentSpindleCount = currentSpindleCount;
+    }
+
+    public String getCurrentSpindleCount() 
+    {
+        return currentSpindleCount;
+    }
+    public void setProductTypeName(String productTypeName) 
+    {
+        this.productTypeName = productTypeName;
+    }
+
+    public String getProductTypeName() 
+    {
+        return productTypeName;
+    }
+    public void setNumber(String number) 
+    {
+        this.number = number;
+    }
+
+    public String getNumber() 
+    {
+        return number;
+    }
+    public void setStartTime(String startTime) 
+    {
+        this.startTime = startTime;
+    }
+
+    public String getStartTime() 
+    {
+        return startTime;
+    }
+    public void setPlannedEndTime(String plannedEndTime) 
+    {
+        this.plannedEndTime = plannedEndTime;
+    }
+
+    public String getPlannedEndTime() 
+    {
+        return plannedEndTime;
+    }
+    public void setPlanStatus(String planStatus) 
+    {
+        this.planStatus = planStatus;
+    }
+
+    public String getPlanStatus() 
+    {
+        return planStatus;
+    }
+
+    public void setProductId(String productId) 
+    {
+        this.productId = productId;
+    }
+
+    public String getProductId() 
+    {
+        return productId;
+    }
+
+    public void setOrderId(String orderId) 
+    {
+        this.orderId = orderId;
+    }
+
+    public String getOrderId() 
+    {
+        return orderId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("macId", getMacId())
+            .append("machineId", getMachineId())
+            .append("productType", getProductType())
+            .append("currentColorCode", getCurrentColorCode())
+            .append("currentSpecification", getCurrentSpecification())
+            .append("currentLotNumber", getCurrentLotNumber())
+            .append("currentSpindleCount", getCurrentSpindleCount())
+            .append("productTypeName", getProductTypeName())
+            .append("number", getNumber())
+            .append("startTime", getStartTime())
+            .append("plannedEndTime", getPlannedEndTime())
+            .append("planStatus", getPlanStatus())
+            .append("remark", getRemark())
+
+            .append("productId", getProductId())
+            .append("orderId", getOrderId())
+            .toString();
+    }
+}

+ 69 - 147
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinning.java

@@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.zkqy.common.annotation.Excel;
 
+import java.util.Date;
+
 /**
  * 加弹计划详细信息对象 details_of_the_refueling_plan_spinning
  * 
@@ -22,8 +24,6 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
     @Excel(name = "机台id")
     private  String  macId;
 
-
-
     /** 时间戳唯一码 */
     @Excel(name = "时间戳唯一码")
     private String timestampRandomCode;
@@ -64,21 +64,6 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
     @Excel(name = "数量   ")
     private String number;
 
-    /** 创建人id */
-    @Excel(name = "创建人id")
-    private String createbyId;
-
-    /** 创建人姓名 */
-    @Excel(name = "创建人姓名")
-    private String createbyName;
-
-    /** 修改人id */
-    @Excel(name = "修改人id")
-    private String updatebyId;
-
-    /** 修改人姓名 */
-    @Excel(name = "修改人姓名")
-    private String updatebyName;
 
     /** 产品id */
     @Excel(name = "产品id")
@@ -91,198 +76,135 @@ public class DetailsOfTheRefuelingPlanSpinning extends BaseEntity
     @Excel(name = "产品名称")
     private  String  productTypeName;
 
-    public String getProductTypeName() {
-        return productTypeName;
-    }
+    @Excel
+    private  String  planType;
 
-    public void setProductTypeName(String productTypeName) {
-        this.productTypeName = productTypeName;
+    public Long getId() {
+        return id;
     }
 
-    public void setId(Long id)
-    {
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public String getMacId() {
+        return macId;
     }
-    public void setTimestampRandomCode(String timestampRandomCode) 
-    {
-        this.timestampRandomCode = timestampRandomCode;
+
+    public void setMacId(String macId) {
+        this.macId = macId;
     }
 
-    public String getTimestampRandomCode() 
-    {
+    public String getTimestampRandomCode() {
         return timestampRandomCode;
     }
-    public void setMachineId(String machineId) 
-    {
-        this.machineId = machineId;
+
+    public void setTimestampRandomCode(String timestampRandomCode) {
+        this.timestampRandomCode = timestampRandomCode;
     }
 
-    public String getMachineId() 
-    {
+    public String getMachineId() {
         return machineId;
     }
-    public void setProductionDigit(String productionDigit) 
-    {
-        this.productionDigit = productionDigit;
+
+    public void setMachineId(String machineId) {
+        this.machineId = machineId;
     }
 
-    public String getProductionDigit() 
-    {
+    public String getProductionDigit() {
         return productionDigit;
     }
-    public void setCurrentColorCode(String currentColorCode) 
-    {
-        this.currentColorCode = currentColorCode;
+
+    public void setProductionDigit(String productionDigit) {
+        this.productionDigit = productionDigit;
     }
 
-    public String getCurrentColorCode() 
-    {
+    public String getCurrentColorCode() {
         return currentColorCode;
     }
-    public void setCurrentSpecification(String currentSpecification) 
-    {
-        this.currentSpecification = currentSpecification;
-    }
 
-    public String getMacId() {
-        return macId;
+    public void setCurrentColorCode(String currentColorCode) {
+        this.currentColorCode = currentColorCode;
     }
 
-    public void setMacId(String macId) {
-        this.macId = macId;
-    }
-    public String getCurrentSpecification() 
-    {
+    public String getCurrentSpecification() {
         return currentSpecification;
     }
-    public void setCurrentLotNumber(String currentLotNumber) 
-    {
-        this.currentLotNumber = currentLotNumber;
+
+    public void setCurrentSpecification(String currentSpecification) {
+        this.currentSpecification = currentSpecification;
     }
 
-    public String getCurrentLotNumber() 
-    {
+    public String getCurrentLotNumber() {
         return currentLotNumber;
     }
-    public void setStartTime(String startTime) 
-    {
-        this.startTime = startTime;
+
+    public void setCurrentLotNumber(String currentLotNumber) {
+        this.currentLotNumber = currentLotNumber;
     }
 
-    public String getStartTime() 
-    {
+    public String getStartTime() {
         return startTime;
     }
-    public void setPlannedEndTime(String plannedEndTime) 
-    {
-        this.plannedEndTime = plannedEndTime;
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
     }
 
-    public String getPlannedEndTime() 
-    {
+    public String getPlannedEndTime() {
         return plannedEndTime;
     }
-    public void setPlanStatus(String planStatus) 
-    {
-        this.planStatus = planStatus;
+
+    public void setPlannedEndTime(String plannedEndTime) {
+        this.plannedEndTime = plannedEndTime;
     }
 
-    public String getPlanStatus() 
-    {
+    public String getPlanStatus() {
         return planStatus;
     }
-    public void setNumber(String number) 
-    {
-        this.number = number;
+
+    public void setPlanStatus(String planStatus) {
+        this.planStatus = planStatus;
     }
 
-    public String getNumber() 
-    {
+    public String getNumber() {
         return number;
     }
-    public void setCreatebyId(String createbyId) 
-    {
-        this.createbyId = createbyId;
-    }
 
-    public String getCreatebyId() 
-    {
-        return createbyId;
-    }
-    public void setCreatebyName(String createbyName) 
-    {
-        this.createbyName = createbyName;
+    public void setNumber(String number) {
+        this.number = number;
     }
 
-    public String getCreatebyName() 
-    {
-        return createbyName;
-    }
-    public void setUpdatebyId(String updatebyId) 
-    {
-        this.updatebyId = updatebyId;
-    }
 
-    public String getUpdatebyId() 
-    {
-        return updatebyId;
-    }
-    public void setUpdatebyName(String updatebyName) 
-    {
-        this.updatebyName = updatebyName;
+    public String getProductId() {
+        return productId;
     }
 
-    public String getUpdatebyName() 
-    {
-        return updatebyName;
-    }
-    public void setProductId(String productId) 
-    {
+    public void setProductId(String productId) {
         this.productId = productId;
     }
 
-    public String getProductId() 
-    {
-        return productId;
+    public String getSalesmanId() {
+        return salesmanId;
     }
-    public void setSalesmanId(String salesmanId) 
-    {
+
+    public void setSalesmanId(String salesmanId) {
         this.salesmanId = salesmanId;
     }
 
-    public String getSalesmanId() 
-    {
-        return salesmanId;
+    public String getProductTypeName() {
+        return productTypeName;
+    }
+
+    public void setProductTypeName(String productTypeName) {
+        this.productTypeName = productTypeName;
+    }
+
+    public String getPlanType() {
+        return planType;
     }
 
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("timestampRandomCode", getTimestampRandomCode())
-            .append("machineId", getMachineId())
-            .append("productionDigit", getProductionDigit())
-            .append("currentColorCode", getCurrentColorCode())
-            .append("currentSpecification", getCurrentSpecification())
-            .append("currentLotNumber", getCurrentLotNumber())
-            .append("startTime", getStartTime())
-            .append("plannedEndTime", getPlannedEndTime())
-            .append("planStatus", getPlanStatus())
-            .append("number", getNumber())
-            .append("remark", getRemark())
-            .append("createbyId", getCreatebyId())
-            .append("createbyName", getCreatebyName())
-            .append("updatebyId", getUpdatebyId())
-            .append("updatebyName", getUpdatebyName())
-            .append("createTime", getCreateTime())
-            .append("updateTime", getUpdateTime())
-            .append("productId", getProductId())
-            .append("salesmanId", getSalesmanId())
-            .toString();
+    public void setPlanType(String planType) {
+        this.planType = planType;
     }
 }

+ 255 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/DetailsOfTheRefuelingPlanSpinningLogs.java

@@ -0,0 +1,255 @@
+package com.zkqy.business.domain;
+
+import com.zkqy.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 加弹计划详细信息对象 details_of_the_refueling_plan_spinning_logs
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+public class DetailsOfTheRefuelingPlanSpinningLogs extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 机台号 */
+    @Excel(name = "机台号")
+    private String machineId;
+
+    /** 机台id */
+    @Excel(name = "机台id")
+    private Long macId;
+
+    /** 销售订单号 */
+    @Excel(name = "销售订单号")
+    private String orderId;
+
+    /** 产品类型名 */
+    @Excel(name = "产品类型名")
+    private String productTypeName;
+
+    /** 生产位数 */
+    @Excel(name = "生产位数")
+    private String productionDigit;
+
+    /** 生产色号 */
+    @Excel(name = "生产色号")
+    private String currentColorCode;
+
+    /** 生产规格 */
+    @Excel(name = "生产规格")
+    private String currentSpecification;
+
+    /** 生产批号 */
+    @Excel(name = "生产批号")
+    private String currentLotNumber;
+
+    /** 上级时间 */
+    @Excel(name = "上级时间")
+    private String startTime;
+
+    /** 计划下级时间 */
+    @Excel(name = "计划下级时间")
+    private String plannedEndTime;
+
+    /** 计划状态(0:待机 1:上机 2: 停机 3:已完成) */
+    @Excel(name = "计划状态", readConverterExp = "0=:待机,1=:上机,2=:,停=机,3=:已完成")
+    private String planStatus;
+
+    /** 数量    */
+    @Excel(name = "数量   ")
+    private String number;
+
+    /** 产品id */
+    @Excel(name = "产品id")
+    private String productId;
+
+    /** 计划类型 */
+    @Excel(name = "计划类型")
+    private String planType;
+
+    /** 计划类型 */
+    @Excel(name = "计划类型")
+    private String operation;
+
+
+    public String getOperation() {
+        return operation;
+    }
+
+    public void setOperation(String operation) {
+        this.operation = operation;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setMachineId(String machineId) 
+    {
+        this.machineId = machineId;
+    }
+
+    public String getMachineId() 
+    {
+        return machineId;
+    }
+    public void setMacId(Long macId) 
+    {
+        this.macId = macId;
+    }
+
+    public Long getMacId() 
+    {
+        return macId;
+    }
+    public void setOrderId(String orderId) 
+    {
+        this.orderId = orderId;
+    }
+
+    public String getOrderId() 
+    {
+        return orderId;
+    }
+    public void setProductTypeName(String productTypeName) 
+    {
+        this.productTypeName = productTypeName;
+    }
+
+    public String getProductTypeName() 
+    {
+        return productTypeName;
+    }
+    public void setProductionDigit(String productionDigit) 
+    {
+        this.productionDigit = productionDigit;
+    }
+
+    public String getProductionDigit() 
+    {
+        return productionDigit;
+    }
+    public void setCurrentColorCode(String currentColorCode) 
+    {
+        this.currentColorCode = currentColorCode;
+    }
+
+    public String getCurrentColorCode() 
+    {
+        return currentColorCode;
+    }
+    public void setCurrentSpecification(String currentSpecification) 
+    {
+        this.currentSpecification = currentSpecification;
+    }
+
+    public String getCurrentSpecification() 
+    {
+        return currentSpecification;
+    }
+    public void setCurrentLotNumber(String currentLotNumber) 
+    {
+        this.currentLotNumber = currentLotNumber;
+    }
+
+    public String getCurrentLotNumber() 
+    {
+        return currentLotNumber;
+    }
+    public void setStartTime(String startTime) 
+    {
+        this.startTime = startTime;
+    }
+
+    public String getStartTime() 
+    {
+        return startTime;
+    }
+    public void setPlannedEndTime(String plannedEndTime) 
+    {
+        this.plannedEndTime = plannedEndTime;
+    }
+
+    public String getPlannedEndTime() 
+    {
+        return plannedEndTime;
+    }
+    public void setPlanStatus(String planStatus) 
+    {
+        this.planStatus = planStatus;
+    }
+
+    public String getPlanStatus() 
+    {
+        return planStatus;
+    }
+    public void setNumber(String number) 
+    {
+        this.number = number;
+    }
+
+    public String getNumber() 
+    {
+        return number;
+    }
+
+
+    public void setProductId(String productId) 
+    {
+        this.productId = productId;
+    }
+
+    public String getProductId() 
+    {
+        return productId;
+    }
+    public void setPlanType(String planType) 
+    {
+        this.planType = planType;
+    }
+
+    public String getPlanType() 
+    {
+        return planType;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("machineId", getMachineId())
+            .append("macId", getMacId())
+            .append("orderId", getOrderId())
+            .append("productTypeName", getProductTypeName())
+            .append("productionDigit", getProductionDigit())
+            .append("currentColorCode", getCurrentColorCode())
+            .append("currentSpecification", getCurrentSpecification())
+            .append("currentLotNumber", getCurrentLotNumber())
+            .append("startTime", getStartTime())
+            .append("plannedEndTime", getPlannedEndTime())
+            .append("planStatus", getPlanStatus())
+            .append("number", getNumber())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("createTime", getCreateTime())
+            .append("updateTime", getUpdateTime())
+            .append("productId", getProductId())
+            .append("planType", getPlanType())
+            .toString();
+    }
+}

+ 29 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/domain/vo/PurchaseInfoVo.java

@@ -1,5 +1,10 @@
 package com.zkqy.business.domain.vo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+
 public class PurchaseInfoVo {
 
     /**
@@ -60,6 +65,30 @@ public class PurchaseInfoVo {
 
     private  String  quantity;
 
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime procurementTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime estimatedDeliveryTime;
+
+    public LocalDateTime getProcurementTime() {
+        return procurementTime;
+    }
+
+    public void setProcurementTime(LocalDateTime procurementTime) {
+        this.procurementTime = procurementTime;
+    }
+
+    public LocalDateTime getEstimatedDeliveryTime() {
+        return estimatedDeliveryTime;
+    }
+
+    public void setEstimatedDeliveryTime(LocalDateTime estimatedDeliveryTime) {
+        this.estimatedDeliveryTime = estimatedDeliveryTime;
+    }
+
     public String getMaterielId() {
         return materielId;
     }

+ 63 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanLogsMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 加弹计划详细信息日志信息Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+@Mapper
+public interface DetailsOfTheRefuelingPlanLogsMapper 
+{
+    /**
+     * 查询加弹计划详细信息日志信息
+     * 
+     * @param id 加弹计划详细信息日志信息主键
+     * @return 加弹计划详细信息日志信息
+     */
+    public DetailsOfTheRefuelingPlanLogs selectDetailsOfTheRefuelingPlanLogsById(Long id);
+
+    /**
+     * 查询加弹计划详细信息日志信息列表
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 加弹计划详细信息日志信息集合
+     */
+    public List<DetailsOfTheRefuelingPlanLogs> selectDetailsOfTheRefuelingPlanLogsList(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs);
+
+    /**
+     * 新增加弹计划详细信息日志信息
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 结果
+     */
+    public int insertDetailsOfTheRefuelingPlanLogs(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs);
+
+    /**
+     * 修改加弹计划详细信息日志信息
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 结果
+     */
+    public int updateDetailsOfTheRefuelingPlanLogs(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs);
+
+    /**
+     * 删除加弹计划详细信息日志信息
+     * 
+     * @param id 加弹计划详细信息日志信息主键
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanLogsById(Long id);
+
+    /**
+     * 批量删除加弹计划详细信息日志信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanLogsByIds(Long[] ids);
+}

+ 9 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanMapper.java

@@ -2,6 +2,8 @@ package com.zkqy.business.mapper;
 
 import java.util.List;
 import com.zkqy.business.domain.DetailsOfTheRefuelingPlan;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
+import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -93,4 +95,11 @@ public interface DetailsOfTheRefuelingPlanMapper
      * @return
      */
     int deleteDetailsOfTheRefuelingPlanByMachineId(String machineId);
+
+    /**
+     * 查询加弹计划中当前产品是否已经在生产当中
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getJtIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
 }

+ 67 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanSpinningLogsMapper.java

@@ -0,0 +1,67 @@
+package com.zkqy.business.mapper;
+
+import java.util.List;
+
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs;
+import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 加弹计划详细信息Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+@Mapper
+public interface DetailsOfTheRefuelingPlanSpinningLogsMapper 
+{
+    /**
+     * 查询加弹计划详细信息
+     * 
+     * @param id 加弹计划详细信息主键
+     * @return 加弹计划详细信息
+     */
+    public DetailsOfTheRefuelingPlanSpinningLogs selectDetailsOfTheRefuelingPlanSpinningLogsById(Long id);
+
+    /**
+     * 查询加弹计划详细信息列表
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 加弹计划详细信息集合
+     */
+    public List<DetailsOfTheRefuelingPlanSpinningLogs> selectDetailsOfTheRefuelingPlanSpinningLogsList(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs);
+
+    /**
+     * 新增加弹计划详细信息
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 结果
+     */
+    public int insertDetailsOfTheRefuelingPlanSpinningLogs(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs);
+
+    /**
+     * 修改加弹计划详细信息
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 结果
+     */
+    public int updateDetailsOfTheRefuelingPlanSpinningLogs(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs);
+
+    /**
+     * 删除加弹计划详细信息
+     * 
+     * @param id 加弹计划详细信息主键
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanSpinningLogsById(Long id);
+
+    /**
+     * 批量删除加弹计划详细信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanSpinningLogsByIds(Long[] ids);
+
+}

+ 22 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/DetailsOfTheRefuelingPlanSpinningMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
 import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
+import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -75,4 +76,25 @@ public interface DetailsOfTheRefuelingPlanSpinningMapper
      * @return
      */
     int selectDetailsOfTheRefuelingPlanSpinningListCount();
+
+    /**
+     * 当前产线上还有没有除当前计划外的其他上机计划
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getCurrentProductionLineSuperior(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
+
+    /**
+     * 判断当前计划上的产品订单是否已经开始生产
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
+
+    /**
+     * 修改回显状态不为6的计划信息
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getUpdatePlanSpinningInfo(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
 }

+ 18 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/mapper/SaleProductsMapper.java

@@ -40,6 +40,21 @@ public interface SaleProductsMapper
      * @return
      */
     public  List<SaleProductsVo> selectSaleProductsListAndCustomInfo(SaleProducts saleProducts);
+    /**
+     * 连表查询带客户名称的产品信息
+     * @param saleProducts
+     * @return
+     */
+    public  List<SaleProductsVo> selectSaleProductsListAndCustomInfoTwo(SaleProducts saleProducts);
+
+    /**
+     * 连表查询带客户名称的产品信息
+     * @param saleProducts
+     * @return
+     */
+    public  List<SaleProductsVo> selectSaleProductsListAndCustomInfoThread(SaleProducts saleProducts);
+
+
     /**
      * 新增销售产品
      * 
@@ -56,6 +71,9 @@ public interface SaleProductsMapper
      */
     public int updateSaleProducts(SaleProducts saleProducts);
 
+    public int updateSaleProductsNull(SaleProducts saleProducts);
+
+
     /**
      * 根据销售单号改产品状态
      * @return

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanLogsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs;
+
+/**
+ * 加弹计划详细信息日志信息Service接口
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+public interface IDetailsOfTheRefuelingPlanLogsService 
+{
+    /**
+     * 查询加弹计划详细信息日志信息
+     * 
+     * @param id 加弹计划详细信息日志信息主键
+     * @return 加弹计划详细信息日志信息
+     */
+    public DetailsOfTheRefuelingPlanLogs selectDetailsOfTheRefuelingPlanLogsById(Long id);
+
+    /**
+     * 查询加弹计划详细信息日志信息列表
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 加弹计划详细信息日志信息集合
+     */
+    public List<DetailsOfTheRefuelingPlanLogs> selectDetailsOfTheRefuelingPlanLogsList(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs);
+
+    /**
+     * 新增加弹计划详细信息日志信息
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 结果
+     */
+    public int insertDetailsOfTheRefuelingPlanLogs(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs);
+
+    /**
+     * 修改加弹计划详细信息日志信息
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 结果
+     */
+    public int updateDetailsOfTheRefuelingPlanLogs(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs);
+
+    /**
+     * 批量删除加弹计划详细信息日志信息
+     * 
+     * @param ids 需要删除的加弹计划详细信息日志信息主键集合
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanLogsByIds(Long[] ids);
+
+    /**
+     * 删除加弹计划详细信息日志信息信息
+     * 
+     * @param id 加弹计划详细信息日志信息主键
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanLogsById(Long id);
+}

+ 16 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanService.java

@@ -2,6 +2,8 @@ package com.zkqy.business.service;
 
 import java.util.List;
 import com.zkqy.business.domain.DetailsOfTheRefuelingPlan;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
+import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
 import org.apache.ibatis.annotations.Param;
 
 /**
@@ -69,4 +71,18 @@ public interface IDetailsOfTheRefuelingPlanService
 
 
     public int deleteDetailsOfTheRefuelingPlanByMachineId(@Param("machineId") String machineId);
+
+    /**
+     * 批量插入计划信息
+     * @param detailsOfTheRefuelingPlans
+     * @return
+     */
+    int insertBatchDetailsOfTheRefuelingPlan(List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans);
+
+    /**
+     * 查询当前加弹计划的产品是否已经在生产中
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getJtIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
 }

+ 61 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanSpinningLogsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.business.service;
+
+import java.util.List;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs;
+
+/**
+ * 加弹计划详细信息Service接口
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+public interface IDetailsOfTheRefuelingPlanSpinningLogsService 
+{
+    /**
+     * 查询加弹计划详细信息
+     * 
+     * @param id 加弹计划详细信息主键
+     * @return 加弹计划详细信息
+     */
+    public DetailsOfTheRefuelingPlanSpinningLogs selectDetailsOfTheRefuelingPlanSpinningLogsById(Long id);
+
+    /**
+     * 查询加弹计划详细信息列表
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 加弹计划详细信息集合
+     */
+    public List<DetailsOfTheRefuelingPlanSpinningLogs> selectDetailsOfTheRefuelingPlanSpinningLogsList(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs);
+
+    /**
+     * 新增加弹计划详细信息
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 结果
+     */
+    public int insertDetailsOfTheRefuelingPlanSpinningLogs(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs);
+
+    /**
+     * 修改加弹计划详细信息
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 结果
+     */
+    public int updateDetailsOfTheRefuelingPlanSpinningLogs(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs);
+
+    /**
+     * 批量删除加弹计划详细信息
+     * 
+     * @param ids 需要删除的加弹计划详细信息主键集合
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanSpinningLogsByIds(Long[] ids);
+
+    /**
+     * 删除加弹计划详细信息信息
+     * 
+     * @param id 加弹计划详细信息主键
+     * @return 结果
+     */
+    public int deleteDetailsOfTheRefuelingPlanSpinningLogsById(Long id);
+}

+ 22 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/IDetailsOfTheRefuelingPlanSpinningService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning;
 import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningRVo;
 import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
+import com.zkqy.common.core.domain.AjaxResult;
 
 /**
  * 加弹计划详细信息Service接口
@@ -82,4 +83,25 @@ public interface IDetailsOfTheRefuelingPlanSpinningService
      * @return
      */
     int insertDetailsOfTheRefuelingPlanSpinningBatch(List<DetailsOfTheRefuelingPlanSpinning> detailsOfTheRefuelingPlanSpinning);
+
+    /**
+     * 查询当前产线上除当前上级产品以外,还有没有其他上级产品
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getCurrentProductionLineSuperior(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
+
+    /**
+     * 判断当前计划上的产品订单是否已经开始生产
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> getIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
+
+    /**
+     * 回显查询不等生产中的产品计划
+     * @param detailsOfTheRefuelingPlanSpinning
+     * @return
+     */
+    List<DetailsOfTheRefuelingPlanSpinning> updateGetPlanSpinningInfo(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning);
 }

+ 7 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/ISaleProductsService.java

@@ -75,4 +75,11 @@ public interface ISaleProductsService
      * @return
      */
     List<SaleProductsVo> selectOutboundOrderInfo(String saleOrderNo);
+
+    /**
+     * 获取用户名称
+     * @param saleProducts
+     * @return
+     */
+    List<SaleProductsVo> selectSaleProductsListAndCustomerNameAll(SaleProducts saleProducts);
 }

+ 12 - 88
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/AmmunitionPlanInformationIntermediateTableServiceImpl.java

@@ -1,9 +1,6 @@
 package com.zkqy.business.service.impl;
 
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
@@ -11,6 +8,7 @@ import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.AmmunitionPlanInformationIntermediateTableRVo;
 import com.zkqy.business.domain.vo.AmmunitionPlanInformationIntermediateTableVo;
 import com.zkqy.business.mapper.*;
+import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.common.utils.StringUtils;
 import com.zkqy.common.utils.spring.SpringUtils;
 import org.springframework.beans.BeanUtils;
@@ -39,7 +37,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
     private ProductionLineMapper productionLineMapper;
 
     @Autowired
-    private SaleOrderMapper saleOrderMapper;
+    private  DetailsOfTheRefuelingPlanServiceImpl detailsOfTheRefuelingPlanService;
 
     @Autowired
     private SaleProductsMapper saleProductsMapper;
@@ -81,11 +79,14 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             //产品对应的信息
             SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
             item.setProductTypeName(saleProducts1.getProductName());
+            item.setCreateBy(SecurityUtils.getUsername());
+            item.setCreateById(SecurityUtils.getUserId());
+            item.setCreateTime(new Date());
         });
         //更新产线
         int i2 = saleProductsMapper.updateSaleProductBatch(saleProductsList);
         //插入计划数据
-        int i3 = detailsOfTheRefuelingPlanMapper.insertBatchDetailsOfTheRefuelingPlan(ammunitionPlanInformationIntermediateTable.getDetailsOfTheRefuelingPlans());
+        int i3 = detailsOfTheRefuelingPlanService.insertBatchDetailsOfTheRefuelingPlan(ammunitionPlanInformationIntermediateTable.getDetailsOfTheRefuelingPlans());
         return i3;
     }
 
@@ -123,6 +124,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             productionLine.setProductionLineWorkshop(ammunitionPlanInformationIntermediateTablVo.getProductionLineWorkshop());
         }
         List<ProductionLine> productionLines = productionLineMapper.selectProductionLineList(productionLine);
+        //处理排序
         List<ProductionLine> sortedList = productionLines.stream()
                 .sorted(Comparator.comparing(ProductionLine::getSort))
                 .collect(Collectors.toList());
@@ -132,21 +134,19 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
         sortedList.stream().forEach(item -> {
             //A面待生产
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan2=new DetailsOfTheRefuelingPlan();
-//            detailsOfTheRefuelingPlan2.setMachineId(item.getProductionLineNo());//产线号
             detailsOfTheRefuelingPlan2.setMacId(item.getId().toString()); //产线id
             detailsOfTheRefuelingPlan2.setPlanStatus("0");
             detailsOfTheRefuelingPlan2.setProductType("A面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans2 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan2);
             //B面的待生产
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan3=new DetailsOfTheRefuelingPlan();
-//            detailsOfTheRefuelingPlan3.setMachineId(item.getProductionLineNo());//产线号
-            detailsOfTheRefuelingPlan2.setMacId(item.getId().toString()); //产线id
+            detailsOfTheRefuelingPlan3.setMacId(item.getId().toString()); //产线id
             detailsOfTheRefuelingPlan3.setPlanStatus("0");
             detailsOfTheRefuelingPlan3.setProductType("B面");
             List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans3 = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan3);
+            System.err.println(detailsOfTheRefuelingPlans3.size()+"dddd");
             //查询产线A面上机的
             DetailsOfTheRefuelingPlan Asj=new DetailsOfTheRefuelingPlan();
-//            Asj.setMachineId(item.getProductionLineNo());//产线号
             Asj.setMacId(item.getId().toString());//产线id
             Asj.setPlanStatus("1");
             Asj.setProductType("A面");
@@ -171,7 +171,6 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             }
             //A面有没有停机的
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan4=new DetailsOfTheRefuelingPlan();
-//            detailsOfTheRefuelingPlan4.setMachineId(item.getProductionLineNo());//产线号
             detailsOfTheRefuelingPlan4.setMacId(item.getId().toString());
             detailsOfTheRefuelingPlan4.setPlanStatus("2");
             detailsOfTheRefuelingPlan4.setProductType("A面");
@@ -196,7 +195,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
                         list.add(rs1);
                     });
                 }
-                //如果
+                //停机==0 上机也等于0
                 if(tjSize.size()==0&&AList.size()==0){
                     //假数据停机
                     detailsOfTheRefuelingPlans4.stream().forEach(item1->{
@@ -234,7 +233,6 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
 
             //查询B面上机的
             DetailsOfTheRefuelingPlan Bsj=new DetailsOfTheRefuelingPlan();
-//            Bsj.setMachineId(item.getProductionLineNo());//产线号
             Bsj.setMacId(item.getId().toString());
             Bsj.setPlanStatus("1");
             Bsj.setProductType("B面");
@@ -258,7 +256,6 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             }
             //B停机的
             DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan5=new DetailsOfTheRefuelingPlan();
-//            detailsOfTheRefuelingPlan5.setMachineId(item.getProductionLineNo());//产线号
             detailsOfTheRefuelingPlan5.setMacId(item.getId().toString());
             detailsOfTheRefuelingPlan5.setPlanStatus("2");
             detailsOfTheRefuelingPlan5.setProductType("B面");
@@ -279,6 +276,7 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             }
             //B待机
             if(detailsOfTheRefuelingPlans3.size()>0&&BList.size()<=0&&detailsOfTheRefuelingPlans5.size()<=0){
+                System.err.println(item.getId());
                 AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
                 rs1.setMachineId(item.getProductionLineNo());//产线号
                 rs1.setMacId(item.getId().toString());//产线iD
@@ -298,80 +296,6 @@ public class AmmunitionPlanInformationIntermediateTableServiceImpl implements IA
             //如果包含一个停机的假数据,
         });
         return list;
-        /**
-         * //        //查询产线信息
-         * //        ProductionLine productionLine=new ProductionLine();
-         * //        productionLine.setProductionLineDepartment("加弹部");
-         * //        productionLine.setProductionLineWorkshop("南车间");
-         * //        //部门
-         * //        if(StringUtils.isNotNull(ammunitionPlanInformationIntermediateTablVo.getProductionLineDepartment())){
-         * //            productionLine.setProductionLineDepartment(ammunitionPlanInformationIntermediateTablVo.getProductionLineDepartment());
-         * //        }
-         * //        //车间
-         * //        if(StringUtils.isNotNull(ammunitionPlanInformationIntermediateTablVo.getProductionLineWorkshop())){
-         * //            productionLine.setProductionLineWorkshop(ammunitionPlanInformationIntermediateTablVo.getProductionLineWorkshop());
-         * //        }
-         * //        List<ProductionLine> productionLines = productionLineMapper.selectProductionLineList(productionLine);
-         * //        //创建产线对象
-         * //        List<AmmunitionPlanInformationIntermediateTableRVo> list=new ArrayList<>();
-         * //        //循环固定死的产线
-         * //        productionLines.stream().forEach(item -> {
-         * //            //拿到了某个车间的所有产线
-         * //            AmmunitionPlanInformationIntermediateTableRVo rs1=new AmmunitionPlanInformationIntermediateTableRVo();
-         * //            rs1.setMachineId(item.getProductionLineNo());//产线号
-         * //            //所有的计划都属于这个产线、所以不能根据产线去查,计划详情
-         * //            //先根据产线号去查询计划信息
-         * //            AmmunitionPlanInformationIntermediateTable ammunitionPlanInformationIntermediateTable=new AmmunitionPlanInformationIntermediateTable();
-         * //            ammunitionPlanInformationIntermediateTable.setMachineId(item.getProductionLineNo());
-         * //            //拿到了所有的计划随机码 一个产线对应许多的随机码
-         * //            List<AmmunitionPlanInformationIntermediateTable> ammunitionPlanInformationIntermediateTables = ammunitionPlanInformationIntermediateTableMapper.selectAmmunitionPlanInformationIntermediateTableList(ammunitionPlanInformationIntermediateTable);
-         * //            if(ammunitionPlanInformationIntermediateTables.size()>0){
-         * //                //循环的是随机码
-         * //                ammunitionPlanInformationIntermediateTables.stream().forEach(it->{
-         * //                    //=====
-         * //                    AmmunitionPlanInformationIntermediateTableRVo rs=new AmmunitionPlanInformationIntermediateTableRVo();
-         * //                    rs.setMachineId(item.getProductionLineNo());//产线号
-         * //                    //=====
-         * //                    DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan=new DetailsOfTheRefuelingPlan();
-         * //                    detailsOfTheRefuelingPlan.setTimestampRandomCode(it.getTimestampRandomCode());//计划随机码
-         * //                    detailsOfTheRefuelingPlan.setPlanStatus("0");//状态是未完成的 ---先查询A面的查出来放一块
-         * //                    //查询的是计划信息列表
-         * //                    List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanList(detailsOfTheRefuelingPlan);
-         * //                    //构造一个合适的对象放到 list
-         * //                    if(detailsOfTheRefuelingPlans.size()>0){
-         * //                        //第一不部分的构造数据
-         * //                        rs.setCurrentColorCode(detailsOfTheRefuelingPlans.get(0).getCurrentColorCode());//色号
-         * //                        rs.setCurrentSpecification(detailsOfTheRefuelingPlans.get(0).getCurrentSpecification());//生产规格
-         * //                        rs.setCurrentLotNumber(detailsOfTheRefuelingPlans.get(0).getCurrentLotNumber().toString());//生产批号
-         * //                        rs.setCurrentSpindleCount(detailsOfTheRefuelingPlans.get(0).getCurrentSpindleCount());//锭数
-         * //                        rs.setStartTime(detailsOfTheRefuelingPlans.get(0).getStartTime());//上机时间
-         * //                        rs.setPlannedEndTime(detailsOfTheRefuelingPlans.get(0).getPlannedEndTime());//下机时间
-         * //                        //一个机台可能有好多任务、用随机码给解决掉了、
-         * //                        rs.setProductType(detailsOfTheRefuelingPlans.get(0).getProductType());//A面
-         * //                        if(detailsOfTheRefuelingPlans.size()>2){
-         * //                            rs.setDjCurrentColorCode(detailsOfTheRefuelingPlans.get(1).getCurrentColorCode());//色号
-         * //                            rs.setDjCurrentSpecification(detailsOfTheRefuelingPlans.get(1).getCurrentSpecification());//生产规格
-         * //                            rs.setDjNumber(detailsOfTheRefuelingPlans.get(1).getNumber());//数量
-         * //                            rs.setDjCurrentLotNumber(detailsOfTheRefuelingPlans.get(1).getCurrentLotNumber().toString());//批号
-         * //                        }
-         * //                        if(detailsOfTheRefuelingPlans.size()>=3){
-         * //                            String combinedCodes = detailsOfTheRefuelingPlans.stream()
-         * //                                    .skip(2) // 排除前两个元素
-         * //                                    .map(plan -> plan.getCurrentColorCode()+ "-("+plan.getCurrentLotNumber()+")") // 将色号和批号拼接成字符串
-         * //                                    .collect(Collectors.joining(","));
-         * //                            rs.setListOfPendingProduction(combinedCodes);
-         * //                        }
-         * //                    }
-         * //                    //把计划对象添加进去
-         * //                    list.add(rs);
-         * //                });
-         * //            }else {
-         * //                list.add(rs1);
-         * //            }
-         * //
-         * //        });
-         * //        return list;
-         */
     }
 
 

+ 93 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanLogsServiceImpl.java

@@ -0,0 +1,93 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.DetailsOfTheRefuelingPlanLogsMapper;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs;
+import com.zkqy.business.service.IDetailsOfTheRefuelingPlanLogsService;
+
+/**
+ * 加弹计划详细信息日志信息Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+@Service
+public class DetailsOfTheRefuelingPlanLogsServiceImpl implements IDetailsOfTheRefuelingPlanLogsService 
+{
+    @Autowired
+    private DetailsOfTheRefuelingPlanLogsMapper detailsOfTheRefuelingPlanLogsMapper;
+
+    /**
+     * 查询加弹计划详细信息日志信息
+     * 
+     * @param id 加弹计划详细信息日志信息主键
+     * @return 加弹计划详细信息日志信息
+     */
+    @Override
+    public DetailsOfTheRefuelingPlanLogs selectDetailsOfTheRefuelingPlanLogsById(Long id)
+    {
+        return detailsOfTheRefuelingPlanLogsMapper.selectDetailsOfTheRefuelingPlanLogsById(id);
+    }
+
+    /**
+     * 查询加弹计划详细信息日志信息列表
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 加弹计划详细信息日志信息
+     */
+    @Override
+    public List<DetailsOfTheRefuelingPlanLogs> selectDetailsOfTheRefuelingPlanLogsList(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        return detailsOfTheRefuelingPlanLogsMapper.selectDetailsOfTheRefuelingPlanLogsList(detailsOfTheRefuelingPlanLogs);
+    }
+
+    /**
+     * 新增加弹计划详细信息日志信息
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 结果
+     */
+    @Override
+    public int insertDetailsOfTheRefuelingPlanLogs(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        return detailsOfTheRefuelingPlanLogsMapper.insertDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs);
+    }
+
+    /**
+     * 修改加弹计划详细信息日志信息
+     * 
+     * @param detailsOfTheRefuelingPlanLogs 加弹计划详细信息日志信息
+     * @return 结果
+     */
+    @Override
+    public int updateDetailsOfTheRefuelingPlanLogs(DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs)
+    {
+        return detailsOfTheRefuelingPlanLogsMapper.updateDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs);
+    }
+
+    /**
+     * 批量删除加弹计划详细信息日志信息
+     * 
+     * @param ids 需要删除的加弹计划详细信息日志信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDetailsOfTheRefuelingPlanLogsByIds(Long[] ids)
+    {
+        return detailsOfTheRefuelingPlanLogsMapper.deleteDetailsOfTheRefuelingPlanLogsByIds(ids);
+    }
+
+    /**
+     * 删除加弹计划详细信息日志信息信息
+     * 
+     * @param id 加弹计划详细信息日志信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDetailsOfTheRefuelingPlanLogsById(Long id)
+    {
+        return detailsOfTheRefuelingPlanLogsMapper.deleteDetailsOfTheRefuelingPlanLogsById(id);
+    }
+}

+ 64 - 13
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanServiceImpl.java

@@ -1,18 +1,18 @@
 package com.zkqy.business.service.impl;
 
+import java.util.Date;
 import java.util.List;
 
-import com.zkqy.business.domain.Materiel;
-import com.zkqy.business.domain.SaleOrder;
-import com.zkqy.business.domain.SaleProducts;
-import com.zkqy.business.mapper.MaterielMapper;
-import com.zkqy.business.mapper.SaleOrderMapper;
-import com.zkqy.business.mapper.SaleProductsMapper;
+import com.zkqy.business.domain.*;
+import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
+import com.zkqy.business.mapper.*;
+import com.zkqy.common.utils.SecurityUtils;
+import com.zkqy.common.utils.StringUtils;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.zkqy.business.mapper.DetailsOfTheRefuelingPlanMapper;
-import com.zkqy.business.domain.DetailsOfTheRefuelingPlan;
 import com.zkqy.business.service.IDetailsOfTheRefuelingPlanService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 加弹计划详细信息Service业务层处理
@@ -25,14 +25,14 @@ public class DetailsOfTheRefuelingPlanServiceImpl implements IDetailsOfTheRefuel
 {
     @Autowired
     private DetailsOfTheRefuelingPlanMapper detailsOfTheRefuelingPlanMapper;
-    @Autowired
-    private SaleOrderMapper saleOrderMapper;
 
     @Autowired
-    private SaleProductsMapper productsMapper;
+    private DetailsOfTheRefuelingPlanLogsMapper detailsOfTheRefuelingPlanLogsMapper;
 
     @Autowired
-    private MaterielMapper materielMapper;
+    private SaleProductsMapper saleProductsMapper;
+
+
 
 
     /**
@@ -137,7 +137,18 @@ public class DetailsOfTheRefuelingPlanServiceImpl implements IDetailsOfTheRefuel
         saleProducts.setOnBoardState(detailsOfTheRefuelingPlan.getPlanStatus());//更新上机状态
         saleProducts.setProductionLineNo(detailsOfTheRefuelingPlan.getMacId());//产线号
         //修改产品上机状态
-        productsMapper.updateSaleProductsBySaleOrderNo(saleProducts);
+        saleProductsMapper.updateSaleProductsBySaleOrderNo(saleProducts);
+        //记录修改日志
+        DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs=new DetailsOfTheRefuelingPlanLogs();
+        BeanUtils.copyProperties(detailsOfTheRefuelingPlan,detailsOfTheRefuelingPlanLogs);//拷贝对应的属性
+        detailsOfTheRefuelingPlanLogs.setMacId(Long.parseLong(detailsOfTheRefuelingPlan.getMacId()));
+        detailsOfTheRefuelingPlanLogs.setOrderId(detailsOfTheRefuelingPlan.getSalesmanId());
+        detailsOfTheRefuelingPlanLogs.setCreateBy(SecurityUtils.getUsername());
+        detailsOfTheRefuelingPlanLogs.setCreateById(SecurityUtils.getUserId());
+        detailsOfTheRefuelingPlanLogs.setCreateTime(new Date());
+        detailsOfTheRefuelingPlanLogs.setOperation("3");
+        detailsOfTheRefuelingPlanLogsMapper.insertDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs);
+        //更新计划信息
         return detailsOfTheRefuelingPlanMapper.updateDetailsOfTheRefuelingPlan(detailsOfTheRefuelingPlan);
     }
 
@@ -162,6 +173,18 @@ public class DetailsOfTheRefuelingPlanServiceImpl implements IDetailsOfTheRefuel
     @Override
     public int deleteDetailsOfTheRefuelingPlanById(Long id)
     {
+        DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan = detailsOfTheRefuelingPlanMapper.selectDetailsOfTheRefuelingPlanById(id);
+        //记录日志信息
+        DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs=new DetailsOfTheRefuelingPlanLogs();
+        BeanUtils.copyProperties(detailsOfTheRefuelingPlan,detailsOfTheRefuelingPlanLogs);//拷贝对应的属性
+        detailsOfTheRefuelingPlanLogs.setMacId(Long.parseLong(detailsOfTheRefuelingPlan.getMacId()));
+        detailsOfTheRefuelingPlanLogs.setOrderId(detailsOfTheRefuelingPlan.getSalesmanId());
+        detailsOfTheRefuelingPlanLogs.setCreateTime(new Date());
+        detailsOfTheRefuelingPlanLogs.setCreateById(SecurityUtils.getUserId());
+        detailsOfTheRefuelingPlanLogs.setCreateBy(SecurityUtils.getUsername());
+        detailsOfTheRefuelingPlanLogs.setOperation("1");
+        detailsOfTheRefuelingPlanLogsMapper.insertDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs);
+        //删除加弹计划
         return detailsOfTheRefuelingPlanMapper.deleteDetailsOfTheRefuelingPlanById(id);
     }
 
@@ -169,4 +192,32 @@ public class DetailsOfTheRefuelingPlanServiceImpl implements IDetailsOfTheRefuel
     public int deleteDetailsOfTheRefuelingPlanByMachineId(String machineId) {
         return detailsOfTheRefuelingPlanMapper.deleteDetailsOfTheRefuelingPlanByMachineId(machineId);
     }
+
+    @Override
+    @Transactional
+    public int insertBatchDetailsOfTheRefuelingPlan(List<DetailsOfTheRefuelingPlan> detailsOfTheRefuelingPlans) {
+        //插入日志信息
+        for (DetailsOfTheRefuelingPlan detailsOfTheRefuelingPlan : detailsOfTheRefuelingPlans) {
+            DetailsOfTheRefuelingPlanLogs detailsOfTheRefuelingPlanLogs=new DetailsOfTheRefuelingPlanLogs();
+            //拷贝对应的属性
+            BeanUtils.copyProperties(detailsOfTheRefuelingPlan,detailsOfTheRefuelingPlanLogs);
+            //处理属性名不同的问题
+            detailsOfTheRefuelingPlanLogs.setMacId(Long.parseLong(detailsOfTheRefuelingPlan.getMacId()));
+            detailsOfTheRefuelingPlanLogs.setOrderId(detailsOfTheRefuelingPlan.getSalesmanId());
+            detailsOfTheRefuelingPlanLogs.setCreateBy(SecurityUtils.getUsername());
+            detailsOfTheRefuelingPlanLogs.setCreateById(SecurityUtils.getUserId());
+            detailsOfTheRefuelingPlanLogs.setCreateTime(new Date());
+            //查询这产品对应的订单信息
+            detailsOfTheRefuelingPlanLogsMapper.insertDetailsOfTheRefuelingPlanLogs(detailsOfTheRefuelingPlanLogs);
+        }
+        //计划
+        return detailsOfTheRefuelingPlanMapper.insertBatchDetailsOfTheRefuelingPlan(detailsOfTheRefuelingPlans);
+    }
+
+    @Override
+    public List<DetailsOfTheRefuelingPlanSpinning> getJtIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        return detailsOfTheRefuelingPlanMapper.getJtIsTheOrderProductProduced(detailsOfTheRefuelingPlanSpinning);
+    }
+
+
 }

+ 96 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningLogsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.business.service.impl;
+
+import java.util.List;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.business.mapper.DetailsOfTheRefuelingPlanSpinningLogsMapper;
+import com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs;
+import com.zkqy.business.service.IDetailsOfTheRefuelingPlanSpinningLogsService;
+
+/**
+ * 加弹计划详细信息Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-05-16
+ */
+@Service
+public class DetailsOfTheRefuelingPlanSpinningLogsServiceImpl implements IDetailsOfTheRefuelingPlanSpinningLogsService 
+{
+    @Autowired
+    private DetailsOfTheRefuelingPlanSpinningLogsMapper detailsOfTheRefuelingPlanSpinningLogsMapper;
+
+    /**
+     * 查询加弹计划详细信息
+     * 
+     * @param id 加弹计划详细信息主键
+     * @return 加弹计划详细信息
+     */
+    @Override
+    public DetailsOfTheRefuelingPlanSpinningLogs selectDetailsOfTheRefuelingPlanSpinningLogsById(Long id)
+    {
+        return detailsOfTheRefuelingPlanSpinningLogsMapper.selectDetailsOfTheRefuelingPlanSpinningLogsById(id);
+    }
+
+    /**
+     * 查询加弹计划详细信息列表
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 加弹计划详细信息
+     */
+    @Override
+    public List<DetailsOfTheRefuelingPlanSpinningLogs> selectDetailsOfTheRefuelingPlanSpinningLogsList(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        return detailsOfTheRefuelingPlanSpinningLogsMapper.selectDetailsOfTheRefuelingPlanSpinningLogsList(detailsOfTheRefuelingPlanSpinningLogs);
+    }
+
+    /**
+     * 新增加弹计划详细信息
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 结果
+     */
+    @Override
+    public int insertDetailsOfTheRefuelingPlanSpinningLogs(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateTime(DateUtils.getNowDate());
+        return detailsOfTheRefuelingPlanSpinningLogsMapper.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
+    }
+
+    /**
+     * 修改加弹计划详细信息
+     * 
+     * @param detailsOfTheRefuelingPlanSpinningLogs 加弹计划详细信息
+     * @return 结果
+     */
+    @Override
+    public int updateDetailsOfTheRefuelingPlanSpinningLogs(DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs)
+    {
+        detailsOfTheRefuelingPlanSpinningLogs.setUpdateTime(DateUtils.getNowDate());
+        return detailsOfTheRefuelingPlanSpinningLogsMapper.updateDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
+    }
+
+    /**
+     * 批量删除加弹计划详细信息
+     * 
+     * @param ids 需要删除的加弹计划详细信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDetailsOfTheRefuelingPlanSpinningLogsByIds(Long[] ids)
+    {
+        return detailsOfTheRefuelingPlanSpinningLogsMapper.deleteDetailsOfTheRefuelingPlanSpinningLogsByIds(ids);
+    }
+
+    /**
+     * 删除加弹计划详细信息信息
+     * 
+     * @param id 加弹计划详细信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteDetailsOfTheRefuelingPlanSpinningLogsById(Long id)
+    {
+        return detailsOfTheRefuelingPlanSpinningLogsMapper.deleteDetailsOfTheRefuelingPlanSpinningLogsById(id);
+    }
+}

+ 67 - 6
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/DetailsOfTheRefuelingPlanSpinningServiceImpl.java

@@ -2,22 +2,23 @@ package com.zkqy.business.service.impl;
 
 import java.util.ArrayList;
 import java.util.Comparator;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
 import com.zkqy.business.domain.*;
 import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningRVo;
 import com.zkqy.business.domain.vo.DetailsOfTheRefuelingPlanSpinningVo;
-import com.zkqy.business.mapper.ProductionLineMapper;
-import com.zkqy.business.mapper.SaleOrderMapper;
-import com.zkqy.business.mapper.SaleProductsMapper;
+import com.zkqy.business.mapper.*;
+import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
 import com.zkqy.common.utils.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.zkqy.business.mapper.DetailsOfTheRefuelingPlanSpinningMapper;
 import com.zkqy.business.service.IDetailsOfTheRefuelingPlanSpinningService;
+import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 加弹计划详细信息Service业务层处理
@@ -39,6 +40,9 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
 
     @Autowired
     private SaleProductsMapper saleProductsMapper;
+
+    @Autowired
+    private DetailsOfTheRefuelingPlanSpinningLogsMapper detailsOfTheRefuelingPlanSpinningLogsMapper;
     /**
      * 查询加弹计划详细信息
      *
@@ -151,7 +155,6 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
      */
     @Override
     public int insertDetailsOfTheRefuelingPlanSpinning(DetailsOfTheRefuelingPlanSpinning detailsOfTheRefuelingPlanSpinning) {
-        detailsOfTheRefuelingPlanSpinning.setCreateTime(DateUtils.getNowDate());
         return detailsOfTheRefuelingPlanSpinningMapper.insertDetailsOfTheRefuelingPlanSpinning(detailsOfTheRefuelingPlanSpinning);
     }
 
@@ -207,6 +210,18 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
         saleProducts.setSaleOrderNo(detailsOfTheRefuelingPlanSpinning.getSalesmanId());//合同号
         saleProducts.setOnBoardState(detailsOfTheRefuelingPlanSpinning.getPlanStatus());//更新上机状态
         saleProducts.setProductNumber(Double.valueOf(detailsOfTheRefuelingPlanSpinning.getNumber()));//数量
+        //插入日志信息
+        DetailsOfTheRefuelingPlanSpinning spinning = detailsOfTheRefuelingPlanSpinningMapper.selectDetailsOfTheRefuelingPlanSpinningById(detailsOfTheRefuelingPlanSpinning.getId());
+        DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs=new DetailsOfTheRefuelingPlanSpinningLogs();
+        BeanUtils.copyProperties(spinning,detailsOfTheRefuelingPlanSpinningLogs);
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateBy(SecurityUtils.getUsername());
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateById(SecurityUtils.getUserId());
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateTime(new Date());
+        detailsOfTheRefuelingPlanSpinningLogs.setMacId(Long.parseLong(spinning.getMacId()));//机台id
+        detailsOfTheRefuelingPlanSpinningLogs.setOrderId(spinning.getSalesmanId());//订单
+        detailsOfTheRefuelingPlanSpinningLogs.setOperation("3"); //0新增 1删除 2修改
+        //插入日志信息
+        detailsOfTheRefuelingPlanSpinningLogsMapper.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
         //修改产品上机状态
         saleProductsMapper.updateSaleProductsBySaleOrderNo(saleProducts);
         return detailsOfTheRefuelingPlanSpinningMapper.updateDetailsOfTheRefuelingPlanSpinning(detailsOfTheRefuelingPlanSpinning);
@@ -230,8 +245,30 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
      * @return 结果
      */
     @Override
+    @Transactional
     public int deleteDetailsOfTheRefuelingPlanSpinningById(Long id) {
-        return detailsOfTheRefuelingPlanSpinningMapper.deleteDetailsOfTheRefuelingPlanSpinningById(id);
+        DetailsOfTheRefuelingPlanSpinning spinning = detailsOfTheRefuelingPlanSpinningMapper.selectDetailsOfTheRefuelingPlanSpinningById(id);
+        DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs=new DetailsOfTheRefuelingPlanSpinningLogs();
+        BeanUtils.copyProperties(spinning,detailsOfTheRefuelingPlanSpinningLogs);
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateBy(SecurityUtils.getUsername());
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateById(SecurityUtils.getUserId());
+        detailsOfTheRefuelingPlanSpinningLogs.setCreateTime(new Date());
+        detailsOfTheRefuelingPlanSpinningLogs.setMacId(Long.parseLong(spinning.getMacId()));//机台id
+        detailsOfTheRefuelingPlanSpinningLogs.setOrderId(spinning.getSalesmanId());//订单
+        detailsOfTheRefuelingPlanSpinningLogs.setOperation("1"); //0新增 1删除
+        //插入日志信息
+        detailsOfTheRefuelingPlanSpinningLogsMapper.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
+
+        String productId = spinning.getProductId();//得到销售产品id
+
+        //上机,产线都给他改没
+        SaleProducts saleProducts=new SaleProducts();
+        saleProducts.setId(Long.valueOf(productId));
+        saleProducts.setStatus("3");
+        saleProducts.setOnBoardState("");
+        saleProductsMapper.updateSaleProductsNull(saleProducts);
+       return detailsOfTheRefuelingPlanSpinningMapper.deleteDetailsOfTheRefuelingPlanSpinningById(id);
+
     }
 
     @Override
@@ -263,9 +300,33 @@ public class DetailsOfTheRefuelingPlanSpinningServiceImpl implements IDetailsOfT
             SaleProducts saleProducts1 = saleProductsMapper.selectSaleProductsById(Long.valueOf(item.getProductId()));
             item.setProductTypeName(saleProducts1.getProductName());
             saleProductsList.add(saleProducts);
+            DetailsOfTheRefuelingPlanSpinningLogs detailsOfTheRefuelingPlanSpinningLogs=new DetailsOfTheRefuelingPlanSpinningLogs();
+            BeanUtils.copyProperties(item,detailsOfTheRefuelingPlanSpinningLogs);
+            detailsOfTheRefuelingPlanSpinningLogs.setCreateBy(SecurityUtils.getUsername());
+            detailsOfTheRefuelingPlanSpinningLogs.setCreateById(SecurityUtils.getUserId());
+            detailsOfTheRefuelingPlanSpinningLogs.setCreateTime(new Date());
+            detailsOfTheRefuelingPlanSpinningLogs.setMacId(Long.parseLong(item.getMacId()));//机台id
+            detailsOfTheRefuelingPlanSpinningLogs.setOrderId(item.getSalesmanId());//订单
+            detailsOfTheRefuelingPlanSpinningLogs.setOperation("0");
+            detailsOfTheRefuelingPlanSpinningLogsMapper.insertDetailsOfTheRefuelingPlanSpinningLogs(detailsOfTheRefuelingPlanSpinningLogs);
         });
         //更新产线
         int i2 = saleProductsMapper.updateSaleProductBatch(saleProductsList);
         return detailsOfTheRefuelingPlanSpinningMapper.insertBatchDetailsOfTheRefuelingPlanSpinning(detailsOfTheRefuelingPlanSpinning);
     }
+
+    @Override
+    public List<DetailsOfTheRefuelingPlanSpinning> getCurrentProductionLineSuperior(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        return detailsOfTheRefuelingPlanSpinningMapper.getCurrentProductionLineSuperior(detailsOfTheRefuelingPlanSpinning);
+    }
+
+    @Override
+    public List<DetailsOfTheRefuelingPlanSpinning> getIsTheOrderProductProduced(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        return detailsOfTheRefuelingPlanSpinningMapper.getIsTheOrderProductProduced(detailsOfTheRefuelingPlanSpinning);
+    }
+
+    @Override
+    public List<DetailsOfTheRefuelingPlanSpinning> updateGetPlanSpinningInfo(DetailsOfTheRefuelingPlanSpinningVo detailsOfTheRefuelingPlanSpinning) {
+        return detailsOfTheRefuelingPlanSpinningMapper.getUpdatePlanSpinningInfo(detailsOfTheRefuelingPlanSpinning);
+    }
 }

+ 5 - 0
zkqy-custom-business/src/main/java/com/zkqy/business/service/impl/SaleProductsServiceImpl.java

@@ -111,4 +111,9 @@ public class SaleProductsServiceImpl implements ISaleProductsService
     public List<SaleProductsVo> selectOutboundOrderInfo(String saleOrderNo) {
         return saleProductsMapper.selectOutboundOrderInfo(saleOrderNo);
     }
+
+    @Override
+    public List<SaleProductsVo> selectSaleProductsListAndCustomerNameAll(SaleProducts saleProducts) {
+        return saleProductsMapper.selectSaleProductsListAndCustomInfoTwo(saleProducts);
+    }
 }

+ 163 - 0
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanLogsMapper.xml

@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.business.mapper.DetailsOfTheRefuelingPlanLogsMapper">
+    
+    <resultMap type="com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs" id="DetailsOfTheRefuelingPlanLogsResult">
+        <result property="id"    column="id"    />
+        <result property="macId"    column="mac_id"    />
+        <result property="machineId"    column="machine_id"    />
+        <result property="productType"    column="productType"    />
+        <result property="currentColorCode"    column="current_color_code"    />
+        <result property="currentSpecification"    column="current_specification"    />
+        <result property="currentLotNumber"    column="current_lot_number"    />
+        <result property="currentSpindleCount"    column="current_spindle_count"    />
+        <result property="productTypeName"    column="productTypeName"    />
+        <result property="number"    column="number"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="plannedEndTime"    column="planned_end_time"    />
+        <result property="planStatus"    column="planStatus"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="productId"    column="product_id"    />
+        <result property="orderId"    column="order_id"    />
+    </resultMap>
+
+    <sql id="selectDetailsOfTheRefuelingPlanLogsVo">
+        select id, mac_id, machine_id, productType, current_color_code, current_specification, current_lot_number, current_spindle_count, productTypeName, number, start_time, planned_end_time, plan_status, remark, create_by_id, create_by, update_by_id, update_by, create_time, update_time, product_id,order_id from {DBNAME}.details_of_the_refueling_plan_logs
+    </sql>
+
+    <select id="selectDetailsOfTheRefuelingPlanLogsList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs" resultMap="DetailsOfTheRefuelingPlanLogsResult">
+        select id, mac_id, machine_id, productType, current_color_code, current_specification, current_lot_number, current_spindle_count, productTypeName, number,
+               start_time, planned_end_time, plan_status, dotrpl.remark as remark, dotrpl.create_by_id as create_by_id, dotrpl.create_by as create_by,
+        dotrpl.update_by_id as update_by_id, dotrpl.update_by as update_by, dotrpl.create_time as create_time, dotrpl.update_time as update_time,
+        product_id,order_id,sdd.dict_label as planStatus
+        from {DBNAME}.details_of_the_refueling_plan_logs as dotrpl
+        inner join
+        {DBNAME}.sys_dict_data as sdd
+        on (dotrpl.plan_status=sdd.dict_value)
+        <where>  
+            <if test="macId != null "> and mac_id = like concat('%',#{macId}, '%')</if>
+            <if test="machineId != null  and machineId != ''"> and machine_id = like concat('%', #{machineId}, '%')</if>
+            <if test="productType != null  and productType != ''"> and productType =  like concat('%', #{productType}, '%')</if>
+            <if test="currentColorCode != null  and currentColorCode != ''"> and current_color_code =  like concat('%', #{currentColorCode}, '%')</if>
+            <if test="currentSpecification != null  and currentSpecification != ''"> and current_specification = like concat('%', #{currentSpecification}, '%')</if>
+            <if test="currentLotNumber != null  and currentLotNumber != ''"> and current_lot_number = like concat('%', #{currentLotNumber}, '%')</if>
+            <if test="currentSpindleCount != null  and currentSpindleCount != ''"> and current_spindle_count = like concat('%', #{currentSpindleCount}, '%')</if>
+            <if test="productTypeName != null  and productTypeName != ''"> and productTypeName like concat('%', #{productTypeName}, '%')</if>
+            <if test="number != null  and number != ''"> and number = like concat('%',#{number}, '%')</if>
+            <if test="startTime != null  and startTime != ''"> and start_time = like concat('%', #{startTime}, '%')</if>
+            <if test="plannedEndTime != null  and plannedEndTime != ''"> and planned_end_time =  like concat('%',#{plannedEndTime}, '%')</if>
+            <if test="planStatus != null  and planStatus != ''"> and plan_status = like concat('%',#{planStatus}, '%')</if>
+            <if test="createById != null  and createById != ''"> and create_by_id = like concat('%',#{createById}, '%')</if>
+            <if test="createBy != null  and createBy != ''"> and create_by =like concat('%', #{createBy}, '%')</if>
+            <if test="updateById != null  and updateById != ''"> and update_by_id = like concat('%',#{updateById}, '%')</if>
+            <if test="updateBy != null  and updateBy != ''"> and update_by = like concat('%',#{updateBy}, '%')</if>
+            <if test="createTime != null  and createTime != ''"> and create_time = like concat('%',#{createTime}, '%')</if>
+            <if test="updateTime != null  and updateTime != ''"> and update_time =like concat('%', #{updateTime}, '%')</if>
+            <if test="productId != null  and productId != ''"> and product_id = like concat('%',#{productId}, '%')</if>
+            <if test="orderId != null  and orderId != ''"> and order_id =like concat('%', #{orderId}, '%')</if>
+             and dict_type='plan_status'
+        </where>
+    </select>
+    
+    <select id="selectDetailsOfTheRefuelingPlanLogsById" parameterType="Long" resultMap="DetailsOfTheRefuelingPlanLogsResult">
+        <include refid="selectDetailsOfTheRefuelingPlanLogsVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertDetailsOfTheRefuelingPlanLogs" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.details_of_the_refueling_plan_logs
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="macId != null">mac_id,</if>
+            <if test="machineId != null">machine_id,</if>
+            <if test="productType != null">productType,</if>
+            <if test="currentColorCode != null and currentColorCode != ''">current_color_code,</if>
+            <if test="currentSpecification != null">current_specification,</if>
+            <if test="currentLotNumber != null">current_lot_number,</if>
+            <if test="currentSpindleCount != null">current_spindle_count,</if>
+            <if test="productTypeName != null">productTypeName,</if>
+            <if test="number != null">`number`,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="plannedEndTime != null">planned_end_time,</if>
+            <if test="planStatus != null">plan_status,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="orderId != null  and orderId != ''">order_id</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="macId != null">#{macId},</if>
+            <if test="machineId != null">#{machineId},</if>
+            <if test="productType != null">#{productType},</if>
+            <if test="currentColorCode != null and currentColorCode != ''">#{currentColorCode},</if>
+            <if test="currentSpecification != null">#{currentSpecification},</if>
+            <if test="currentLotNumber != null">#{currentLotNumber},</if>
+            <if test="currentSpindleCount != null">#{currentSpindleCount},</if>
+            <if test="productTypeName != null">#{productTypeName},</if>
+            <if test="number != null">#{number},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="plannedEndTime != null">#{plannedEndTime},</if>
+            <if test="planStatus != null">#{planStatus},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="orderId != null">#{orderId}</if>
+         </trim>
+    </insert>
+
+    <update id="updateDetailsOfTheRefuelingPlanLogs" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanLogs">
+        update {DBNAME}.details_of_the_refueling_plan_logs
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="macId != null">mac_id = #{macId},</if>
+            <if test="machineId != null">machine_id = #{machineId},</if>
+            <if test="productType != null">productType = #{productType},</if>
+            <if test="currentColorCode != null and currentColorCode != ''">current_color_code = #{currentColorCode},</if>
+            <if test="currentSpecification != null">current_specification = #{currentSpecification},</if>
+            <if test="currentLotNumber != null">current_lot_number = #{currentLotNumber},</if>
+            <if test="currentSpindleCount != null">current_spindle_count = #{currentSpindleCount},</if>
+            <if test="productTypeName != null">productTypeName = #{productTypeName},</if>
+            <if test="number != null">`number` = #{number},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="plannedEndTime != null">planned_end_time = #{plannedEndTime},</if>
+            <if test="planStatus != null">plan_status = #{planStatus},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="orderId != null">order_id = #{orderId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteDetailsOfTheRefuelingPlanLogsById" parameterType="Long">
+        delete from {DBNAME}.details_of_the_refueling_plan_logs where id = #{id}
+    </delete>
+
+    <delete id="deleteDetailsOfTheRefuelingPlanLogsByIds" parameterType="String">
+        delete from {DBNAME}.details_of_the_refueling_plan_logs where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 34 - 6
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanMapper.xml

@@ -19,10 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="number"    column="number"    />
         <result property="productType"    column="productType"    />
         <result property="productTypeName" column="productTypeName"/>
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime" column="create_time"/>
     </resultMap>
 
     <sql id="selectDetailsOfTheRefuelingPlanVo">
-        select id, timestamp_random_code, mac_id,machine_id, current_color_code, current_specification, current_lot_number, current_spindle_count, start_time, planned_end_time,plan_status,number,productType,product_id,salesman_id,productTypeName from {DBNAME}.details_of_the_refueling_plan
+        select id, timestamp_random_code, mac_id,machine_id, current_color_code,
+               current_specification, current_lot_number, current_spindle_count, start_time, planned_end_time,plan_status,
+               number,productType,product_id,salesman_id,productTypeName,
+               create_by_id,create_by,create_time
+        from {DBNAME}.details_of_the_refueling_plan
     </sql>
 
     <select id="selectDetailsOfTheRefuelingPlanList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlan" resultMap="DetailsOfTheRefuelingPlanResult">
@@ -73,6 +80,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectDetailsOfTheRefuelingPlanListCount" resultType="java.lang.Integer">
         select count(`id`) from {DBNAME}.details_of_the_refueling_plan
     </select>
+    <select id="getJtIsTheOrderProductProduced"
+            parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlan"
+            resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
+        select  * from {DBNAME}.details_of_the_refueling_plan   as dotrps
+                            left join
+                         {DBNAME}.sale_products  as sp
+        on dotrps.product_id=sp.id and dotrps.salesman_id=sp.sale_order_no
+        where sp.`status`=4 and dotrps.id=#{id}
+    </select>
 
     <insert id="insertDetailsOfTheRefuelingPlan" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlan">
         insert into {DBNAME}.details_of_the_refueling_plan
@@ -88,7 +104,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plannedEndTime != null">planned_end_time,</if>
             <if test="planStatus != null">plan_status,</if>
             <if test="number != null">`number`,</if>
-            <if test="productType != null  and productType != ''">`productType`</if>
+            <if test="productType != null  and productType != ''">`productType`,</if>
+            <if test="createById!=null and createById!=''">create_by_id,</if>
+            <if test="createBy!=null and createBy!=''">create_by,</if>
+            <if test="createTime!=null and createTime!=''">create_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -102,7 +121,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plannedEndTime != null">#{plannedEndTime},</if>
             <if test="planStatus != null">#{planStatus},</if>
             <if test="number != null">#{number},</if>
-            <if test="productType != null  and productType != ''"> #{productType}</if>
+            <if test="productType != null  and productType != ''"> #{productType},</if>
+            <if test="createById!=null and createById!=''">#{createById},</if>
+            <if test="createBy!=null and createBy!=''">#{createBy},</if>
+            <if test="createTime!=null and createTime!=''">#{createTime},</if>
          </trim>
     </insert>
 
@@ -122,8 +144,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         `number`,
         `productType`,
         `product_id`,
-            `salesman_id`,
-        `productTypeName`
+        `salesman_id`,
+        `productTypeName`,
+           create_by_id,
+           create_by,
+           create_time,
     </trim>
         VALUES
         <foreach collection="list" item="item" separator=",">
@@ -142,7 +167,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{item.productType},
             #{item.productId},
             #{item.salesmanId},
-            #{item.productTypeName}
+            #{item.productTypeName},
+                #{item.createById},
+                #{item.createBy},
+                #{item.createTime},
         </trim>
         </foreach>
     </insert>

+ 165 - 0
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningLogsMapper.xml

@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zkqy.business.mapper.DetailsOfTheRefuelingPlanSpinningLogsMapper">
+    
+    <resultMap type="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs" id="DetailsOfTheRefuelingPlanSpinningLogsResult">
+        <result property="id"    column="id"    />
+        <result property="machineId"    column="machine_id"    />
+        <result property="macId"    column="mac_id"    />
+        <result property="orderId"    column="order_id"    />
+        <result property="productTypeName"    column="productTypeName"    />
+        <result property="productionDigit"    column="production_digit"    />
+        <result property="currentColorCode"    column="current_color_code"    />
+        <result property="currentSpecification"    column="current_specification"    />
+        <result property="currentLotNumber"    column="current_lot_number"    />
+        <result property="startTime"    column="start_time"    />
+        <result property="plannedEndTime"    column="planned_end_time"    />
+        <result property="planStatus"    column="planStatus"    />
+        <result property="number"    column="number"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="productId"    column="product_id"    />
+        <result property="planType"    column="plan_type"    />
+    </resultMap>
+
+    <sql id="selectDetailsOfTheRefuelingPlanSpinningLogsVo">
+        select id, machine_id, mac_id, order_id, productTypeName, production_digit, current_color_code, current_specification,
+               current_lot_number, start_time, planned_end_time, plan_status, number,
+               remark, create_by_id, create_by, update_by_id, update_by, create_time, update_time, product_id, plan_type   from {DBNAME}.details_of_the_refueling_plan_spinning_logs
+    </sql>
+
+    <select id="selectDetailsOfTheRefuelingPlanSpinningLogsList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs" resultMap="DetailsOfTheRefuelingPlanSpinningLogsResult">
+        select id, machine_id, mac_id, order_id, productTypeName, production_digit, current_color_code, current_specification,
+        current_lot_number, start_time, planned_end_time, plan_status, number,
+        dotrpsl.remark as remark,dotrpsl.create_by_id as create_by_id, dotrpsl.create_by as create_by, dotrpsl.update_by_id as update_by_id, dotrpsl.update_by, dotrpsl.create_time, dotrpsl.update_time as update_time, product_id, plan_type, dict_label as planStatus
+        from {DBNAME}.details_of_the_refueling_plan_spinning_logs  as dotrpsl
+        inner join
+        {DBNAME}.sys_dict_data as sdd
+        on (dotrpsl.plan_status=sdd.dict_value)
+        <where>
+            and dict_type='plan_status'
+            <if test="machineId != null  and machineId != ''"> and machine_id like concat('%',#{machineId},'%')</if>
+            <if test="macId != null "> and mac_id like concat('%', #{macId}, '%')</if>
+            <if test="orderId != null  and orderId != ''"> and order_id like concat('%',#{orderId},'%')</if>
+            <if test="productTypeName != null  and productTypeName != ''"> and productTypeName like concat('%', #{productTypeName}, '%')</if>
+            <if test="productionDigit != null  and productionDigit != ''"> and production_digit   like concat('%', #{productionDigit},'%')</if>
+            <if test="currentColorCode != null  and currentColorCode != ''"> and current_color_code like concat('%', #{currentColorCode},'%')</if>
+            <if test="currentSpecification != null  and currentSpecification != ''"> and current_specification like concat('%', #{currentSpecification},'%')</if>
+            <if test="currentLotNumber != null  and currentLotNumber != ''"> and current_lot_number like concat('%', #{currentLotNumber},'%')</if>
+            <if test="startTime != null  and startTime != ''"> and start_time   like concat('%', #{startTime},'%')</if>
+            <if test="plannedEndTime != null  and plannedEndTime != ''"> and planned_end_time  like concat('%', #{plannedEndTime},'%')</if>
+            <if test="planStatus != null  and planStatus != ''"> and plan_status  like concat('%',#{planStatus},'%')</if>
+            <if test="number != null  and number != ''"> and `number`  like concat('%',#{number},'%')</if>
+            <if test="createById != null  and createById != ''"> and create_by_id like concat('%', #{createById},'%')</if>
+            <if test="updateById != null  and updateById != ''"> and update_by_id like concat('%', #{updateById},'%')</if>
+            <if test="productId != null  and productId != ''"> and product_id like concat('%',#{productId},'%')</if>
+            <if test="planType != null  and planType != ''"> and plan_type  like concat('%',#{planType},'%')</if>
+        </where>
+    </select>
+    
+    <select id="selectDetailsOfTheRefuelingPlanSpinningLogsById" parameterType="Long" resultMap="DetailsOfTheRefuelingPlanSpinningLogsResult">
+        <include refid="selectDetailsOfTheRefuelingPlanSpinningLogsVo"/>
+        where id = #{id}
+    </select>
+
+
+    <insert id="insertDetailsOfTheRefuelingPlanSpinningLogs" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.details_of_the_refueling_plan_spinning_logs
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="machineId != null">machine_id,</if>
+            <if test="macId != null">mac_id,</if>
+            <if test="orderId != null">order_id,</if>
+            <if test="productTypeName != null">productTypeName,</if>
+            <if test="productionDigit != null">production_digit,</if>
+            <if test="currentColorCode != null and currentColorCode != ''">current_color_code,</if>
+            <if test="currentSpecification != null">current_specification,</if>
+            <if test="currentLotNumber != null">current_lot_number,</if>
+            <if test="startTime != null">start_time,</if>
+            <if test="plannedEndTime != null">planned_end_time,</if>
+            <if test="planStatus != null">plan_status,</if>
+            <if test="number != null">number,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="productId != null">product_id,</if>
+            <if test="planType != null">plan_type,</if>
+            <if test="operation != null">operation,</if>
+
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="machineId != null">#{machineId},</if>
+            <if test="macId != null">#{macId},</if>
+            <if test="orderId != null">#{orderId},</if>
+            <if test="productTypeName != null">#{productTypeName},</if>
+            <if test="productionDigit != null">#{productionDigit},</if>
+            <if test="currentColorCode != null and currentColorCode != ''">#{currentColorCode},</if>
+            <if test="currentSpecification != null">#{currentSpecification},</if>
+            <if test="currentLotNumber != null">#{currentLotNumber},</if>
+            <if test="startTime != null">#{startTime},</if>
+            <if test="plannedEndTime != null">#{plannedEndTime},</if>
+            <if test="planStatus != null">#{planStatus},</if>
+            <if test="number != null">#{number},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="productId != null">#{productId},</if>
+            <if test="planType != null">#{planType},</if>
+            <if test="operation != null">#{operation},</if>
+
+         </trim>
+    </insert>
+
+    <update id="updateDetailsOfTheRefuelingPlanSpinningLogs" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinningLogs">
+        update {DBNAME}.details_of_the_refueling_plan_spinning_logs
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="machineId != null">machine_id = #{machineId},</if>
+            <if test="macId != null">mac_id = #{macId},</if>
+            <if test="orderId != null">order_id = #{orderId},</if>
+            <if test="productTypeName != null">productTypeName = #{productTypeName},</if>
+            <if test="productionDigit != null">production_digit = #{productionDigit},</if>
+            <if test="currentColorCode != null and currentColorCode != ''">current_color_code = #{currentColorCode},</if>
+            <if test="currentSpecification != null">current_specification = #{currentSpecification},</if>
+            <if test="currentLotNumber != null">current_lot_number = #{currentLotNumber},</if>
+            <if test="startTime != null">start_time = #{startTime},</if>
+            <if test="plannedEndTime != null">planned_end_time = #{plannedEndTime},</if>
+            <if test="planStatus != null">plan_status = #{planStatus},</if>
+            <if test="number != null">number = #{number},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="planType != null">plan_type = #{planType},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteDetailsOfTheRefuelingPlanSpinningLogsById" parameterType="Long">
+        delete from {DBNAME}.details_of_the_refueling_plan_spinning_logs where id = #{id}
+    </delete>
+
+    <delete id="deleteDetailsOfTheRefuelingPlanSpinningLogsByIds" parameterType="String">
+        delete from {DBNAME}.details_of_the_refueling_plan_spinning_logs where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 86 - 23
zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanSpinningMapper.xml

@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap type="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" id="DetailsOfTheRefuelingPlanSpinningResult">
         <result property="id"    column="id"    />
         <result property="timestampRandomCode"    column="timestamp_random_code"    />
+        <result property="macId"    column="mac_id"    />
         <result property="machineId"    column="machine_id"    />
         <result property="productionDigit"    column="production_digit"    />
         <result property="currentColorCode"    column="current_color_code"    />
@@ -17,19 +18,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="planStatus"    column="plan_status"    />
         <result property="number"    column="number"    />
         <result property="remark"    column="remark"    />
-        <result property="createbyId"    column="create_by_id"    />
-        <result property="createbyName"    column="create_by"    />
-        <result property="updatebyId"    column="update_by_id"    />
-        <result property="updatebyName"    column="update_by"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
         <result property="createTime"    column="create_time"    />
         <result property="updateTime"    column="update_time"    />
         <result property="productId"    column="product_id"    />
         <result property="salesmanId"    column="salesman_id"    />
         <result property="productTypeName" column="productTypeName"/>
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime" column="create_time"/>
     </resultMap>
 
     <sql id="selectDetailsOfTheRefuelingPlanSpinningVo">
-        select id, timestamp_random_code, machine_id, production_digit, current_color_code, current_specification, current_lot_number, start_time, planned_end_time, plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time, product_id, salesman_id,productTypeName from {DBNAME}.details_of_the_refueling_plan_spinning
+        select id, timestamp_random_code, mac_id,machine_id, production_digit, current_color_code, current_specification, current_lot_number, start_time, planned_end_time,
+               plan_status, number, remark, create_by_id, create_by, update_by, update_by, create_time, update_time,
+               product_id, salesman_id,productTypeName,create_by_id,create_by,create_time
+
+        from {DBNAME}.details_of_the_refueling_plan_spinning
     </sql>
 
     <select id="selectDetailsOfTheRefuelingPlanSpinningList" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" resultMap="DetailsOfTheRefuelingPlanSpinningResult">
@@ -46,10 +54,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="plannedEndTime != null  and plannedEndTime != ''"> and planned_end_time = #{plannedEndTime}</if>
             <if test="planStatus != null  and planStatus != ''"> and plan_status = #{planStatus}</if>
             <if test="number != null  and number != ''"> and number = #{number}</if>
-            <if test="createbyId != null  and createbyId != ''"> and create_by_id = #{createbyId}</if>
-            <if test="createbyName != null  and createbyName != ''"> and create_by like concat('%', #{createbyName}, '%')</if>
-            <if test="updatebyId != null  and updatebyId != ''"> and update_by_id = #{updatebyId}</if>
-            <if test="updatebyName != null  and updatebyName != ''"> and update_by like concat('%', #{updatebyName}, '%')</if>
+            <if test="createById != null  and createById != ''"> and create_by_id = #{createById}</if>
+            <if test="createBy != null  and createBy != ''"> and create_by like concat('%', #{createby}, '%')</if>
+            <if test="updateById != null  and updateById != ''"> and update_by_id = #{updateById}</if>
+            <if test="updateBy != null  and updateBy != ''"> and update_by like concat('%', #{updateby}, '%')</if>
             <if test="productId != null  and productId != ''"> and product_id = #{productId}</if>
             <if test="salesmanId != null  and salesmanId != ''"> and salesman_id = #{salesmanId}</if>
             and plan_status != 3
@@ -63,6 +71,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectDetailsOfTheRefuelingPlanSpinningListCount" resultType="java.lang.Integer">
         select count(id) from {DBNAME}.details_of_the_refueling_plan_spinning where plan_status !=2
     </select>
+    <select id="getCurrentProductionLineSuperior"
+            resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
+            <include refid="selectDetailsOfTheRefuelingPlanSpinningVo"/>
+            <where>
+                <if test="id != null  and id != ''"> and id != #{id}</if>
+                <if test="timestampRandomCode != null  and timestampRandomCode != ''"> and timestamp_random_code = #{timestampRandomCode}</if>
+                <if test="macId != null  and machineId != ''"> and mac_id = #{macId}</if>
+                <if test="machineId != null  and machineId != ''"> and machine_id = #{machineId}</if>
+                <if test="productionDigit != null  and productionDigit != ''"> and production_digit = #{productionDigit}</if>
+                <if test="currentColorCode != null  and currentColorCode != ''"> and current_color_code = #{currentColorCode}</if>
+                <if test="currentSpecification != null  and currentSpecification != ''"> and current_specification = #{currentSpecification}</if>
+                <if test="currentLotNumber != null  and currentLotNumber != ''"> and current_lot_number = #{currentLotNumber}</if>
+                <if test="startTime != null  and startTime != ''"> and start_time = #{startTime}</if>
+                <if test="plannedEndTime != null  and plannedEndTime != ''"> and planned_end_time = #{plannedEndTime}</if>
+                <if test="planStatus != null  and planStatus != ''"> and plan_status = #{planStatus}</if>
+                <if test="number != null  and number != ''"> and number = #{number}</if>
+                <if test="createById != null  and createById != ''"> and create_by_id = #{createById}</if>
+                <if test="createBy != null  and createBy != ''"> and create_by like concat('%', #{createBy}, '%')</if>
+                <if test="updateById != null  and updateById != ''"> and update_by_id = #{updateById}</if>
+                <if test="updateBy != null  and updateBy!= ''"> and update_by like concat('%', #{updateBy}, '%')</if>
+                <if test="productId != null  and productId != ''"> and product_id = #{productId}</if>
+                <if test="salesmanId != null  and salesmanId != ''"> and salesman_id = #{salesmanId}</if>
+            </where>
+    </select>
+    <select id="getIsTheOrderProductProduced"
+            parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning"
+            resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
+        select  * from {DBNAME}.details_of_the_refueling_plan_spinning   as dotrps
+                            left join
+                         {DBNAME}.sale_products  as sp
+                        on dotrps.product_id=sp.id and dotrps.salesman_id=sp.sale_order_no
+        where sp.`status`=4 and dotrps.id=#{id}
+    </select>
+    <select id="getUpdatePlanSpinningInfo"
+            resultType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning">
+        select  * from   {DBNAME}.details_of_the_refueling_plan_spinning   as dotrps
+                            left join
+                         {DBNAME}.sale_products  as sp
+                        on dotrps.product_id=sp.id and dotrps.salesman_id=sp.sale_order_no
+        where sp.`status`!=4 and dotrps.id=#{id}
+    </select>
 
     <insert id="insertDetailsOfTheRefuelingPlanSpinning" parameterType="com.zkqy.business.domain.DetailsOfTheRefuelingPlanSpinning" useGeneratedKeys="true" keyProperty="id">
         insert into {DBNAME}.details_of_the_refueling_plan_spinning
@@ -78,14 +127,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planStatus != null">plan_status,</if>
             <if test="number != null">`number`,</if>
             <if test="remark != null">remark,</if>
-            <if test="createbyId != null">create_by_id,</if>
-            <if test="createbyName != null">create_by,</if>
-            <if test="updatebyId != null">update_by_id,</if>
-            <if test="updatebyName != null">update_by,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
             <if test="createTime != null">create_time,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="productId != null">product_id,</if>
             <if test="salesmanId != null">salesman_id,</if>
+            <if test="createById!=null and createById!=''">create_by_id,</if>
+            <if test="createBy!=null and createBy!=''">create_by,</if>
+            <if test="createTime!=null and createTime!=''">create_time,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="timestampRandomCode != null">#{timestampRandomCode},</if>
@@ -99,14 +151,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planStatus != null">#{planStatus},</if>
             <if test="number != null">#{number},</if>
             <if test="remark != null">#{remark},</if>
-            <if test="createbyId != null">#{createbyId},</if>
-            <if test="createbyName != null">#{createbyName},</if>
-            <if test="updatebyId != null">#{updatebyId},</if>
-            <if test="updatebyName != null">#{updatebyName},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="updateById != null">#{updatebyId},</if>
+            <if test="updateBy != null">#{updateBy},</if>
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="productId != null">#{productId},</if>
             <if test="salesmanId != null">#{salesmanId},</if>
+            <if test="createById!=null and createById!=''">#{createById},</if>
+            <if test="createBy!=null and createBy!=''">#{createBy},</if>
+            <if test="createTime!=null and createTime!=''">#{createTime},</if>
          </trim>
     </insert>
 
@@ -124,10 +179,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="planStatus != null">plan_status = #{planStatus},</if>
             <if test="number != null">`number` = #{number},</if>
             <if test="remark != null">remark = #{remark},</if>
-            <if test="createbyId != null">create_by_id = #{createbyId},</if>
-            <if test="createbyName != null">createby_name = #{createbyName},</if>
-            <if test="updatebyId != null">updateby_id = #{updatebyId},</if>
-            <if test="updatebyName != null">updateby_name = #{updatebyName},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="productId != null">product_id = #{productId},</if>
@@ -166,7 +221,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             `number`,
             `product_id`,
             `salesman_id`,
-            `productTypeName`
+            `productTypeName`,
+            `plan_type`,
+             create_by,
+             create_by_id,
+             create_time
         </trim>
         VALUES
         <foreach collection="list" item="item" separator=",">
@@ -184,7 +243,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 #{item.number},
                 #{item.productId},
                 #{item.salesmanId},
-                #{item.productTypeName}
+                #{item.productTypeName},
+                #{item.planType},
+                #{item.createBy},
+                #{item.createById},
+                #{item.createTime}
             </trim>
         </foreach>
     </insert>

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

@@ -86,8 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             p.quantity as `quantity`
         FROM
             {DBNAME}.purchase_info AS p
-                INNER JOIN {DBNAME}.materiel AS m ON (
-                p.materiel_id = m.id)
+                INNER JOIN {DBNAME}.materiel AS m ON (p.materiel_id = m.id)
                 inner join {DBNAME}.sys_dict_data  as sdd on(sdd.dict_value=m.materiel_species)
         where sdd.dict_type='sys_materiel_species' and  purchase_id=#{purchaseId}
     </select>

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

@@ -104,8 +104,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         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  `huaqian`.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'
-            <if test="saleProductNo != null  and saleProductNo != ''"> and sale_product_no = #{saleProductNo}</if>
+        <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>
@@ -120,12 +121,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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 = #{status}</if>
-            <if test="productionLineNo != null  and productionLineNo != ''"> and production_line_no = #{productionLineNo}</if>
+            <if test="productionLineNo != null  and productionLineNo != ''"> AND sp.production_line_no IS NULL or sp.status =3 and pl.production_line_no NOT lIKE CONCAT(#{productionLineNo}, '%' )</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">
+        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  `huaqian`.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'
+        <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 = #{status}</if>
+        <if test="productionLineNo = null  and productionLineNo = ''"> AND sp.production_line_no is null</if>
+        <if test="productionLineNo != null  and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</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="selectSaleProductsById" parameterType="Long" resultMap="SaleProductsResult">
         <include refid="selectSaleProductsVo"/>
         where id = #{id}
@@ -273,6 +309,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             where id = #{item.id}
         </foreach>
     </update>
+    <update id="updateSaleProductsNull">
+        update {DBNAME}.sale_products
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="saleProductNo != null">sale_product_no = #{saleProductNo},</if>
+            <if test="saleOrderNo != null">sale_order_no = #{saleOrderNo},</if>
+            <if test="productNo != null">product_no = #{productNo},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="productNumber != null">product_number = #{productNumber},</if>
+            <if test="productWeight != null">product_weight = #{productWeight},</if>
+            <if test="productUnitPrice != null">product_unit_price = #{productUnitPrice},</if>
+            <if test="productAmounts != null">product_amounts = #{productAmounts},</if>
+            <if test="productNotes != null">product_notes = #{productNotes},</if>
+            <if test="remark != null">remark = #{remark},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateById != null">update_by_id = #{updateById},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="sliceType != null">slice_type = #{sliceType},</if>
+            <if test="colourNumber != null">colour_number = #{colourNumber},</if>
+            on_board_state="",
+            production_line_no=null
+        </trim>
+        where id = #{id}
+    </update>
     <select id="selectSaleProductsIds" resultType="long">
         select id from {DBNAME}.sale_products where sale_order_no = #{saleOrderNo}
     </select>
@@ -325,6 +392,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           AND p.del_flag = '0'
           and sp.sale_order_no = #{saleOrderNo}
     </select>
+    <select id="selectSaleProductsListAndCustomInfoThread"
+            resultType="com.zkqy.business.domain.vo.SaleProductsVo">
+
+        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  `huaqian`.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 sp.status!=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>
+        <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 = #{status}</if>
+        <if test="productionLineNo != null  and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</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>
 
     <insert id="batchInsertSaleProducts" parameterType="java.util.List">
         INSERT INTO {DBNAME}.sale_products (

+ 6 - 1
zkqy-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime"   column="update_time"  />
         <result property="remark"       column="remark"       />
 		<result property="tenantName"   column="tenant_name"  />
+		<result property="isCanTools"  column="is_can_tools"/>
         <association property="dept"    column="dept_id" javaType="SysDept" resultMap="deptResult" />
 		<association property="tenant"  column="tenant_id" javaType="SysTenant" resultMap="tenantResult" />
         <collection  property="roles"   javaType="java.util.List"           resultMap="RoleResult" />
@@ -92,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 	
 	<sql id="selectUserVo">
-        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
+        select u.user_id, u.dept_id, u.user_name, u.nick_name, u.user_type, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.is_can_tools,
         d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
 		te.tenant_id, te.tenant_name, te.tenant_code, te.owner,
         r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
@@ -248,6 +249,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="createBy != null and createBy != ''">create_by,</if>
  			<if test="remark != null and remark != ''">remark,</if>
 		    <if test="tenantId != null and tenantId != 0">tenant_id,</if>
+		    <if test="isCanTools != null and isCanTools != 0">is_can_tools,</if>
  			create_time
  		)values(
  			<if test="userId != null and userId != ''">#{userId},</if>
@@ -264,6 +266,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
 		    <if test="tenantId != null">#{tenantId},</if>
+		    <if test="isCanTools != null and isCanTools != 0">#{isCanTools},</if>
  			sysdate()
  		)
 	</insert>
@@ -274,6 +277,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
  			<if test="userName != null and userName != ''">user_name = #{userName},</if>
  			<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
+			<if test="userType != null and userType != ''">user_type = #{userType},</if>
  			<if test="email != null ">email = #{email},</if>
  			<if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
  			<if test="sex != null and sex != ''">sex = #{sex},</if>
@@ -284,6 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="loginDate != null">login_date = #{loginDate},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			<if test="remark != null">remark = #{remark},</if>
+			<if test="isCanTools!=null">is_can_tools=#{isCanTools},</if>
  			update_time = sysdate()
  		</set>
  		where user_id = #{userId}

+ 60 - 0
zkqy-ui/src/api/plan/fslogs.js

@@ -0,0 +1,60 @@
+import request from '@/utils/request'
+
+// 查询纺丝计划详细信息列表
+export function fslistLogs(query) {
+  return request({
+    url: '/system/fsfkltlogs/fslist',
+    method: 'get',
+    params: query
+  })
+}
+// 查询翻框计划详细信息列表
+export function fklistLogs(query) {
+  return request({
+    url: '/system/fsfkltlogs/fklist',
+    method: 'get',
+    params: query
+  })
+}
+//络桶计划详细列表
+export function ltlistLogs(query) {
+  return request({
+    url: '/system/fsfkltlogs/ltlist',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询加弹计划详细信息详细
+export function getLogs(id) {
+  return request({
+    url: '/system/fsfkltlogs/' + id,
+    method: 'get'
+  })
+}
+
+// 新增加弹计划详细信息
+export function addLogs(data) {
+  return request({
+    url: '/system/fsfkltlogs',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改加弹计划详细信息
+export function updateLogs(data) {
+  return request({
+    url: '/system/fsfkltlogs',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除加弹计划详细信息
+export function delLogs(id) {
+  return request({
+    url: '/system/fsfkltlogs/' + id,
+    method: 'delete'
+  })
+}

+ 44 - 0
zkqy-ui/src/api/plan/logs.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询加弹计划详细信息日志信息列表
+export function listLogs(query) {
+  return request({
+    url: '/system/logs/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询加弹计划详细信息日志信息详细
+export function getLogs(id) {
+  return request({
+    url: '/system/logs/' + id,
+    method: 'get'
+  })
+}
+
+// 新增加弹计划详细信息日志信息
+export function addLogs(data) {
+  return request({
+    url: '/system/logs',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改加弹计划详细信息日志信息
+export function updateLogs(data) {
+  return request({
+    url: '/system/logs',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除加弹计划详细信息日志信息
+export function delLogs(id) {
+  return request({
+    url: '/system/logs/' + id,
+    method: 'delete'
+  })
+}

+ 74 - 5
zkqy-ui/src/api/plan/paln.js

@@ -9,12 +9,23 @@ export function ammunitionPlanInfo(planVo) {
 }
 
 //id
-export function getProductsInfo() {
+export function getProductsInfo(productionLineNo) {
   return request({
     url: '/system/products/getProducts',
-    // params: {
-    //   saleNo: id,
-    // },
+    params: {
+      "productionLineNo": productionLineNo,
+    },
+    method: 'GET',
+  })
+}
+
+
+export function getProductsAll(productionLineNo) {
+  return request({
+    url: '/system/products/getProductsAll',
+    params: {
+      "productionLineNo": productionLineNo,
+    },
     method: 'GET',
   })
 }
@@ -102,9 +113,10 @@ export function addSpinningPlanList(data) {
 }
 
 /**
- * 查询有没有正在上机的
+ * 回显查询计划信息列表
  */
 export function getPlanSpinningInfo(data) {
+  console.log(data)
   return request({
     url: '/system/spinning/list/getPlanSpinningInfo',
     method: 'get',
@@ -113,7 +125,62 @@ export function getPlanSpinningInfo(data) {
   })
 }
 
+/**
+ * 是否有其他待上级
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export function getCurrentProductionLineSuperior(data) {
+  console.log(data)
+  return request({
+    url: '/system/spinning/list/getCurrentProductionLineSuperior',
+    method: 'get',
+    params: data,
+    //baseURL: process.env.VUE_APP_BASE_API1
+  })
+}
 
+/**
+ * 查询当前计划是否已经在生产当中了
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export function getIsTheOrderProductProduced(data) {
+  return request({
+    url: '/system/spinning/list/getIsTheOrderProductProduced',
+    method: 'get',
+    params: data,
+  })
+}
+
+/**
+ * 查询当前计划是否已经在生产当中了
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export function getJtIsTheOrderProductProduced(data) {
+  return request({
+    url: '/system/plan/list/getJtIsTheOrderProductProduced',
+    method: 'get',
+    params: data,
+  })
+}
+
+
+
+/**
+ * 回显不等于生产中的产品计划
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export function getUpdatePlanSpinningInfo(data) {
+  console.log(data)
+  return request({
+    url: '/system/spinning/list/getUpdatePlanSpinningInfo',
+    method: 'get',
+    params: data,
+  })
+}
 export function updateSpinningInfoPlanOne(data) {
   return request({
     url: '/system/spinning/update/updateSpinningInfoPlanOne',
@@ -123,6 +190,8 @@ export function updateSpinningInfoPlanOne(data) {
   })
 }
 
+
+
 /**
  * 删除加弹计划
  */

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

@@ -46,13 +46,6 @@
         <!--新增计划弹窗-->
         <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
                 <template v-slot:default="scope">
                      <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
@@ -148,18 +141,9 @@
           </el-form>
           <!--表格-->
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-              <template v-slot:default="scope">
-                <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                  <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                </el-select>
+              <template slot-scope="scope">
+                {{ getProductChineseName(scope.row.productId) }}
               </template>
             </el-table-column>
             <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
@@ -212,21 +196,17 @@
             <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
               <template v-slot:default="scope">
                 <!--上机变停机待机-->
-                <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
+                <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" >
                   <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
                 <!--待机可以上机-->
-                <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
+                <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" >
                   <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
                 <!--停机变上机-->
-                <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
+                <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" >
                   <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
                 </el-select>
-                <!--已完成-->
-                <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
-                  <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-                </el-select>
               </template>
             </el-table-column>
             <el-table-column label="操作" align="center" width="200px">
@@ -254,13 +234,13 @@
 <script>
 import {
   getProductsInfo,
+  getProductsAll,
   getMaterielInfo,
-  getSalesman,
   spinningFrameWinding,
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne, removeBombLoadingPlan
+  updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -300,16 +280,12 @@ export default {
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
-        {"id":3,"name":"已完成"},
       ],
       stateList2:[
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
       ],
-      stateList3:[
-        {"id":3,"name":"已完成"},
-      ],
       formData:{
         updateSelectedProductCategory:"",
         updateSelectedProductState:""
@@ -319,28 +295,35 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
-    //业务员信息
-    // this.getSalesman();
-    //得到排产产品信息
-
   },
   methods: {
+    getProductChineseName(productId) {
+      return  this.productsInfo.find(product => product.id == productId).productName;
+    },
+    //修改计划里的删除计划
     deletePlan($index,row){
       console.log(row)
-      spinningFrameWinding(row.id).then(res=>{
-        if(res.code==200){
-          this.$message({
-            message: '删除成功',
-            type: 'success'
-          });
-        }else{
-          this.$message({message:"删除失败",type: 'error'})
-        }
-        this.onSubmit();
-        this.getSpinningPlanList();
-      })
+      getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+          if(resp.data.length>0){
+            this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
+            return;//证明有在上级的产品--zhi能有一个上级产品
+          }else {
+            //没有开始生产可以删除
+            spinningFrameWinding(row.id).then(res=>{
+              if(res.code==200){
+                this.$message({
+                  message: '删除成功',
+                  type: 'success'
+                });
+              }
+              this.onSubmit();
+              this.getSpinningPlanList();
+            })
+          }
+      });
+
     },
-    //五个显示为一排
+    // 待机产品合并(五个显示为一排
     splitList(list, chunkSize) {
       const chunks = [];
       for (let i = 0; i < list.length; i += chunkSize) {
@@ -354,29 +337,10 @@ export default {
         this.tableData = response.rows
       });
     },
-    // //查询产品的业务员信息
-    // getSalesman() {
-    //   getSalesman().then((response) => {
-    //     this.salesmanInfo = response.data;
-    //   })
-    // },
-    // //业务员下拉框切换调用的函数
-    // selectedSalesmanItem(row,saleNo,index){
-    //   this.getProductsInfo(saleNo,index);
-    // },
-    // //待投产的产品数据
-    // getProductsInfo(saleNo,sy) {
-    //   getProductsInfo(saleNo,sy).then((response) => {
-    //     this.productsInfo = response.data;
-    //     this.productsInfo.forEach(item => {
-    //       item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
-    //     });
-    //   })
-    // },
+    // 新增计划是得到产品信息
     getProductsInfo() {
-      getProductsInfo().then((response) => {
+      getProductsInfo("FS-").then((response) => {
         this.productsInfo = response.data;
-        console.log(this.productsInfo,"产品信息")
         this.productsInfo.forEach(item => {
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
@@ -407,6 +371,7 @@ export default {
         this.isDisabled=true;
       }else {
         this.isDisabled=false;
+        row.currentLotNumber="";
       }
       //产品规格
       row.currentSpecification= this.product.productSpecifications;
@@ -425,9 +390,9 @@ export default {
       //当前操作机台号
       this.machineId=row.machineId;
       //机台id
-        this.macId=row.macId;
+      this.macId=row.macId;
     },
-    // 删除行
+    // 新增删除行
     handleDelete(index, row) {
       // console.log(index,row)
       // this.tableData2[a];
@@ -480,7 +445,13 @@ export default {
     },
     // 检查行是否填写完毕的示例方法
     isRowFilled(row) {
-      return row.currentSpecification && row.productionDigit && row.startTime && row.plannedEndTime;
+      return  row.productionDigit &&
+              row.currentColorCode &&
+              row.currentSpecification &&
+              row.currentLotNumber&&
+              row.number&&
+              row.startTime &&
+              row.plannedEndTime;
     },
     // 新增一行标记为可编辑
     addEditableRow() {
@@ -510,7 +481,8 @@ export default {
         planStatus:0,
         productId:'',
         salesmanId:'',
-        isEditing: true // 标记为正在编辑状态
+        isEditing: true, // 标记为正在编辑状态
+        planType:"纺丝计划"
       });
       this.editingRowIndex = this.tableData2.length - 1; // 更新当前编辑的行索引
       this.lastEditLine = this.tableData2.length - 1
@@ -520,6 +492,16 @@ export default {
       const datatime=Date.now()+this.machineId;
       //先查询计划表中有没有正在上机的
       getPlanSpinningInfo({"machineId":this.machineId,"macId":this.macId,"planStatus":1}).then(response => {
+          let flag=true;
+          this.tableData2.forEach(item=>{
+            if(!this.isRowFilled(item)){
+              flag=false
+            }
+          })
+          if(flag==false){
+            this.$message({message: '请完善当前行数据', type: 'warning'});
+            return ;
+          }
           let i=0
           //处理表格数据
           this.tableData2.forEach(item=>{
@@ -559,45 +541,33 @@ export default {
           }
       });
     },
-    // 修改产品计划
+    // 修改计划
     handleEditPlan(row) {
-      this.getProductsInfo();
-      //当前操作机台号
-      this.machineId=row.machineId;
-      //机台id
-      this.macId=row.macId;
-      this.tableData2=[];
-      //弹窗
-      this.nanUpdateDialogTableVisible = true
-      getPlanSpinningInfo({"macId":row.macId}).then((response) => {
-        //得到生产中,停产的,待产的
-        response.data.forEach(item => {
-          item.isEditing=false;
-          item.planStatus=parseInt(item.planStatus);
-          item.productId=parseInt(item.productId)
+          //已经在待机列表了,isNull过滤掉了
+          getProductsAll(row.macId).then((response) => {
+            this.productsInfo = response.data;
+            this.productsInfo.forEach(item => {
+              item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
+          });
+          //当前操作机台号
+          this.machineId=row.machineId;
+          //机台id
+          this.macId=row.macId;
+          this.tableData2=[];
+          //弹窗
+          this.nanUpdateDialogTableVisible = true
+          getPlanSpinningInfo({"macId":row.macId}).then((response) => {
+            //得到生产中,停产的,待产的
+            response.data.forEach(item => {
+              item.isEditing=false;
+              item.planStatus=parseInt(item.planStatus);
+              item.productId=parseInt(item.productId)
+            })
+            this.tableData2=response.data;
+          })
         })
-        this.tableData2=response.data;
-        console.log( this.tableData2)
-        // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        // this.$nextTick(() => {
-        //   // 获取第一个业务员选择框(假设表格只有一行)
-        //   this.tableDataStatus=[];
-        //   for (let i = 0; i < this.tableData2.length; i++) {
-        //     const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-        //     this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
-        //     // console.log(firstSalesmanSelect,11111111)
-        //     // 触发 change 事件
-        //     if (firstSalesmanSelect) {
-        //       firstSalesmanSelect.$emit('change', {
-        //         target: {value: "ddd"},
-        //       });
-        //     }
-        //   }
-        //
-        // });
-      })
     },
-    //弹窗里边的点击查询
+    // 弹窗里边的点击查询
     onSubmit(){
       this.formData.macId=this.macId;
       getPlanSpinningInfo(this.formData).then(response => {
@@ -609,7 +579,7 @@ export default {
         this.tableData2=response.data;
       });
     },
-    //重置
+    // 重置
     reset(){
       getPlanSpinningInfo({"macId":this.macId}).then(response => {
         //得到生产中,停产的,待产的
@@ -620,26 +590,89 @@ export default {
         this.tableData2=response.data;
       });
     },
-    //更新状态
+    // 更新状态
     updateStatus(ind, row,planStatus){
-      //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"macId":this.macId,"planStatus":planStatus}).then(response => {
-        let i=0
-        //处理表格数据
-        this.tableData2.forEach(item=>{
-          item.machineId=this.machineId;
-          if(item.planStatus==1){
-            i++
-          }
-        })
-        if(i>=1&&response.data.length>0){
-          this.$message({
-            message: '只能有一个产品的状态为上机',
-            type: 'warning'
+      if(!this.isRowFilled(row)){
+        this.$message({message: '请完善当前行数据', type: 'warning'});
+        return;
+      }
+      //判断当前计划是否已经投产
+      getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+        if(resp.data.length>0){
+          this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+          return;//证明有在上级的产品--zhi能有一个上级产品
+        }
+        //不等于0待机才去校验是否重复
+        if(row.planStatus!=0){
+          //先查询计划表中有没有正在上机的或者停机的
+          getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
+            if(response.data.length>0){
+              if(row.planStatus==1){
+                this.$message({message: '只能有一个产品的状态为上机', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }else {
+                this.$message({message: '已停机不能在停机', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }
+            }else {
+              if(row.planStatus==1){
+                getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"2"}).then(response => {
+                  if(response.data.length>0){
+                    this.$message({message: '已停机,请先处理停机产品,然后上机', type: 'warning'});
+                    return;//证明有在上级的产品--zhi能有一个上级产品
+                  }else {
+                      updateSpinningInfoPlanOne(row).then(response=>{
+                        if (response.code == 200) {
+                          this.$message({
+                            message: '修改成功',
+                            type: 'success'
+                          });
+                          this.getSpinningPlanList();
+                          //最后把弹窗关掉
+                          this.nanInsertDialogTableVisible=false
+                        } else {
+                          this.$message({
+                            message: '修改失败',
+                            type: 'error'
+                          });
+                          //最后把弹窗关掉
+                          this.nanInsertDialogTableVisible=false
+                        }
+                      })
+                  }
+                })
+              }
+              if(row.planStatus==2){
+                getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"1"}).then(response => {
+                  if(response.data.length>0){
+                    this.$message({message: '已有一个其他产品正在上机,不能在停机,如需要停机,请停机在机产品', type: 'warning'});
+                    return;//证明有在上级的产品--zhi能有一个上级产品
+                  }else {
+                    updateSpinningInfoPlanOne(row).then(response=>{
+                      if (response.code == 200) {
+                        this.$message({
+                          message: '修改成功',
+                          type: 'success'
+                        });
+                        this.getSpinningPlanList();
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      } else {
+                        this.$message({
+                          message: '修改失败',
+                          type: 'error'
+                        });
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      }
+                    })
+                  }
+                })
+              }
+            }
           });
-          row.planStatus=planStatus;
-          return;
         }else {
+          //修改待机的话直接修改
           updateSpinningInfoPlanOne(row).then(response=>{
             if (response.code == 200) {
               this.$message({
@@ -659,13 +692,11 @@ export default {
             }
           })
         }
-      });
 
-    }
-  },
-  computed: {
+      })
 
-  },
+    }
+  }
 }
 </script>
 

+ 160 - 129
zkqy-ui/src/views/orderMange/planTable/fankuang.vue

@@ -46,13 +46,6 @@
     <!--新增计划弹窗-->
     <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
       <el-table :data="tableData2" @row-click.self="handleRowClick">
-        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-        <!--              <template v-slot:default="scope">-->
-        <!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-        <!--                </el-select>-->
-        <!--              </template>-->
-        <!--            </el-table-column>-->
         <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
           <template v-slot:default="scope">
             <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
@@ -148,18 +141,9 @@
       </el-form>
       <!--表格-->
       <el-table :data="tableData2" @row-click.self="handleRowClick">
-        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-        <!--              <template v-slot:default="scope">-->
-        <!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-        <!--                </el-select>-->
-        <!--              </template>-->
-        <!--            </el-table-column>-->
         <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-          <template v-slot:default="scope">
-            <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-              <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-            </el-select>
+          <template slot-scope="scope">
+            {{ getProductChineseName(scope.row.productId) }}
           </template>
         </el-table-column>
         <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
@@ -212,21 +196,17 @@
         <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
           <template v-slot:default="scope">
             <!--上机变停机待机-->
-            <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
+            <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" >
               <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
             </el-select>
             <!--待机可以上机-->
-            <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
+            <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" >
               <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
             </el-select>
             <!--停机变上机-->
-            <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
+            <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" >
               <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
             </el-select>
-            <!--已完成-->
-            <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
-              <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-            </el-select>
           </template>
         </el-table-column>
         <el-table-column label="操作" align="center" width="200px">
@@ -254,13 +234,13 @@
 <script>
 import {
   getProductsInfo,
+  getProductsAll,
   getMaterielInfo,
-  getSalesman,
   spinningFrameWinding,
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne, removeBombLoadingPlan
+  updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -300,16 +280,12 @@ export default {
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
-        {"id":3,"name":"已完成"},
       ],
       stateList2:[
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
       ],
-      stateList3:[
-        {"id":3,"name":"已完成"},
-      ],
       formData:{
         updateSelectedProductCategory:"",
         updateSelectedProductState:""
@@ -319,28 +295,35 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
-    //业务员信息
-    // this.getSalesman();
-    //得到排产产品信息
-
   },
   methods: {
+    getProductChineseName(productId) {
+      return  this.productsInfo.find(product => product.id == productId).productName;
+    },
+    //修改计划里的删除计划
     deletePlan($index,row){
       console.log(row)
-      spinningFrameWinding(row.id).then(res=>{
-        if(res.code==200){
-          this.$message({
-            message: '删除成功',
-            type: 'success'
-          });
-        }else{
-          this.$message({message:"删除失败",type: 'error'})
+      getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+        if(resp.data.length>0){
+          this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
+          return;//证明有在上级的产品--zhi能有一个上级产品
+        }else {
+          //没有开始生产可以删除
+          spinningFrameWinding(row.id).then(res=>{
+            if(res.code==200){
+              this.$message({
+                message: '删除成功',
+                type: 'success'
+              });
+            }
+            this.onSubmit();
+            this.getSpinningPlanList();
+          })
         }
-        this.onSubmit();
-        this.getSpinningPlanList();
-      })
+      });
+
     },
-    //五个显示为一排
+    // 待机产品合并(五个显示为一排
     splitList(list, chunkSize) {
       const chunks = [];
       for (let i = 0; i < list.length; i += chunkSize) {
@@ -354,29 +337,10 @@ export default {
         this.tableData = response.rows
       });
     },
-    // //查询产品的业务员信息
-    // getSalesman() {
-    //   getSalesman().then((response) => {
-    //     this.salesmanInfo = response.data;
-    //   })
-    // },
-    // //业务员下拉框切换调用的函数
-    // selectedSalesmanItem(row,saleNo,index){
-    //   this.getProductsInfo(saleNo,index);
-    // },
-    // //待投产的产品数据
-    // getProductsInfo(saleNo,sy) {
-    //   getProductsInfo(saleNo,sy).then((response) => {
-    //     this.productsInfo = response.data;
-    //     this.productsInfo.forEach(item => {
-    //       item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
-    //     });
-    //   })
-    // },
+    // 新增计划是得到产品信息
     getProductsInfo() {
-      getProductsInfo().then((response) => {
+      getProductsInfo("FK-").then((response) => {
         this.productsInfo = response.data;
-        console.log(this.productsInfo,"产品信息")
         this.productsInfo.forEach(item => {
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
@@ -407,6 +371,7 @@ export default {
         this.isDisabled=true;
       }else {
         this.isDisabled=false;
+        row.currentLotNumber="";
       }
       //产品规格
       row.currentSpecification= this.product.productSpecifications;
@@ -427,7 +392,7 @@ export default {
       //机台id
       this.macId=row.macId;
     },
-    // 删除行
+    // 新增删除行
     handleDelete(index, row) {
       // console.log(index,row)
       // this.tableData2[a];
@@ -480,7 +445,13 @@ export default {
     },
     // 检查行是否填写完毕的示例方法
     isRowFilled(row) {
-      return row.currentSpecification && row.productionDigit && row.startTime && row.plannedEndTime;
+      return  row.productionDigit &&
+        row.currentColorCode &&
+        row.currentSpecification &&
+        row.currentLotNumber&&
+        row.number&&
+        row.startTime &&
+        row.plannedEndTime;
     },
     // 新增一行标记为可编辑
     addEditableRow() {
@@ -510,7 +481,8 @@ export default {
         planStatus:0,
         productId:'',
         salesmanId:'',
-        isEditing: true // 标记为正在编辑状态
+        isEditing: true, // 标记为正在编辑状态
+        planType:"翻框计划"
       });
       this.editingRowIndex = this.tableData2.length - 1; // 更新当前编辑的行索引
       this.lastEditLine = this.tableData2.length - 1
@@ -520,6 +492,16 @@ export default {
       const datatime=Date.now()+this.machineId;
       //先查询计划表中有没有正在上机的
       getPlanSpinningInfo({"machineId":this.machineId,"macId":this.macId,"planStatus":1}).then(response => {
+        let flag=true;
+        this.tableData2.forEach(item=>{
+          if(!this.isRowFilled(item)){
+            flag=false
+          }
+        })
+        if(flag==false){
+          this.$message({message: '请完善当前行数据', type: 'warning'});
+          return ;
+        }
         let i=0
         //处理表格数据
         this.tableData2.forEach(item=>{
@@ -559,45 +541,33 @@ export default {
         }
       });
     },
-    // 修改产品计划
+    // 修改计划
     handleEditPlan(row) {
-      this.getProductsInfo();
-      //当前操作机台号
-      this.machineId=row.machineId;
-      //机台id
-      this.macId=row.macId;
-      this.tableData2=[];
-      //弹窗
-      this.nanUpdateDialogTableVisible = true
-      getPlanSpinningInfo({"macId":row.macId}).then((response) => {
-        //得到生产中,停产的,待产的
-        response.data.forEach(item => {
-          item.isEditing=false;
-          item.planStatus=parseInt(item.planStatus);
-          item.productId=parseInt(item.productId)
+      //已经在待机列表了,isNull过滤掉了
+      getProductsAll(row.macId).then((response) => {
+        this.productsInfo = response.data;
+        this.productsInfo.forEach(item => {
+          item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
+        });
+        //当前操作机台号
+        this.machineId=row.machineId;
+        //机台id
+        this.macId=row.macId;
+        this.tableData2=[];
+        //弹窗
+        this.nanUpdateDialogTableVisible = true
+        getPlanSpinningInfo({"macId":row.macId}).then((response) => {
+          //得到生产中,停产的,待产的
+          response.data.forEach(item => {
+            item.isEditing=false;
+            item.planStatus=parseInt(item.planStatus);
+            item.productId=parseInt(item.productId)
+          })
+          this.tableData2=response.data;
         })
-        this.tableData2=response.data;
-        console.log( this.tableData2)
-        // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        // this.$nextTick(() => {
-        //   // 获取第一个业务员选择框(假设表格只有一行)
-        //   this.tableDataStatus=[];
-        //   for (let i = 0; i < this.tableData2.length; i++) {
-        //     const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-        //     this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
-        //     // console.log(firstSalesmanSelect,11111111)
-        //     // 触发 change 事件
-        //     if (firstSalesmanSelect) {
-        //       firstSalesmanSelect.$emit('change', {
-        //         target: {value: "ddd"},
-        //       });
-        //     }
-        //   }
-        //
-        // });
       })
     },
-    //弹窗里边的点击查询
+    // 弹窗里边的点击查询
     onSubmit(){
       this.formData.macId=this.macId;
       getPlanSpinningInfo(this.formData).then(response => {
@@ -609,7 +579,7 @@ export default {
         this.tableData2=response.data;
       });
     },
-    //重置
+    // 重置
     reset(){
       getPlanSpinningInfo({"macId":this.macId}).then(response => {
         //得到生产中,停产的,待产的
@@ -620,26 +590,89 @@ export default {
         this.tableData2=response.data;
       });
     },
-    //更新状态
+    // 更新状态
     updateStatus(ind, row,planStatus){
-      //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"macId":this.macId,"planStatus":planStatus}).then(response => {
-        let i=0
-        //处理表格数据
-        this.tableData2.forEach(item=>{
-          item.machineId=this.machineId;
-          if(item.planStatus==1){
-            i++
-          }
-        })
-        if(i>=1&&response.data.length>0){
-          this.$message({
-            message: '只能有一个产品的状态为上机',
-            type: 'warning'
+      if(!this.isRowFilled(row)){
+        this.$message({message: '请完善当前行数据', type: 'warning'});
+        return;
+      }
+      //判断当前计划是否已经投产
+      getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+        if(resp.data.length>0){
+          this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+          return;//证明有在上级的产品--zhi能有一个上级产品
+        }
+        //不等于0待机才去校验是否重复
+        if(row.planStatus!=0){
+          //先查询计划表中有没有正在上机的或者停机的
+          getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
+            if(response.data.length>0){
+              if(row.planStatus==1){
+                this.$message({message: '只能有一个产品的状态为上机', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }else {
+                this.$message({message: '已停机不能在停机', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }
+            }else {
+              if(row.planStatus==1){
+                getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"2"}).then(response => {
+                  if(response.data.length>0){
+                    this.$message({message: '已停机,请先处理停机产品,然后上机', type: 'warning'});
+                    return;//证明有在上级的产品--zhi能有一个上级产品
+                  }else {
+                    updateSpinningInfoPlanOne(row).then(response=>{
+                      if (response.code == 200) {
+                        this.$message({
+                          message: '修改成功',
+                          type: 'success'
+                        });
+                        this.getSpinningPlanList();
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      } else {
+                        this.$message({
+                          message: '修改失败',
+                          type: 'error'
+                        });
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      }
+                    })
+                  }
+                })
+              }
+              if(row.planStatus==2){
+                getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"1"}).then(response => {
+                  if(response.data.length>0){
+                    this.$message({message: '已有一个其他产品正在上机,不能在停机,如需要停机,请停机在机产品', type: 'warning'});
+                    return;//证明有在上级的产品--zhi能有一个上级产品
+                  }else {
+                    updateSpinningInfoPlanOne(row).then(response=>{
+                      if (response.code == 200) {
+                        this.$message({
+                          message: '修改成功',
+                          type: 'success'
+                        });
+                        this.getSpinningPlanList();
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      } else {
+                        this.$message({
+                          message: '修改失败',
+                          type: 'error'
+                        });
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      }
+                    })
+                  }
+                })
+              }
+            }
           });
-          row.planStatus=planStatus;
-          return;
         }else {
+          //修改待机的话直接修改
           updateSpinningInfoPlanOne(row).then(response=>{
             if (response.code == 200) {
               this.$message({
@@ -659,13 +692,11 @@ export default {
             }
           })
         }
-      });
 
-    }
-  },
-  computed: {
+      })
 
-  },
+    }
+  }
 }
 </script>
 

+ 112 - 135
zkqy-ui/src/views/orderMange/planTable/index.vue

@@ -55,13 +55,6 @@
         <!--新增计划弹窗-->
         <el-dialog title="南车间新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
                 <template v-slot:default="scope">
                      <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
@@ -169,18 +162,9 @@
           </el-form>
           <!--表格-->
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-              <template v-slot:default="scope">
-                <el-select   :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                  <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                </el-select>
+              <template slot-scope="scope">
+                {{ getProductChineseName(scope.row.productId) }}
               </template>
             </el-table-column>
             <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
@@ -199,9 +183,9 @@
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="currentSpecification" label="产品类别" header-align="center" align="center"  width="100px">
+            <el-table-column prop="productType" label="产品类别" header-align="center" align="center"  width="100px">
               <template v-slot:default="scope">
-                <el-select  v-model="scope.row.productType" placeholder="请选择产品类别" @change="selectedChangeDate(scope.row,scope.row.product)">
+                <el-select  v-model="scope.row.productType" placeholder="请选择产品类别" >
                   <el-option v-for="product in productTypeList" :key="product.value" :label="product.lable" :value="product.value" ></el-option>
                 </el-select>
               </template>
@@ -436,6 +420,7 @@
                 <el-option v-for="product in productTypeList" :key="product.value" :label="product.lable" :value="product.value" ></el-option>
               </el-select>
             </el-form-item>
+
             <el-form-item label="计划状态:">
               <el-select v-model="formData.planStatus" placeholder="请选择计划状态">
                 <el-option v-for="stateListItem in stateList2" :key="product.id" :label="stateListItem.name" :value="stateListItem.id" ></el-option>
@@ -448,18 +433,9 @@
           </el-form>
           <!--表格-->
           <el-table :data="tableData2" @row-click.self="handleRowClick">
-<!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-<!--              <template v-slot:default="scope">-->
-<!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-<!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-<!--                </el-select>-->
-<!--              </template>-->
-<!--            </el-table-column>-->
             <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-              <template v-slot:default="scope">
-                <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-                  <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-                </el-select>
+              <template slot-scope="scope">
+                {{ getProductChineseName(scope.row.productId) }}
               </template>
             </el-table-column>
             <el-table-column prop="currentColorCode" label="色号" header-align="center" align="center">
@@ -478,9 +454,9 @@
                 <span v-else>{{ scope.row.currentSpecification }}</span>
               </template>
             </el-table-column>
-            <el-table-column prop="currentSpecification" label="产品类别" header-align="center" align="center"  width="100px">
+            <el-table-column prop="productType" label="产品类别" header-align="center" align="center"  width="100px">
               <template v-slot:default="scope">
-                <el-select  v-model="scope.row.productType" placeholder="请选择产品类别" @change="selectedChangeDate(scope.row,scope.row.product)">
+                <el-select  v-model="scope.row.productType" placeholder="请选择产品类别">
                   <el-option v-for="product in productTypeList" :key="product.value" :label="product.lable" :value="product.value" ></el-option>
                 </el-select>
               </template>
@@ -581,9 +557,13 @@ import {
   removeBombLoadingPlan,
   getMaterielInfo,
   addMaterielInfo,
-  getSalesman,
+  getProductsAll,
   getAllPlanListByMachineId,
-  getAllPlanListByProductTypeAndStatus, updatePlanOne, whetherTheFeederIsShutDown, updateLineStates
+  getAllPlanListByProductTypeAndStatus,
+  updatePlanOne,
+  whetherTheFeederIsShutDown,
+  updateLineStates,
+  getIsTheOrderProductProduced, getJtIsTheOrderProductProduced
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -628,7 +608,6 @@ export default {
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
-        {"id":3,"name":"已完成"},
       ],
       stateList2:[
         {"id":0,"name":"待机"},
@@ -646,31 +625,39 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getAmmunitionPlanInfo();
-    // 得到业务员信息
-    // this.getSalesman();
-    this.getProductsInfo();
   },
   methods: {
+    getProductChineseName(productId) {
+      return  this.productsInfo.find(product => product.id == productId).productName;
+    },
     //删除计划
     deletePlan($index,row){
       console.log(row)
-      removeBombLoadingPlan(row.id).then(res=>{
-        if(res.code==200){
-          this.$message({
-            message: '删除成功',
-            type: 'success'
-          });
-        }else{
-          this.$message({message:"删除失败",type: 'error'})
-        }
-        this.onSubmit();
-        this.getAmmunitionPlanInfo();
-      })
+      //判断当前计划是否已经投产
+      getJtIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+          if(resp.data.length>0){
+            this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
+            return;//证明有在上级的产品--zhi能有一个上级产品
+          }
+          removeBombLoadingPlan(row.id).then(res=>{
+              if(res.code==200){
+                this.$message({
+                  message: '删除成功',
+                  type: 'success'
+                });
+              }else{
+                this.$message({message:"删除失败",type: 'error'})
+              }
+              this.onSubmit();
+              this.getAmmunitionPlanInfo();
+          })
+      });
+
+
     },
     //打开修改机台信息
     handleStopProductionLine(row){
       this.modifyMachineStatus=true;
-      console.log("停机");
       this.machineId=row.machineId;
       this.macId=row.macId;//机台id
       //查询当前机台A、面B面的状态
@@ -933,31 +920,10 @@ export default {
         }
       }
     },
-    //查询产品的业务员信息
-    // getSalesman() {
-    //   getSalesman().then((response) => {
-    //     this.salesmanInfo = response.data;
-    //   })
-    // },
-    // //业务员下拉框切换调用的函数
-    // selectedSalesmanItem(row,saleNo,index){
-    //   this.getProductsInfo(saleNo,index);
-    // },
-    // //待投产的产品数据
-    // getProductsInfo(saleNo,sy) {
-    //   getProductsInfo(saleNo,sy).then((response) => {
-    //     this.productsInfo = response.data;
-    //     this.productsInfo.forEach(item => {
-    //       item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
-    //     });
-    //   })
-    // },
     getProductsInfo() {
-      getProductsInfo().then((response) => {
+      getProductsInfo("JT-").then((response) => {
         this.productsInfo = response.data;
-        // productNumber
         this.productsInfo.forEach(item => {
-          // this.productsInfo=productNumber
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
       })
@@ -966,7 +932,6 @@ export default {
     selectedChangeDate(row,selectedProduct) {
       //选择的那个销售产品
       this.product = this.productsInfo.find(product => product.id === selectedProduct);
-
       this.form.product=selectedProduct;
       //通过母粒编码查询到对应的母粒信息
       let queryParams = {
@@ -986,6 +951,7 @@ export default {
         this.isDisabled=true;
       }else {
         this.isDisabled=false;
+        row.currentLotNumber="";
       }
       //产品规格
       row.currentSpecification= this.product.productSpecifications;
@@ -1026,6 +992,9 @@ export default {
           }else{
             this.beiInsertDialogTableVisible = true
           }
+          //查询可以添加的产品信息
+          this.getProductsInfo();
+          //清空添加的数组对象
           this.tableData2=[]
           //先清空
           this.machineId=""
@@ -1034,8 +1003,6 @@ export default {
           this.macId=row.macId;
         }
       })
-
-
     },
     // tab栏点击切换
     tabClick(tab, event) {
@@ -1099,7 +1066,14 @@ export default {
     },
     // 检查行是否填写完毕的示例方法
     isRowFilled(row) {
-      return row.currentSpecification && row.currentSpindleCount && row.number && row.startTime && row.plannedEndTime;
+      return row.currentSpecification &&
+        row.currentSpindleCount &&
+        row.currentColorCode &&
+        row.productType &&
+        row.currentLotNumber &&
+        row.number &&
+        row.startTime &&
+        row.plannedEndTime;
     },
     // 新增一行标记为可编辑
     addEditableRow() {
@@ -1184,41 +1158,34 @@ export default {
     },
     // 修改产品计划
     handleEditPlan(row) {
-      this.tableData2=[];
-      //弹窗
-      if(this.selectedWorkshop=="南车间"){
-        this.nanUpdateDialogTableVisible = true
-      }else{
-        this.beiUpdateDialogTableVisible = true
-      }
-      //先清空
-      this.machineId=""
-      //当前操作机台号
-      this.machineId=row.machineId;
-      this.macId=row.macId;
-      getAllPlanListByMachineId(this.macId).then((response) => {
-        //得到生产中,停产的,待产的
-        response.data.forEach(item => {
-          item.isEditing=false;
-          item.planStatus=parseInt(item.planStatus);
-          item.productId=parseInt(item.productId)
-        })
-        this.tableData2=response.data;
-        // console.log( this.tableData2)
-        // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        this.$nextTick(() => {
-          // 获取第一个业务员选择框(假设表格只有一行)
-          for (let i = 0; i < this.tableData2.length; i++) {
-            const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-            // 触发 change 事件
-            if (firstSalesmanSelect) {
-              firstSalesmanSelect.$emit('change', {
-                target: {value: "ddd"},
-              });
-            }
+      //已经在待机列表了,isNull过滤掉了
+      getProductsAll(row.macId).then((response) => {
+          this.productsInfo = response.data;
+          this.productsInfo.forEach(item => {
+            item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
+          });
+          this.tableData2=[];
+          //弹窗
+          if(this.selectedWorkshop=="南车间"){
+            this.nanUpdateDialogTableVisible = true
+          }else{
+            this.beiUpdateDialogTableVisible = true
           }
-
-        });
+          //先清空--当前操作机台号
+          this.machineId=""
+          this.machineId=row.machineId;
+          this.macId=row.macId;
+          //查询当前机台下的计划信息
+          getAllPlanListByMachineId(this.macId).then((response) => {
+            //得到生产中,停产的,待产的
+            response.data.forEach(item => {
+              item.isEditing=false;
+              item.planStatus=parseInt(item.planStatus);
+              item.productId=parseInt(item.productId)
+            })
+            this.tableData2=response.data;
+            // console.log( this.tableData2)
+          })
       })
     },
     //重置按钮
@@ -1270,32 +1237,42 @@ export default {
     },
     //更新状态
     updateStatus(ind, row){
-      // console.log(row);
-      updatePlanOne(row).then(response=>{
-        if (response.code == 200) {
-          this.$message({
-            message: '修改成功',
-            type: 'success'
-          });
-          this.getAmmunitionPlanInfo();
-          //最后把弹窗关掉
-          this.nanInsertDialogTableVisible=false
-          this.beiUpdateDialogTableVisible=false
-        } else {
-          this.$message({
-            message: '修改失败',
-            type: 'error'
-          });
-          //最后把弹窗关掉
-          this.nanInsertDialogTableVisible=false
-          this.beiUpdateDialogTableVisible=false
+      if(!this.isRowFilled(row)){
+        this.$message({message: '请完善当前行数据', type: 'warning'});
+        return;
+      }
+      //判断当前计划是否已经投产
+      getJtIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+        if(resp.data.length>0) {
+          this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+          return;//证明有在上级的产品--zhi能有一个上级产品
         }
+        //不是投产中就可以更新了.
+        updatePlanOne(row).then(response=>{
+          if (response.code == 200) {
+            this.$message({
+              message: '修改成功',
+              type: 'success'
+            });
+            this.getAmmunitionPlanInfo();
+            //最后把弹窗关掉
+            this.nanInsertDialogTableVisible=false
+            this.beiUpdateDialogTableVisible=false
+          } else {
+            this.$message({
+              message: '修改失败',
+              type: 'error'
+            });
+            //最后把弹窗关掉
+            this.nanInsertDialogTableVisible=false
+            this.beiUpdateDialogTableVisible=false
+          }
+        })
       })
-    }
-  },
-  computed: {
 
-  },
+
+    }
+  }
 }
 </script>
 

+ 349 - 0
zkqy-ui/src/views/orderMange/planTable/logs/fangsilog.vue

@@ -0,0 +1,349 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
+      <el-form-item label="机台号" prop="machineId">
+        <el-input
+          v-model="queryParams.machineId"
+          placeholder="请输入机台号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="订单号" prop="orderId">
+        <el-input
+          v-model="queryParams.orderId"
+          placeholder="请输入订单号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="产品类型名" prop="productTypeName">
+        <el-input
+          v-model="queryParams.productTypeName"
+          placeholder="请输入产品类型名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产位数" prop="productionDigit">
+        <el-input
+          v-model="queryParams.productionDigit"
+          placeholder="请输入生产位数"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产色号" prop="currentColorCode">
+        <el-input
+          v-model="queryParams.currentColorCode"
+          placeholder="请输入生产色号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="上机时间" prop="startTime">
+        <el-input
+          v-model="queryParams.startTime"
+          placeholder="请输入上机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="计划下机时间" prop="plannedEndTime">
+        <el-input
+          v-model="queryParams.plannedEndTime"
+          placeholder="请输入计划下机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:logs:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="机台号" align="center" prop="machineId" />
+<!--      <el-table-column label="机台id" align="center" prop="macId" />-->
+      <el-table-column label="订单号" align="center" prop="orderId" />
+      <el-table-column label="产品类型名" align="center" prop="productTypeName" />
+      <el-table-column label="生产位数" align="center" prop="productionDigit" />
+      <el-table-column label="生产色号" align="center" prop="currentColorCode" />
+      <el-table-column label="生产规格" align="center" prop="currentSpecification" />
+      <el-table-column label="生产批号" align="center" prop="currentLotNumber" />
+      <el-table-column label="上级时间" align="center" prop="startTime" />
+      <el-table-column label="计划下级时间" align="center" prop="plannedEndTime" />
+      <el-table-column label="计划状态" align="center" prop="planStatus">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.planStatus === '待机'" type="info">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '停机'" type="danger">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '上机'">{{ scope.row.planStatus }}</el-tag>
+          <el-tag  v-else-if="scope.row.planStatus === '已完成'"  type="success" >{{ scope.row.planStatus }}</el-tag>
+          <!-- 添加更多条件分支,或一个默认的标签类型 -->
+          <el-tag v-else type="warning">{{ scope.row.planStatus }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="数量   " align="center" prop="number" />
+      <el-table-column label="备注" align="center" prop="remark" />
+<!--      <el-table-column label="创建人id" align="center" prop="createById" />-->
+<!--      <el-table-column label="修改人id" align="center" prop="updateById" />-->
+<!--      <el-table-column label="产品id" align="center" prop="productId" />-->
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改加弹计划详细信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="机台号" prop="machineId">
+          <el-input v-model="form.machineId" placeholder="请输入机台号" />
+        </el-form-item>
+        <el-form-item label="机台id" prop="macId">
+          <el-input v-model="form.macId" placeholder="请输入机台id" />
+        </el-form-item>
+        <el-form-item label="销售订单号" prop="orderId">
+          <el-input v-model="form.orderId" placeholder="请输入销售订单号" />
+        </el-form-item>
+        <el-form-item label="产品类型名" prop="productTypeName">
+          <el-input v-model="form.productTypeName" placeholder="请输入产品类型名" />
+        </el-form-item>
+        <el-form-item label="生产位数" prop="productionDigit">
+          <el-input v-model="form.productionDigit" placeholder="请输入生产位数" />
+        </el-form-item>
+        <el-form-item label="生产色号" prop="currentColorCode">
+          <el-input v-model="form.currentColorCode" placeholder="请输入生产色号" />
+        </el-form-item>
+        <el-form-item label="生产规格" prop="currentSpecification">
+          <el-input v-model="form.currentSpecification" placeholder="请输入生产规格" />
+        </el-form-item>
+        <el-form-item label="生产批号" prop="currentLotNumber">
+          <el-input v-model="form.currentLotNumber" placeholder="请输入生产批号" />
+        </el-form-item>
+        <el-form-item label="上级时间" prop="startTime">
+          <el-input v-model="form.startTime" placeholder="请输入上级时间" />
+        </el-form-item>
+        <el-form-item label="计划下级时间" prop="plannedEndTime">
+          <el-input v-model="form.plannedEndTime" placeholder="请输入计划下级时间" />
+        </el-form-item>
+        <el-form-item label="数量   " prop="number">
+          <el-input v-model="form.number" placeholder="请输入数量   " />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+<!--        <el-form-item label="创建人id" prop="createById">-->
+<!--          <el-input v-model="form.createById" placeholder="请输入创建人id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="修改人id" prop="updateById">-->
+<!--          <el-input v-model="form.updateById" placeholder="请输入修改人id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="产品id" prop="productId">-->
+<!--          <el-input v-model="form.productId" placeholder="请输入产品id" />-->
+<!--        </el-form-item>-->
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { fslistLogs, getLogs, delLogs, addLogs, updateLogs } from "@/api/plan/fslogs.js";
+
+export default {
+  name: "Logs",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 加弹计划详细信息表格数据
+      logsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        machineId: null,
+        macId: null,
+        orderId: null,
+        productTypeName: null,
+        productionDigit: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        number: null,
+        createById: null,
+        updateById: null,
+        productId: null,
+        planType: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        currentColorCode: [
+          { required: true, message: "生产色号不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    /** 查询加弹计划详细信息列表 */
+    getList() {
+      this.loading = true;
+      fslistLogs(this.queryParams).then(response => {
+        this.logsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        machineId: null,
+        macId: null,
+        orderId: null,
+        productTypeName: null,
+        productionDigit: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        number: null,
+        remark: null,
+        createById: null,
+        createBy: null,
+        updateById: null,
+        updateBy: null,
+        createTime: null,
+        updateTime: null,
+        productId: null,
+        planType: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加加弹计划详细信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLogs(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改加弹计划详细信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateLogs(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLogs(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除加弹计划详细信息编号为"' + ids + '"的数据项?').then(function() {
+        return delLogs(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/logs/export', {
+        ...this.queryParams
+      }, `logs_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 348 - 0
zkqy-ui/src/views/orderMange/planTable/logs/fankuanglog.vue

@@ -0,0 +1,348 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
+      <el-form-item label="机台号" prop="machineId">
+        <el-input
+          v-model="queryParams.machineId"
+          placeholder="请输入机台号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="订单号" prop="orderId">
+        <el-input
+          v-model="queryParams.orderId"
+          placeholder="请输入订单号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="产品类型名" prop="productTypeName">
+        <el-input
+          v-model="queryParams.productTypeName"
+          placeholder="请输入产品类型名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产位数" prop="productionDigit">
+        <el-input
+          v-model="queryParams.productionDigit"
+          placeholder="请输入生产位数"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产色号" prop="currentColorCode">
+        <el-input
+          v-model="queryParams.currentColorCode"
+          placeholder="请输入生产色号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="上机时间" prop="startTime">
+        <el-input
+          v-model="queryParams.startTime"
+          placeholder="请输入上机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="计划下机时间" prop="plannedEndTime">
+        <el-input
+          v-model="queryParams.plannedEndTime"
+          placeholder="请输入计划下机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:logs:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="机台号" align="center" prop="machineId" />
+<!--      <el-table-column label="机台id" align="center" prop="macId" />-->
+      <el-table-column label="订单号" align="center" prop="orderId" />
+      <el-table-column label="产品类型名" align="center" prop="productTypeName" />
+      <el-table-column label="生产位数" align="center" prop="productionDigit" />
+      <el-table-column label="生产色号" align="center" prop="currentColorCode" />
+      <el-table-column label="生产规格" align="center" prop="currentSpecification" />
+      <el-table-column label="生产批号" align="center" prop="currentLotNumber" />
+      <el-table-column label="上机时间" align="center" prop="startTime" />
+      <el-table-column label="计划下机时间" align="center" prop="plannedEndTime" />
+      <el-table-column label="计划状态" align="center" prop="planStatus">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.planStatus === '待机'" type="info">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '停机'" type="danger">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '上机'">{{ scope.row.planStatus }}</el-tag>
+          <el-tag  v-else-if="scope.row.planStatus === '已完成'"  type="success" >{{ scope.row.planStatus }}</el-tag>
+          <!-- 添加更多条件分支,或一个默认的标签类型 -->
+          <el-tag v-else type="warning">{{ scope.row.planStatus }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="数量   " align="center" prop="number" />
+      <el-table-column label="备注" align="center" prop="remark" />
+<!--      <el-table-column label="创建人id" align="center" prop="createById" />-->
+<!--      <el-table-column label="修改人id" align="center" prop="updateById" />-->
+<!--      <el-table-column label="产品id" align="center" prop="productId" />-->
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改加弹计划详细信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="机台号" prop="machineId">
+          <el-input v-model="form.machineId" placeholder="请输入机台号" />
+        </el-form-item>
+        <el-form-item label="机台id" prop="macId">
+          <el-input v-model="form.macId" placeholder="请输入机台id" />
+        </el-form-item>
+        <el-form-item label="销售订单号" prop="orderId">
+          <el-input v-model="form.orderId" placeholder="请输入销售订单号" />
+        </el-form-item>
+        <el-form-item label="产品类型名" prop="productTypeName">
+          <el-input v-model="form.productTypeName" placeholder="请输入产品类型名" />
+        </el-form-item>
+        <el-form-item label="生产位数" prop="productionDigit">
+          <el-input v-model="form.productionDigit" placeholder="请输入生产位数" />
+        </el-form-item>
+        <el-form-item label="生产色号" prop="currentColorCode">
+          <el-input v-model="form.currentColorCode" placeholder="请输入生产色号" />
+        </el-form-item>
+        <el-form-item label="生产规格" prop="currentSpecification">
+          <el-input v-model="form.currentSpecification" placeholder="请输入生产规格" />
+        </el-form-item>
+        <el-form-item label="生产批号" prop="currentLotNumber">
+          <el-input v-model="form.currentLotNumber" placeholder="请输入生产批号" />
+        </el-form-item>
+        <el-form-item label="上机时间" prop="startTime">
+          <el-input v-model="form.startTime" placeholder="请输入上机时间" />
+        </el-form-item>
+        <el-form-item label="计划下机时间" prop="plannedEndTime">
+          <el-input v-model="form.plannedEndTime" placeholder="请输入计划下机时间" />
+        </el-form-item>
+        <el-form-item label="数量   " prop="number">
+          <el-input v-model="form.number" placeholder="请输入数量   " />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+<!--        <el-form-item label="创建人id" prop="createById">-->
+<!--          <el-input v-model="form.createById" placeholder="请输入创建人id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="修改人id" prop="updateById">-->
+<!--          <el-input v-model="form.updateById" placeholder="请输入修改人id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="产品id" prop="productId">-->
+<!--          <el-input v-model="form.productId" placeholder="请输入产品id" />-->
+<!--        </el-form-item>-->
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { fklistLogs, getLogs, delLogs, addLogs, updateLogs } from "@/api/plan/fslogs.js";
+
+export default {
+  name: "Logs",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 加弹计划详细信息表格数据
+      logsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        machineId: null,
+        macId: null,
+        orderId: null,
+        productTypeName: null,
+        productionDigit: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        number: null,
+        createById: null,
+        updateById: null,
+        productId: null,
+        planType: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        currentColorCode: [
+          { required: true, message: "生产色号不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询加弹计划详细信息列表 */
+    getList() {
+      this.loading = true;
+      fklistLogs(this.queryParams).then(response => {
+        this.logsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        machineId: null,
+        macId: null,
+        orderId: null,
+        productTypeName: null,
+        productionDigit: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        number: null,
+        remark: null,
+        createById: null,
+        createBy: null,
+        updateById: null,
+        updateBy: null,
+        createTime: null,
+        updateTime: null,
+        productId: null,
+        planType: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加加弹计划详细信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLogs(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改加弹计划详细信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateLogs(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLogs(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除加弹计划详细信息编号为"' + ids + '"的数据项?').then(function() {
+        return delLogs(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/logs/export', {
+        ...this.queryParams
+      }, `logs_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 424 - 0
zkqy-ui/src/views/orderMange/planTable/logs/index.vue

@@ -0,0 +1,424 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
+      <el-form-item label="机台编号" prop="machineId">
+        <el-input
+          v-model="queryParams.machineId"
+          placeholder="请输入机台编号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="订单号" prop="orderId">
+        <el-input
+          v-model="queryParams.orderId"
+          placeholder="请输入订单号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产色号" prop="currentColorCode">
+        <el-input
+          v-model="queryParams.currentColorCode"
+          placeholder="请输入生产色号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产规格AB面" prop="productType">
+        <el-select  v-model="queryParams.productType" placeholder="请选择产品类别">
+          <el-option v-for="product in productTypeList" :key="product.value" :label="product.lable" :value="product.value" ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="产品类型名" prop="productTypeName">
+        <el-input
+          v-model="queryParams.productTypeName"
+          placeholder="请输入产品类型名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="上机时间" prop="startTime">
+        <el-input
+          v-model="queryParams.startTime"
+          placeholder="请输入上机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="下机时间" prop="plannedEndTime">
+        <el-input
+          v-model="queryParams.plannedEndTime"
+          placeholder="请输入下机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="计划创建时间" prop="planCreateTime">
+        <el-input
+          v-model="queryParams.planCreateTime"
+          placeholder="请输入计划创建时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="计划修改时间" prop="planUpdateTime">
+        <el-input
+          v-model="queryParams.planUpdateTime"
+          placeholder="请输入计划修改时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+<!--      <el-form-item label="产品id" prop="productId">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.productId"-->
+<!--          placeholder="请输入产品id"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+
+<!--      <el-form-item label="订单id" prop="orderId">-->
+<!--        <el-input-->
+<!--          v-model="queryParams.orderId"-->
+<!--          placeholder="请输入订单id"-->
+<!--          clearable-->
+<!--          @keyup.enter.native="handleQuery"-->
+<!--        />-->
+<!--      </el-form-item>-->
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:logs:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+<!--      <el-table-column label="主键" align="center" prop="id" />-->
+<!--      <el-table-column label="机台id" align="center" prop="macId" />-->
+      <el-table-column label="机台编号" align="center" prop="machineId" />
+      <el-table-column label="订单号" align="center" prop="orderId" />
+      <el-table-column label="产品类型名" align="center" prop="productTypeName" />
+      <el-table-column label="产品类型" align="center" prop="productType" />
+      <el-table-column label="生产色号" align="center" prop="currentColorCode" />
+      <el-table-column label="生产规格" align="center" prop="currentSpecification" />
+      <el-table-column label="生产批号" align="center" prop="currentLotNumber" />
+      <el-table-column label="锭数" align="center" prop="currentSpindleCount" />
+      <el-table-column label="数量   " align="center" prop="number" />
+      <el-table-column label="上机时间" align="center" prop="startTime" />
+      <el-table-column label="下机时间" align="center" prop="plannedEndTime" />
+      <el-table-column label="计划状态" align="center" prop="planStatus">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.planStatus === '待机'" type="info">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '停机'" type="danger">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '上机'">{{ scope.row.planStatus }}</el-tag>
+          <el-tag  v-else-if="scope.row.planStatus === '已完成'"  type="success" >{{ scope.row.planStatus }}</el-tag>
+          <!-- 添加更多条件分支,或一个默认的标签类型 -->
+          <el-tag v-else type="warning">{{ scope.row.planStatus }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark" />
+<!--      <el-table-column label="计划创建人id" align="center" prop="planCreateById" />-->
+<!--      <el-table-column label="计划创建人姓名" align="center" prop="planCreateBy" />-->
+<!--      <el-table-column label="计划修改人id" align="center" prop="planUpdateById" />-->
+<!--      <el-table-column label="计划修改人姓名" align="center" prop="planUpdateBy" />-->
+<!--      <el-table-column label="计划创建时间" align="center" prop="planCreateTime" />-->
+<!--      <el-table-column label="计划修改时间" align="center" prop="planUpdateTime" />-->
+<!--      <el-table-column label="产品id" align="center" prop="productId" />-->
+<!--      <el-table-column label="业务员id" align="center" prop="salesmanId" />-->
+<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
+<!--        <template slot-scope="scope">-->
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-edit"-->
+<!--            @click="handleUpdate(scope.row)"-->
+<!--            v-hasPermi="['system:logs:edit']"-->
+<!--          >修改</el-button>-->
+<!--          <el-button-->
+<!--            size="mini"-->
+<!--            type="text"-->
+<!--            icon="el-icon-delete"-->
+<!--            @click="handleDelete(scope.row)"-->
+<!--            v-hasPermi="['system:logs:remove']"-->
+<!--          >删除</el-button>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改加弹计划详细信息日志信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="机台id" prop="macId">
+          <el-input v-model="form.macId" placeholder="请输入机台id" />
+        </el-form-item>
+        <el-form-item label="机台编号" prop="machineId">
+          <el-input v-model="form.machineId" placeholder="请输入机台编号" />
+        </el-form-item>
+        <el-form-item label="生产色号" prop="currentColorCode">
+          <el-input v-model="form.currentColorCode" placeholder="请输入生产色号" />
+        </el-form-item>
+        <el-form-item label="生产规格" prop="currentSpecification">
+          <el-input v-model="form.currentSpecification" placeholder="请输入生产规格" />
+        </el-form-item>
+        <el-form-item label="生产批号" prop="currentLotNumber">
+          <el-input v-model="form.currentLotNumber" placeholder="请输入生产批号" />
+        </el-form-item>
+        <el-form-item label="锭数" prop="currentSpindleCount">
+          <el-input v-model="form.currentSpindleCount" placeholder="请输入锭数" />
+        </el-form-item>
+        <el-form-item label="产品类型名" prop="productTypeName">
+          <el-input v-model="form.productTypeName" placeholder="请输入产品类型名" />
+        </el-form-item>
+        <el-form-item label="数量   " prop="number">
+          <el-input v-model="form.number" placeholder="请输入数量   " />
+        </el-form-item>
+        <el-form-item label="上机时间" prop="startTime">
+          <el-input v-model="form.startTime" placeholder="请输入上机时间" />
+        </el-form-item>
+        <el-form-item label="计划下机时间" prop="plannedEndTime">
+          <el-input v-model="form.plannedEndTime" placeholder="请输入计划下机时间" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+        <el-form-item label="计划创建人id" prop="planCreateById">
+          <el-input v-model="form.planCreateById" placeholder="请输入计划创建人id" />
+        </el-form-item>
+        <el-form-item label="计划创建人姓名" prop="planCreateBy">
+          <el-input v-model="form.planCreateBy" placeholder="请输入计划创建人姓名" />
+        </el-form-item>
+        <el-form-item label="计划修改人id" prop="planUpdateById">
+          <el-input v-model="form.planUpdateById" placeholder="请输入计划修改人id" />
+        </el-form-item>
+        <el-form-item label="计划修改人姓名" prop="planUpdateBy">
+          <el-input v-model="form.planUpdateBy" placeholder="请输入计划修改人姓名" />
+        </el-form-item>
+        <el-form-item label="计划创建时间" prop="planCreateTime">
+          <el-input v-model="form.planCreateTime" placeholder="请输入计划创建时间" />
+        </el-form-item>
+        <el-form-item label="计划修改时间" prop="planUpdateTime">
+          <el-input v-model="form.planUpdateTime" placeholder="请输入计划修改时间" />
+        </el-form-item>
+        <el-form-item label="产品id" prop="productId">
+          <el-input v-model="form.productId" placeholder="请输入产品id" />
+        </el-form-item>
+        <el-form-item label="业务员id" prop="salesmanId">
+          <el-input v-model="form.salesmanId" placeholder="请输入业务员id" />
+        </el-form-item>
+        <el-form-item label="订单id" prop="orderId">
+          <el-input v-model="form.orderId" placeholder="请输入订单id" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listLogs, getLogs, delLogs, addLogs, updateLogs } from "@/api/plan/logs";
+
+export default {
+  name: "Logs",
+  data() {
+    return {
+      // 产品类别
+      productTypeList:[{value:"A面",lable:"A面"},{value:"B面",lable:"B面"}],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 加弹计划详细信息日志信息表格数据
+      logsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        macId: null,
+        machineId: null,
+        productType: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        currentSpindleCount: null,
+        productTypeName: null,
+        number: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        planCreateById: null,
+        planCreateBy: null,
+        planUpdateById: null,
+        planUpdateBy: null,
+        planCreateTime: null,
+        planUpdateTime: null,
+        productId: null,
+        salesmanId: null,
+        orderId: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        currentColorCode: [
+          { required: true, message: "生产色号不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询加弹计划详细信息日志信息列表 */
+    getList() {
+      this.loading = true;
+      listLogs(this.queryParams).then(response => {
+        this.logsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        macId: null,
+        machineId: null,
+        productType: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        currentSpindleCount: null,
+        productTypeName: null,
+        number: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        remark: null,
+        planCreateById: null,
+        planCreateBy: null,
+        planUpdateById: null,
+        planUpdateBy: null,
+        planCreateTime: null,
+        planUpdateTime: null,
+        productId: null,
+        salesmanId: null,
+        orderId: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加加弹计划详细信息日志信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLogs(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改加弹计划详细信息日志信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateLogs(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLogs(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除加弹计划详细信息日志信息编号为"' + ids + '"的数据项?').then(function() {
+        return delLogs(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/logs/export', {
+        ...this.queryParams
+      }, `logs_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 348 - 0
zkqy-ui/src/views/orderMange/planTable/logs/luotonglog.vue

@@ -0,0 +1,348 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
+      <el-form-item label="机台号" prop="machineId">
+        <el-input
+          v-model="queryParams.machineId"
+          placeholder="请输入机台号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="订单号" prop="orderId">
+        <el-input
+          v-model="queryParams.orderId"
+          placeholder="请输入订单号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="产品类型名" prop="productTypeName">
+        <el-input
+          v-model="queryParams.productTypeName"
+          placeholder="请输入产品类型名"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产位数" prop="productionDigit">
+        <el-input
+          v-model="queryParams.productionDigit"
+          placeholder="请输入生产位数"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="生产色号" prop="currentColorCode">
+        <el-input
+          v-model="queryParams.currentColorCode"
+          placeholder="请输入生产色号"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="上机时间" prop="startTime">
+        <el-input
+          v-model="queryParams.startTime"
+          placeholder="请输入上机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="计划下机时间" prop="plannedEndTime">
+        <el-input
+          v-model="queryParams.plannedEndTime"
+          placeholder="请输入计划下机时间"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['system:logs:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="主键" align="center" prop="id" />
+      <el-table-column label="机台号" align="center" prop="machineId" />
+<!--      <el-table-column label="机台id" align="center" prop="macId" />-->
+      <el-table-column label="订单号" align="center" prop="orderId" />
+      <el-table-column label="产品类型名" align="center" prop="productTypeName" />
+      <el-table-column label="生产位数" align="center" prop="productionDigit" />
+      <el-table-column label="生产色号" align="center" prop="currentColorCode" />
+      <el-table-column label="生产规格" align="center" prop="currentSpecification" />
+      <el-table-column label="生产批号" align="center" prop="currentLotNumber" />
+      <el-table-column label="上机时间" align="center" prop="startTime" />
+      <el-table-column label="计划下机时间" align="center" prop="plannedEndTime" />
+      <el-table-column label="计划状态" align="center" prop="planStatus">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.planStatus === '待机'" type="info">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '停机'" type="danger">{{ scope.row.planStatus }}</el-tag>
+          <el-tag v-else-if="scope.row.planStatus === '上机'">{{ scope.row.planStatus }}</el-tag>
+          <el-tag  v-else-if="scope.row.planStatus === '已完成'"  type="success" >{{ scope.row.planStatus }}</el-tag>
+          <!-- 添加更多条件分支,或一个默认的标签类型 -->
+          <el-tag v-else type="warning">{{ scope.row.planStatus }}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="数量   " align="center" prop="number" />
+      <el-table-column label="备注" align="center" prop="remark" />
+<!--      <el-table-column label="创建人id" align="center" prop="createById" />-->
+<!--      <el-table-column label="修改人id" align="center" prop="updateById" />-->
+<!--      <el-table-column label="产品id" align="center" prop="productId" />-->
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改加弹计划详细信息对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="机台号" prop="machineId">
+          <el-input v-model="form.machineId" placeholder="请输入机台号" />
+        </el-form-item>
+        <el-form-item label="机台id" prop="macId">
+          <el-input v-model="form.macId" placeholder="请输入机台id" />
+        </el-form-item>
+        <el-form-item label="销售订单号" prop="orderId">
+          <el-input v-model="form.orderId" placeholder="请输入销售订单号" />
+        </el-form-item>
+        <el-form-item label="产品类型名" prop="productTypeName">
+          <el-input v-model="form.productTypeName" placeholder="请输入产品类型名" />
+        </el-form-item>
+        <el-form-item label="生产位数" prop="productionDigit">
+          <el-input v-model="form.productionDigit" placeholder="请输入生产位数" />
+        </el-form-item>
+        <el-form-item label="生产色号" prop="currentColorCode">
+          <el-input v-model="form.currentColorCode" placeholder="请输入生产色号" />
+        </el-form-item>
+        <el-form-item label="生产规格" prop="currentSpecification">
+          <el-input v-model="form.currentSpecification" placeholder="请输入生产规格" />
+        </el-form-item>
+        <el-form-item label="生产批号" prop="currentLotNumber">
+          <el-input v-model="form.currentLotNumber" placeholder="请输入生产批号" />
+        </el-form-item>
+        <el-form-item label="上机时间" prop="startTime">
+          <el-input v-model="form.startTime" placeholder="请输入上机时间" />
+        </el-form-item>
+        <el-form-item label="计划下机时间" prop="plannedEndTime">
+          <el-input v-model="form.plannedEndTime" placeholder="请输入计划下机时间" />
+        </el-form-item>
+        <el-form-item label="数量   " prop="number">
+          <el-input v-model="form.number" placeholder="请输入数量   " />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" placeholder="请输入备注" />
+        </el-form-item>
+<!--        <el-form-item label="创建人id" prop="createById">-->
+<!--          <el-input v-model="form.createById" placeholder="请输入创建人id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="修改人id" prop="updateById">-->
+<!--          <el-input v-model="form.updateById" placeholder="请输入修改人id" />-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="产品id" prop="productId">-->
+<!--          <el-input v-model="form.productId" placeholder="请输入产品id" />-->
+<!--        </el-form-item>-->
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { ltlistLogs, getLogs, delLogs, addLogs, updateLogs } from "@/api/plan/fslogs.js";
+
+export default {
+  name: "Logs",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 加弹计划详细信息表格数据
+      logsList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        machineId: null,
+        macId: null,
+        orderId: null,
+        productTypeName: null,
+        productionDigit: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        number: null,
+        createById: null,
+        updateById: null,
+        productId: null,
+        planType: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        currentColorCode: [
+          { required: true, message: "生产色号不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询加弹计划详细信息列表 */
+    getList() {
+      this.loading = true;
+      ltlistLogs(this.queryParams).then(response => {
+        this.logsList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        machineId: null,
+        macId: null,
+        orderId: null,
+        productTypeName: null,
+        productionDigit: null,
+        currentColorCode: null,
+        currentSpecification: null,
+        currentLotNumber: null,
+        startTime: null,
+        plannedEndTime: null,
+        planStatus: null,
+        number: null,
+        remark: null,
+        createById: null,
+        createBy: null,
+        updateById: null,
+        updateBy: null,
+        createTime: null,
+        updateTime: null,
+        productId: null,
+        planType: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加加弹计划详细信息";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getLogs(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改加弹计划详细信息";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateLogs(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addLogs(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除加弹计划详细信息编号为"' + ids + '"的数据项?').then(function() {
+        return delLogs(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('system/logs/export', {
+        ...this.queryParams
+      }, `logs_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 160 - 129
zkqy-ui/src/views/orderMange/planTable/luotong.vue

@@ -46,13 +46,6 @@
     <!--新增计划弹窗-->
     <el-dialog title="新增计划"  :visible.sync="nanInsertDialogTableVisible" width="1200px">
       <el-table :data="tableData2" @row-click.self="handleRowClick">
-        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-        <!--              <template v-slot:default="scope">-->
-        <!--                <el-select  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId)">-->
-        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-        <!--                </el-select>-->
-        <!--              </template>-->
-        <!--            </el-table-column>-->
         <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
           <template v-slot:default="scope">
             <el-select  v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
@@ -148,18 +141,9 @@
       </el-form>
       <!--表格-->
       <el-table :data="tableData2" @row-click.self="handleRowClick">
-        <!--            <el-table-column prop="salesmanId" label="业务员" header-align="center" align="center" width="100px">-->
-        <!--              <template v-slot:default="scope">-->
-        <!--                <el-select  :ref="'salesmanSelect'+scope.$index"  v-model="scope.row.salesmanId" placeholder="请选择业务员" @change="selectedSalesmanItem(scope.row,scope.row.salesmanId,scope.$index)">-->
-        <!--                  <el-option v-for="salesmanItem in salesmanInfo" :key="salesmanItem.saleNo" :label="salesmanItem.salesman" :value="salesmanItem.saleNo" ></el-option>-->
-        <!--                </el-select>-->
-        <!--              </template>-->
-        <!--            </el-table-column>-->
         <el-table-column prop="productId" label="产品" header-align="center" align="center" width="150px">
-          <template v-slot:default="scope">
-            <el-select  :ref="'productSelected'+scope.$index" v-model="scope.row.productId" placeholder="请选择待排产产品" @change="selectedChangeDate(scope.row,scope.row.productId)">
-              <el-option v-for="product in productsInfo" :key="product.id" :label="product.productName" :value="product.id" ></el-option>
-            </el-select>
+          <template slot-scope="scope">
+            {{ getProductChineseName(scope.row.productId) }}
           </template>
         </el-table-column>
         <el-table-column prop="productionDigit" label="生产位数" header-align="center" align="center">
@@ -212,21 +196,17 @@
         <el-table-column prop="planStatus" label="计划状态" header-align="center" align="center" width="100px">
           <template v-slot:default="scope">
             <!--上机变停机待机-->
-            <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态">
+            <el-select v-if="scope.row.planStatus==1" v-model="scope.row.planStatus" placeholder="计划状态" >
               <el-option v-for="stateItem in stateList1" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
             </el-select>
             <!--待机可以上机-->
-            <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态">
+            <el-select v-if="scope.row.planStatus==0" v-model="scope.row.planStatus" placeholder="计划状态" >
               <el-option v-for="stateItem in stateList0" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
             </el-select>
             <!--停机变上机-->
-            <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态">
+            <el-select v-if="scope.row.planStatus==2" v-model="scope.row.planStatus" placeholder="计划状态" >
               <el-option v-for="stateItem in stateList2" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
             </el-select>
-            <!--已完成-->
-            <el-select v-if="scope.row.planStatus==3" v-model="scope.row.planStatus" placeholder="计划状态">
-              <el-option v-for="stateItem in stateList3" :key="stateItem.id" :label="stateItem.name" :value="stateItem.id" ></el-option>
-            </el-select>
           </template>
         </el-table-column>
         <el-table-column label="操作" align="center" width="200px">
@@ -254,13 +234,13 @@
 <script>
 import {
   getProductsInfo,
+  getProductsAll,
   getMaterielInfo,
-  getSalesman,
   spinningFrameWinding,
   getSpinningPlanList,
   addSpinningPlanList,
   getPlanSpinningInfo,
-  updateSpinningInfoPlanOne, removeBombLoadingPlan
+  updateSpinningInfoPlanOne,getCurrentProductionLineSuperior, getIsTheOrderProductProduced
 } from "@/api/plan/paln.js";
 export default {
   data() {
@@ -300,16 +280,12 @@ export default {
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
-        {"id":3,"name":"已完成"},
       ],
       stateList2:[
         {"id":0,"name":"待机"},
         {"id":2,"name":"停机"},
         {"id":1,"name":"上机"},
       ],
-      stateList3:[
-        {"id":3,"name":"已完成"},
-      ],
       formData:{
         updateSelectedProductCategory:"",
         updateSelectedProductState:""
@@ -319,28 +295,35 @@ export default {
   mounted() {
     // 得到排产计划信息
     this.getSpinningPlanList();
-    //业务员信息
-    // this.getSalesman();
-    //得到排产产品信息
-
   },
   methods: {
+    getProductChineseName(productId) {
+      return  this.productsInfo.find(product => product.id == productId).productName;
+    },
+    //修改计划里的删除计划
     deletePlan($index,row){
       console.log(row)
-      spinningFrameWinding(row.id).then(res=>{
-        if(res.code==200){
-          this.$message({
-            message: '删除成功',
-            type: 'success'
-          });
-        }else{
-          this.$message({message:"删除失败",type: 'error'})
+      getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+        if(resp.data.length>0){
+          this.$message({message: '当前计划订单产品在生产中已经不能删除', type: 'warning'});
+          return;//证明有在上级的产品--zhi能有一个上级产品
+        }else {
+          //没有开始生产可以删除
+          spinningFrameWinding(row.id).then(res=>{
+            if(res.code==200){
+              this.$message({
+                message: '删除成功',
+                type: 'success'
+              });
+            }
+            this.onSubmit();
+            this.getSpinningPlanList();
+          })
         }
-        this.onSubmit();
-        this.getSpinningPlanList();
-      })
+      });
+
     },
-    //五个显示为一排
+    // 待机产品合并(五个显示为一排
     splitList(list, chunkSize) {
       const chunks = [];
       for (let i = 0; i < list.length; i += chunkSize) {
@@ -354,29 +337,10 @@ export default {
         this.tableData = response.rows
       });
     },
-    // //查询产品的业务员信息
-    // getSalesman() {
-    //   getSalesman().then((response) => {
-    //     this.salesmanInfo = response.data;
-    //   })
-    // },
-    // //业务员下拉框切换调用的函数
-    // selectedSalesmanItem(row,saleNo,index){
-    //   this.getProductsInfo(saleNo,index);
-    // },
-    // //待投产的产品数据
-    // getProductsInfo(saleNo,sy) {
-    //   getProductsInfo(saleNo,sy).then((response) => {
-    //     this.productsInfo = response.data;
-    //     this.productsInfo.forEach(item => {
-    //       item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
-    //     });
-    //   })
-    // },
+    // 新增计划是得到产品信息
     getProductsInfo() {
-      getProductsInfo().then((response) => {
+      getProductsInfo("LT-").then((response) => {
         this.productsInfo = response.data;
-        console.log(this.productsInfo,"产品信息")
         this.productsInfo.forEach(item => {
           item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
         });
@@ -407,6 +371,7 @@ export default {
         this.isDisabled=true;
       }else {
         this.isDisabled=false;
+        row.currentLotNumber="";
       }
       //产品规格
       row.currentSpecification= this.product.productSpecifications;
@@ -427,7 +392,7 @@ export default {
       //机台id
       this.macId=row.macId;
     },
-    // 删除行
+    // 新增删除行
     handleDelete(index, row) {
       // console.log(index,row)
       // this.tableData2[a];
@@ -480,7 +445,13 @@ export default {
     },
     // 检查行是否填写完毕的示例方法
     isRowFilled(row) {
-      return row.currentSpecification && row.productionDigit && row.startTime && row.plannedEndTime;
+      return  row.productionDigit &&
+        row.currentColorCode &&
+        row.currentSpecification &&
+        row.currentLotNumber&&
+        row.number&&
+        row.startTime &&
+        row.plannedEndTime;
     },
     // 新增一行标记为可编辑
     addEditableRow() {
@@ -510,7 +481,8 @@ export default {
         planStatus:0,
         productId:'',
         salesmanId:'',
-        isEditing: true // 标记为正在编辑状态
+        isEditing: true, // 标记为正在编辑状态
+        planType:"络筒计划"
       });
       this.editingRowIndex = this.tableData2.length - 1; // 更新当前编辑的行索引
       this.lastEditLine = this.tableData2.length - 1
@@ -520,6 +492,16 @@ export default {
       const datatime=Date.now()+this.machineId;
       //先查询计划表中有没有正在上机的
       getPlanSpinningInfo({"machineId":this.machineId,"macId":this.macId,"planStatus":1}).then(response => {
+        let flag=true;
+        this.tableData2.forEach(item=>{
+          if(!this.isRowFilled(item)){
+            flag=false
+          }
+        })
+        if(flag==false){
+          this.$message({message: '请完善当前行数据', type: 'warning'});
+          return ;
+        }
         let i=0
         //处理表格数据
         this.tableData2.forEach(item=>{
@@ -559,45 +541,33 @@ export default {
         }
       });
     },
-    // 修改产品计划
+    // 修改计划
     handleEditPlan(row) {
-      this.getProductsInfo();
-      //当前操作机台号
-      this.machineId=row.machineId;
-      //机台id
-      this.macId=row.macId;
-      this.tableData2=[];
-      //弹窗
-      this.nanUpdateDialogTableVisible = true
-      getPlanSpinningInfo({"macId":row.macId}).then((response) => {
-        //得到生产中,停产的,待产的
-        response.data.forEach(item => {
-          item.isEditing=false;
-          item.planStatus=parseInt(item.planStatus);
-          item.productId=parseInt(item.productId)
+      //已经在待机列表了,isNull过滤掉了
+      getProductsAll(row.macId).then((response) => {
+        this.productsInfo = response.data;
+        this.productsInfo.forEach(item => {
+          item.productName = item.productName+"—"+item.materieEncoding+item.materieColorNumber
+        });
+        //当前操作机台号
+        this.machineId=row.machineId;
+        //机台id
+        this.macId=row.macId;
+        this.tableData2=[];
+        //弹窗
+        this.nanUpdateDialogTableVisible = true
+        getPlanSpinningInfo({"macId":row.macId}).then((response) => {
+          //得到生产中,停产的,待产的
+          response.data.forEach(item => {
+            item.isEditing=false;
+            item.planStatus=parseInt(item.planStatus);
+            item.productId=parseInt(item.productId)
+          })
+          this.tableData2=response.data;
         })
-        this.tableData2=response.data;
-        console.log( this.tableData2)
-        // 在数据加载完成后,手动触发每个行的第一个下拉框的 change 事件
-        // this.$nextTick(() => {
-        //   // 获取第一个业务员选择框(假设表格只有一行)
-        //   this.tableDataStatus=[];
-        //   for (let i = 0; i < this.tableData2.length; i++) {
-        //     const firstSalesmanSelect = this.$refs['salesmanSelect'+i];
-        //     this.tableDataStatus.push({"index":i,"planStatus":this.tableData2[i].planStatus})
-        //     // console.log(firstSalesmanSelect,11111111)
-        //     // 触发 change 事件
-        //     if (firstSalesmanSelect) {
-        //       firstSalesmanSelect.$emit('change', {
-        //         target: {value: "ddd"},
-        //       });
-        //     }
-        //   }
-        //
-        // });
       })
     },
-    //弹窗里边的点击查询
+    // 弹窗里边的点击查询
     onSubmit(){
       this.formData.macId=this.macId;
       getPlanSpinningInfo(this.formData).then(response => {
@@ -609,7 +579,7 @@ export default {
         this.tableData2=response.data;
       });
     },
-    //重置
+    // 重置
     reset(){
       getPlanSpinningInfo({"macId":this.macId}).then(response => {
         //得到生产中,停产的,待产的
@@ -620,26 +590,89 @@ export default {
         this.tableData2=response.data;
       });
     },
-    //更新状态
+    // 更新状态
     updateStatus(ind, row,planStatus){
-      //先查询计划表中有没有正在上机的
-      getPlanSpinningInfo({"macId":this.macId,"planStatus":planStatus}).then(response => {
-        let i=0
-        //处理表格数据
-        this.tableData2.forEach(item=>{
-          item.machineId=this.machineId;
-          if(item.planStatus==1){
-            i++
-          }
-        })
-        if(i>=1&&response.data.length>0){
-          this.$message({
-            message: '只能有一个产品的状态为上机',
-            type: 'warning'
+      if(!this.isRowFilled(row)){
+        this.$message({message: '请完善当前行数据', type: 'warning'});
+        return;
+      }
+      //判断当前计划是否已经投产
+      getIsTheOrderProductProduced({"id":row.id}).then(resp=>{
+        if(resp.data.length>0){
+          this.$message({message: '当前计划订单产品在生产中已经不能修改', type: 'warning'});
+          return;//证明有在上级的产品--zhi能有一个上级产品
+        }
+        //不等于0待机才去校验是否重复
+        if(row.planStatus!=0){
+          //先查询计划表中有没有正在上机的或者停机的
+          getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":row.planStatus}).then(response => {
+            if(response.data.length>0){
+              if(row.planStatus==1){
+                this.$message({message: '只能有一个产品的状态为上机', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }else {
+                this.$message({message: '已停机不能在停机', type: 'warning'});
+                return;//证明有在上级的产品--zhi能有一个上级产品
+              }
+            }else {
+              if(row.planStatus==1){
+                getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"2"}).then(response => {
+                  if(response.data.length>0){
+                    this.$message({message: '已停机,请先处理停机产品,然后上机', type: 'warning'});
+                    return;//证明有在上级的产品--zhi能有一个上级产品
+                  }else {
+                    updateSpinningInfoPlanOne(row).then(response=>{
+                      if (response.code == 200) {
+                        this.$message({
+                          message: '修改成功',
+                          type: 'success'
+                        });
+                        this.getSpinningPlanList();
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      } else {
+                        this.$message({
+                          message: '修改失败',
+                          type: 'error'
+                        });
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      }
+                    })
+                  }
+                })
+              }
+              if(row.planStatus==2){
+                getCurrentProductionLineSuperior({"id":row.id,"macId":row.macId,"planStatus":"1"}).then(response => {
+                  if(response.data.length>0){
+                    this.$message({message: '已有一个其他产品正在上机,不能在停机,如需要停机,请停机在机产品', type: 'warning'});
+                    return;//证明有在上级的产品--zhi能有一个上级产品
+                  }else {
+                    updateSpinningInfoPlanOne(row).then(response=>{
+                      if (response.code == 200) {
+                        this.$message({
+                          message: '修改成功',
+                          type: 'success'
+                        });
+                        this.getSpinningPlanList();
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      } else {
+                        this.$message({
+                          message: '修改失败',
+                          type: 'error'
+                        });
+                        //最后把弹窗关掉
+                        this.nanInsertDialogTableVisible=false
+                      }
+                    })
+                  }
+                })
+              }
+            }
           });
-          row.planStatus=planStatus;
-          return;
         }else {
+          //修改待机的话直接修改
           updateSpinningInfoPlanOne(row).then(response=>{
             if (response.code == 200) {
               this.$message({
@@ -659,13 +692,11 @@ export default {
             }
           })
         }
-      });
 
-    }
-  },
-  computed: {
+      })
 
-  },
+    }
+  }
 }
 </script>
 

+ 4 - 3
zkqy-ui/src/views/orderMange/purchase/listInfoTwo.vue

@@ -478,7 +478,7 @@
         </h3>
         <h3>
           <i>采购时间:</i
-          ><span>{{ particularsOfSalesNote.purchaseTiem }}</span>
+          ><span>{{ particularsOfSalesNote.procurementTime }}</span>
         </h3>
       </div>
       <div class="tableDiv">
@@ -588,7 +588,7 @@ export default {
         purchaseOrderNumber: "",
         supplierName: "",
         purchaseLotNumber: "",
-        purchaseTiem: "采购时间",
+        procurementTime: "采购时间",
       },
       purchaseInfo: [],
       //是否显示销售单详情表单
@@ -903,7 +903,7 @@ export default {
       this.particularsOfSalesNote.purchaseOrderNumber = row.purchaseId;
       this.particularsOfSalesNote.supplierName = row.supplierSupplierName;
       this.particularsOfSalesNote.purchaseLotNumber = row.purchaseLotNumber;
-      this.particularsOfSalesNote.purchaseTiem = row.purchaseCreateTime;
+      this.particularsOfSalesNote.procurementTime = row.purchaseProcurementTime;
       this.viewPurchaseOrderDetailsShow = true;
       // console.log(row,"行数据");
       getPurchaseInfo({ purchaseId: row.purchaseSerialNumber }).then((resp) => {
@@ -968,6 +968,7 @@ export default {
               '[{"fieldName":"purchase.data_approval_status","mark":"6","refValue":"0"}]',
             children: [],
           });
+          console.log(this.excuteBtnArr[0].children,"dddddddddddddddddd")
           this.topBtnArr = res.data.resultMap.button?.filter(
             (item) => item.btnGroupType == "top"
           );

+ 21 - 1
zkqy-ui/src/views/system/user/index.vue

@@ -450,7 +450,9 @@
               />
             </el-form-item>
           </el-col>
+
         </el-row>
+
         <el-row>
           <el-col :span="12">
             <el-form-item label="用户性别">
@@ -525,6 +527,21 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="登录工具端" label-width="100px">
+              <el-radio-group v-model="form.isCanTools">
+                <el-radio
+                  v-for="dict in dictLoginTools"
+                  :key="dict.value"
+                  :label="dict.value"
+                >{{ dict.label }}
+                </el-radio
+                >
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -597,10 +614,11 @@ import ExcelDownLoad from "@/components/ExcelDownLoad/index.vue";
 
 export default {
   name: "User",
-  dicts: ["sys_normal_disable", "sys_user_sex"],
+  dicts: ["sys_normal_disable", "sys_user_sex","is_can_tools"],
   components: {Treeselect, ExcelDownLoad},
   data() {
     return {
+      dictLoginTools:[{value:"0",label:"允许"},{value:"1",label:"禁止"}],
       // 前端导出数据
       headerList: {
         用户序号: "userId",
@@ -862,6 +880,7 @@ export default {
         remark: undefined,
         postIds: [],
         roleIds: [],
+        isCanTools:undefined
       };
       this.resetForm("form");
     },
@@ -900,6 +919,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      // alert("dddddddddddddd")
       this.reset();
       getUser().then((response) => {
         this.postOptions = response.posts;