Browse Source

feat:fjqy项目

hmc 1 year ago
parent
commit
7ad84adc4f
100 changed files with 9635 additions and 259 deletions
  1. 8 1
      zkqy-admin/src/main/java/com/zkqy/ZkqyApplication.java
  2. 2 0
      zkqy-admin/src/main/java/com/zkqy/web/controller/common/CommonFileController.java
  3. 2 1
      zkqy-admin/src/main/java/com/zkqy/web/ljj.java
  4. 46 0
      zkqy-admin/src/main/java/com/zkqy/web/yb.java
  5. 0 1
      zkqy-business/src/main/java/com/zkqy/business/controller/CommonController.java
  6. 4 9
      zkqy-common/src/main/java/com/zkqy/common/constant/Constants.java
  7. 11 0
      zkqy-common/src/main/java/com/zkqy/common/utils/DateUtils.java
  8. 25 0
      zkqy-common/src/main/java/com/zkqy/common/utils/bean/BeanUtils.java
  9. 1 1
      zkqy-custom-business/src/main/resources/mapper/business/DetailsOfTheRefuelingPlanLogsMapper.xml
  10. 10 1
      zkqy-framework/src/main/java/com/zkqy/framework/sso_oauth2/controller/ThirdPartLoginController.java
  11. 1 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/BillOfMaterialsController.java
  12. 130 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/CustomerInformationController.java
  13. 149 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ExportproductionschedulingController.java
  14. 6 6
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/FinishedGoodsInventoryLogController.java
  15. 113 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ManhourController.java
  16. 41 8
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/MaterialInfoController.java
  17. 8 5
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/OperationInstructionController.java
  18. 113 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PlanTaskDetailsController.java
  19. 113 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PlannedPurchaseLogController.java
  20. 169 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductDeliverySheetController.java
  21. 113 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductDeliverySheetDetailsController.java
  22. 115 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionBomsController.java
  23. 124 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionBomsDetailsController.java
  24. 129 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionPlanningManagementController.java
  25. 13 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionTasksController.java
  26. 17 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PurchaseOrderController.java
  27. 3 1
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/WarehouseEntryInformationController.java
  28. 237 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/CustomerInformation.java
  29. 478 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/Exportproductionscheduling.java
  30. 5 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/FinishedGoodsInventoryLog.java
  31. 223 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/Manhour.java
  32. 118 62
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/MaterialInfo.java
  33. 13 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/OperationInstruction.java
  34. 321 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlanTaskDetails.java
  35. 53 78
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlannedPurchaseLog.java
  36. 339 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductDeliverySheet.java
  37. 209 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductDeliverySheetDetails.java
  38. 265 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionBoms.java
  39. 248 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionBomsDetails.java
  40. 344 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionPlanningManagement.java
  41. 36 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ExportproductionschedulingArgumentVo.java
  42. 82 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/PlanPurchaseOrder.java
  43. 21 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductDeliverySheetVo.java
  44. 24 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductionBomsDetailsVo.java
  45. 216 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductionPlanningManagementVo.java
  46. 63 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/CustomerInformationMapper.java
  47. 63 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ExportproductionschedulingMapper.java
  48. 63 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ManhourMapper.java
  49. 13 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialInfoMapper.java
  50. 4 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/OperationInstructionMapper.java
  51. 63 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlanTaskDetailsMapper.java
  52. 63 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlannedPurchaseLogMapper.java
  53. 2 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PocurementdetailsMapper.java
  54. 72 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductDeliverySheetDetailsMapper.java
  55. 74 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductDeliverySheetMapper.java
  56. 80 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionBomsDetailsMapper.java
  57. 63 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionBomsMapper.java
  58. 73 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionPlanningManagementMapper.java
  59. 2 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/WorkingprocedureMapper.java
  60. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/ICustomerInformationService.java
  61. 77 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IExportproductionschedulingService.java
  62. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IManhourService.java
  63. 18 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IMaterialInfoService.java
  64. 4 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IOperationInstructionService.java
  65. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPlanTaskDetailsService.java
  66. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPlannedPurchaseLogService.java
  67. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductDeliverySheetDetailsService.java
  68. 104 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductDeliverySheetService.java
  69. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionBomsDetailsService.java
  70. 61 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionBomsService.java
  71. 70 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionPlanningManagementService.java
  72. 7 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionTasksService.java
  73. 10 2
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPurchaseOrderService.java
  74. 96 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/CustomerInformationServiceImpl.java
  75. 271 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ExportproductionschedulingServiceImpl.java
  76. 96 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ManhourServiceImpl.java
  77. 133 5
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/MaterialInfoServiceImpl.java
  78. 4 4
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/OperationInstructionServiceImpl.java
  79. 96 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PlanTaskDetailsServiceImpl.java
  80. 96 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PlannedPurchaseLogServiceImpl.java
  81. 96 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductDeliverySheetDetailsServiceImpl.java
  82. 287 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductDeliverySheetServiceImpl.java
  83. 97 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionBomsDetailsServiceImpl.java
  84. 97 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionBomsServiceImpl.java
  85. 159 0
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionPlanningManagementServiceImpl.java
  86. 134 5
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionTasksServiceImpl.java
  87. 127 20
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PurchaseOrderServiceImpl.java
  88. 52 31
      zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/WarehouseEntryInformationServiceImpl.java
  89. 141 0
      zkqy-fujian-amichi/src/main/resources/mapper/CustomerInformationMapper.xml
  90. 224 0
      zkqy-fujian-amichi/src/main/resources/mapper/ExportproductionschedulingMapper.xml
  91. 135 0
      zkqy-fujian-amichi/src/main/resources/mapper/ManhourMapper.xml
  92. 88 2
      zkqy-fujian-amichi/src/main/resources/mapper/MaterialInfoMapper.xml
  93. 14 7
      zkqy-fujian-amichi/src/main/resources/mapper/OperationInstructionMapper.xml
  94. 169 0
      zkqy-fujian-amichi/src/main/resources/mapper/PlanTaskDetailsMapper.xml
  95. 135 0
      zkqy-fujian-amichi/src/main/resources/mapper/PlannedPurchaseLogMapper.xml
  96. 12 1
      zkqy-fujian-amichi/src/main/resources/mapper/PocurementdetailsMapper.xml
  97. 155 0
      zkqy-fujian-amichi/src/main/resources/mapper/ProductDeliverySheetDetailsMapper.xml
  98. 221 0
      zkqy-fujian-amichi/src/main/resources/mapper/ProductDeliverySheetMapper.xml
  99. 236 0
      zkqy-fujian-amichi/src/main/resources/mapper/ProductionBomsDetailsMapper.xml
  100. 151 0
      zkqy-fujian-amichi/src/main/resources/mapper/ProductionBomsMapper.xml

+ 8 - 1
zkqy-admin/src/main/java/com/zkqy/ZkqyApplication.java

@@ -39,7 +39,14 @@ public class ZkqyApplication
                 "     CCC::::::::::::CL::::::::::::::::::::::LI::::::::IE::::::::::::::::::::EN::::::N        N::::::N      T:::::::::T      \n" +
                 "        CCCCCCCCCCCCCLLLLLLLLLLLLLLLLLLLLLLLLIIIIIIIIIIEEEEEEEEEEEEEEEEEEEEEENNNNNNNN         NNNNNNN      TTTTTTTTTTT      "
         );
-        ////输出容器中所有bean
+//        Long id=new Long(1);
+//        id.toString();
+//        System.out.println(id);
+//        System.out.println();
+        //base........................................
+        //base........................................
+        //base........................................
+        //输出容器中所有bean
         //ApplicationContext context = SpringApplication.run(ZkqyApplication.class, args);
         //Arrays.stream(context.getBeanDefinitionNames()).forEach(System.out::println);
     }

+ 2 - 0
zkqy-admin/src/main/java/com/zkqy/web/controller/common/CommonFileController.java

@@ -124,6 +124,7 @@ public class CommonFileController {
 
     /**
      * 通用上传请求(单个)
+     * /common/upload
      */
     @PostMapping("/upload")
     public AjaxResult uploadFile(MultipartFile file) throws Exception {
@@ -302,6 +303,7 @@ public class CommonFileController {
 
     /**
      * 导入execl数据(单个文件)文件名即表名
+     * common/uploadData
      */
 
     @Log(title = "动态表格", businessType = BusinessType.IMPORT)

+ 2 - 1
zkqy-admin/src/main/java/com/zkqy/web/ljj.java

@@ -244,4 +244,5 @@ public class ljj {
 恒泰生产协同管理系统手持机(PDA)实现了:扫码入库、入库日志、扫码拆包、出库单、数据统计、消息通知
 
 
- */
+ */
+

+ 46 - 0
zkqy-admin/src/main/java/com/zkqy/web/yb.java

@@ -0,0 +1,46 @@
+package com.zkqy.web;
+
+import org.junit.Test;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+
+public class yb {
+    public static void main(String[] args) throws InterruptedException, ExecutionException {
+
+
+            long startTime = System.currentTimeMillis();
+
+            //调用用户服务获取用户基本信息
+            CompletableFuture<String> userFuture = CompletableFuture.supplyAsync(() ->
+            //模拟查询商品耗时500毫秒
+            {
+                try {
+                    Thread.sleep(500);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                return "用户A";
+            });
+
+            //调用商品服务获取商品基本信息
+            CompletableFuture<String> goodsFuture = CompletableFuture.supplyAsync(() ->
+            //模拟查询商品耗时500毫秒
+            {
+                try {
+                    Thread.sleep(400);
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                return "商品A";
+            });
+
+            System.out.println("获取用户信息:" + userFuture.get());
+            System.out.println("获取商品信息:" + goodsFuture.get());
+
+            //模拟主程序耗时时间
+            Thread.sleep(600);
+            System.out.println("总共用时" + (System.currentTimeMillis() - startTime) + "ms");
+        }
+
+}

+ 0 - 1
zkqy-business/src/main/java/com/zkqy/business/controller/CommonController.java

@@ -9,7 +9,6 @@ import com.zkqy.common.core.domain.AjaxResult;
 import com.zkqy.common.core.page.TableDataInfo;
 import com.zkqy.common.enums.BusinessType;
 import com.zkqy.common.exception.tenantdatassource.TenantDataSource;
-import com.zkqy.common.params.ProcessCommonEntity;
 import com.zkqy.execution.produce.dispersed.entity.CommonEntity;
 import com.zkqy.execution.produce.dispersed.entity.TableSql;
 import com.zkqy.execution.produce.dispersed.service.ICommonService;

+ 4 - 9
zkqy-common/src/main/java/com/zkqy/common/constant/Constants.java

@@ -62,17 +62,12 @@ public class Constants {
      * 登录失败
      */
     public static final String LOGIN_FAIL = "Error";
-
+ 
     /**
      * 验证码有效期(分钟)
      */
     public static final Integer CAPTCHA_EXPIRATION = 2;
 
-    /**
-     * 共通文件上传存放redis时间(分钟)
-     */
-    public static final Integer BYTESTREAM_EXPIRATION = 30;
-
     /**
      * 令牌
      */
@@ -136,11 +131,11 @@ public class Constants {
     /**
      * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
      */
-    public static final String[] JOB_WHITELIST_STR = {"com.zkqy"};
+    public static final String[] JOB_WHITELIST_STR = { "com.zkqy" };
 
     /**
      * 定时任务违规的字符
      */
-    public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
-            "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config"};
+    public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
+            "org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
 }

+ 11 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/DateUtils.java

@@ -210,4 +210,15 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         String dateStr = dateTime.format(fmt);
         return dateStr;
     }
+
+    /**
+     * 日期类型转换 String 转 LocalDateTime
+     */
+    public static LocalDate toLocalDate(String dateTime,String df)
+    {
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(df);
+        LocalDate localDate= LocalDate.parse(dateTime, dateTimeFormatter);
+        return localDate;
+    }
+
 }

+ 25 - 0
zkqy-common/src/main/java/com/zkqy/common/utils/bean/BeanUtils.java

@@ -1,10 +1,17 @@
 package com.zkqy.common.utils.bean;
 
+import org.springframework.beans.BeanWrapper;
+import org.springframework.beans.BeanWrapperImpl;
+
+import java.beans.PropertyDescriptor;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import java.util.stream.Stream;
 
 /**
  * Bean 工具类
@@ -40,6 +47,24 @@ public class BeanUtils extends org.springframework.beans.BeanUtils
         }
     }
 
+    public static String[] getNullPropertyNames(Object source) {
+        BeanWrapper src = new BeanWrapperImpl(source);
+        PropertyDescriptor[] pds = src.getPropertyDescriptors();
+
+        Set<String> emptyNames = new HashSet<>();
+
+        for (PropertyDescriptor pd : pds) {
+            //check if value of this property is null then add it to the collection
+            Object srcValue = src.getPropertyValue(pd.getName());
+            if (srcValue == null||srcValue==""){
+                emptyNames.add(pd.getName());
+            }
+        }
+
+        String[] result = new String[emptyNames.size()];
+        return emptyNames.toArray(result);
+    }
+
     /**
      * 获取对象的setter方法。
      * 

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

@@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="createTime != null">#{createTime},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="productId != null">#{productId},</if>
-            <if test="orderId != null">#{orderId}</if>
+            <if test="orderId != null and orderId != ''">#{orderId}</if>
          </trim>
     </insert>
 

+ 10 - 1
zkqy-framework/src/main/java/com/zkqy/framework/sso_oauth2/controller/ThirdPartLoginController.java

@@ -41,6 +41,9 @@ public class ThirdPartLoginController {
     @Value("${OpenAuthorization2.MES.CALLBACK}")
     private String CALLBACK;
 
+//    @Value("${OpenAuthorization2.MES.NAME}")
+//    private String name;
+
     @GetMapping("oauth/callback")
     public String callback(@RequestParam("code") String code, HttpSession session, HttpServletRequest request) {
         try {
@@ -49,7 +52,13 @@ public class ThirdPartLoginController {
             map.put("grant_type", "authorization_code");
             map.put("redirect_uri", CALLBACK);
             map.put("code", code);
-            map.put("client_id", "mestools");
+//            map.put("client_id", "mestools");
+            map.put("client_id", "hmc");
+//            if(name.equals("")&&name!=null){
+//                map.put("client_id", "mestools");
+//            }else {
+//
+//            }
             map.put("client_secret", "zkqy8888");
             // 获取token请求头
             Map<String, String> headers = new HashMap<>();

+ 1 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/BillOfMaterialsController.java

@@ -167,6 +167,7 @@ public class BillOfMaterialsController extends BaseController
     {
         BillOfMaterials billOfMaterials=new BillOfMaterials();
         billOfMaterials.setFid(id.toString());
+        billOfMaterials.setDelFlag("0");
         List<BillOfMaterials> billOfMaterials1 = billOfMaterialsService.selectBillOfMaterialsList(billOfMaterials);
         if (billOfMaterials1.size()>0){
            return AjaxResult.error(666,"此菜单被其他菜单引用不能删除");

+ 130 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/CustomerInformationController.java

@@ -0,0 +1,130 @@
+package com.zkqy.amichi.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.common.annotation.Anonymous;
+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.amichi.domain.CustomerInformation;
+import com.zkqy.amichi.service.ICustomerInformationService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 客户信息Controller
+ *
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@RestController
+@RequestMapping("/amichi/customerinformation")
+@Api(value = "/amichi/information", description = "客户信息-接口")
+public class CustomerInformationController extends BaseController
+{
+
+    @Autowired
+    private ICustomerInformationService customerInformationService;
+
+    /**
+     * 查询客户信息列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:information:list')")
+    @GetMapping("/list")
+    @Anonymous
+    @ApiOperation(value = "查询客户信息列表")
+    public TableDataInfo list(CustomerInformation customerInformation)
+    {
+        startPage();
+        List<CustomerInformation> list = customerInformationService.selectCustomerInformationList(customerInformation);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询客户信息列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:information:list')")
+    @GetMapping("/listInfo")
+    @ApiOperation(value = "查询客户信息列表")
+    public AjaxResult listInfo(CustomerInformation customerInformation)
+    {
+        List<CustomerInformation> list = customerInformationService.selectCustomerInformationList(customerInformation);
+        return AjaxResult.success(list);
+    }
+
+
+    /**
+     * 导出客户信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:information:export')")
+    @Log(title = "客户信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出客户信息列表")
+    public void export(HttpServletResponse response, CustomerInformation customerInformation)
+    {
+        List<CustomerInformation> list = customerInformationService.selectCustomerInformationList(customerInformation);
+        ExcelUtil<CustomerInformation> util = new ExcelUtil<CustomerInformation>(CustomerInformation.class);
+        util.exportExcel(response, list, "客户信息数据");
+    }
+
+    /**
+     * 获取客户信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:information:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取客户信息详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(customerInformationService.selectCustomerInformationById(id));
+    }
+
+    /**
+     * 新增客户信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:information:add')")
+    @Log(title = "客户信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增客户信息")
+    public AjaxResult add(@RequestBody CustomerInformation customerInformation)
+    {
+        return toAjax(customerInformationService.insertCustomerInformation(customerInformation));
+    }
+
+    /**
+     * 修改客户信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:information:edit')")
+    @Log(title = "客户信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改客户信息")
+    public AjaxResult edit(@RequestBody CustomerInformation customerInformation)
+    {
+        return toAjax(customerInformationService.updateCustomerInformation(customerInformation));
+    }
+
+    /**
+     * 删除客户信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:information:remove')")
+    @Log(title = "客户信息", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除客户信息")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(customerInformationService.deleteCustomerInformationByIds(ids));
+    }
+}

+ 149 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ExportproductionschedulingController.java

@@ -0,0 +1,149 @@
+package com.zkqy.amichi.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.amichi.domain.vo.ExportproductionschedulingArgumentVo;
+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.amichi.domain.Exportproductionscheduling;
+import com.zkqy.amichi.service.IExportproductionschedulingService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 外销排产Controller
+ *
+ * @author zkqy
+ * @date 2024-07-09
+ */
+@RestController
+@RequestMapping("/amichi/exportproductionscheduling")
+@Api(value = "/amichi/exportproductionscheduling", description = "外销排产-接口")
+public class ExportproductionschedulingController extends BaseController
+{
+
+    @Autowired
+    private IExportproductionschedulingService exportproductionschedulingService;
+
+    /**
+     * 查询外销排产列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询外销排产列表")
+    public TableDataInfo list(Exportproductionscheduling exportproductionscheduling)
+    {
+        startPage();
+//        exportproductionscheduling.getCreateTimeHe().get(0).setBeginTime("2019-07-08 00:00:00");
+
+        List<Exportproductionscheduling> list = exportproductionschedulingService.selectExportproductionschedulingList(exportproductionscheduling);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出外销排产列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:export')")
+    @Log(title = "外销排产", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出外销排产列表")
+    public void export(HttpServletResponse response, Exportproductionscheduling exportproductionscheduling)
+    {
+        List<Exportproductionscheduling> list = exportproductionschedulingService.selectExportproductionschedulingList(exportproductionscheduling);
+        ExcelUtil<Exportproductionscheduling> util = new ExcelUtil<Exportproductionscheduling>(Exportproductionscheduling.class);
+        util.exportExcel(response, list, "外销排产数据");
+    }
+
+    /**
+     * 获取外销排产详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取外销排产详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(exportproductionschedulingService.selectExportproductionschedulingById(id));
+    }
+
+    /**
+     * 新增外销排产
+     */
+//    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:add')")
+//    @Log(title = "外销排产", businessType = BusinessType.INSERT)
+//    @PostMapping
+//    @ApiOperation(value = "新增外销排产")
+//    public AjaxResult add(@RequestBody Exportproductionscheduling exportproductionscheduling)
+//    {
+//        return toAjax(exportproductionschedulingService.insertExportproductionscheduling(exportproductionscheduling));
+//    }
+
+
+    /**
+     * 新增外销排产
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:add')")
+    @Log(title = "外销排产", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增外销排产")
+    public AjaxResult add(@RequestBody List<Exportproductionscheduling> exportproductionscheduling)
+    {
+        return toAjax(exportproductionschedulingService.insertExportproductionschedulingS(exportproductionscheduling));
+    }
+
+
+    /**
+     * 修改外销排产
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:edit')")
+    @Log(title = "外销排产", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改外销排产")
+    public AjaxResult edit(@RequestBody Exportproductionscheduling exportproductionscheduling)
+    {
+        return toAjax(exportproductionschedulingService.updateExportproductionscheduling(exportproductionscheduling));
+    }
+
+    /**
+     * 删除外销排产
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:remove')")
+    @Log(title = "外销排产", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除外销排产")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(exportproductionschedulingService.deleteExportproductionschedulingByIds(ids));
+    }
+
+    /**
+     * 自动排产
+     * 排产类型分外销内销,高压机
+     * 里边有一个集合放的都是计划id
+     * /amichi/exportproductionscheduling/automatic/scheduling
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:add')")
+    @Log(title = "自动排产", businessType = BusinessType.INSERT)
+    @PostMapping("/automatic/scheduling")
+    @ApiOperation(value = "自动排产")
+    public AjaxResult automaticScheduling(@RequestBody ExportproductionschedulingArgumentVo exportproductionschedulingVo)
+    {
+        return exportproductionschedulingService.automaticScheduling(exportproductionschedulingVo);
+    }
+
+
+}

+ 6 - 6
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/FinishedGoodsInventoryLogController.java

@@ -37,12 +37,12 @@ public class FinishedGoodsInventoryLogController extends BaseController
     @Autowired
     private IFinishedGoodsInventoryLogService finishedGoodsInventoryLogService;
 
-/**
- * 查询成品入库日志信息列表
- */
-//@PreAuthorize("@ss.hasPermi('amichi:log:list')")
-@GetMapping("/list")
-@ApiOperation(value = "查询成品入库日志信息列表")
+    /**
+     * 查询成品入库日志信息列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:log:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询成品入库日志信息列表")
     public TableDataInfo list(FinishedGoodsInventoryLog finishedGoodsInventoryLog)
     {
         startPage();

+ 113 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ManhourController.java

@@ -0,0 +1,113 @@
+package com.zkqy.amichi.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.amichi.domain.Manhour;
+import com.zkqy.amichi.service.IManhourService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 产品工时Controller
+ *
+ * @author zkqy
+ * @date 2024-07-25
+ */
+@RestController
+@RequestMapping("/hamhour/manhour")
+@Api(value = "/hamhour/manhour", description = "产品工时-接口")
+public class ManhourController extends BaseController
+{
+    @Autowired
+    private IManhourService manhourService;
+
+/**
+ * 查询产品工时列表
+ */
+//@PreAuthorize("@ss.hasPermi('hamhour:manhour:list')")
+@GetMapping("/list")
+@ApiOperation(value = "查询产品工时列表")
+    public TableDataInfo list(Manhour manhour)
+    {
+        startPage();
+        List<Manhour> list = manhourService.selectManhourList(manhour);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出产品工时列表
+     */
+    @PreAuthorize("@ss.hasPermi('hamhour:manhour:export')")
+    @Log(title = "产品工时", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出产品工时列表")
+    public void export(HttpServletResponse response, Manhour manhour)
+    {
+        List<Manhour> list = manhourService.selectManhourList(manhour);
+        ExcelUtil<Manhour> util = new ExcelUtil<Manhour>(Manhour.class);
+        util.exportExcel(response, list, "产品工时数据");
+    }
+
+    /**
+     * 获取产品工时详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('hamhour:manhour:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取产品工时详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(manhourService.selectManhourById(id));
+    }
+
+    /**
+     * 新增产品工时
+     */
+    @PreAuthorize("@ss.hasPermi('hamhour:manhour:add')")
+    @Log(title = "产品工时", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增产品工时")
+    public AjaxResult add(@RequestBody Manhour manhour)
+    {
+        return toAjax(manhourService.insertManhour(manhour));
+    }
+
+    /**
+     * 修改产品工时
+     */
+    @PreAuthorize("@ss.hasPermi('hamhour:manhour:edit')")
+    @Log(title = "产品工时", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改产品工时")
+    public AjaxResult edit(@RequestBody Manhour manhour)
+    {
+        return toAjax(manhourService.updateManhour(manhour));
+    }
+
+    /**
+     * 删除产品工时
+     */
+    @PreAuthorize("@ss.hasPermi('hamhour:manhour:remove')")
+    @Log(title = "产品工时", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除产品工时")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(manhourService.deleteManhourByIds(ids));
+    }
+}

+ 41 - 8
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/MaterialInfoController.java

@@ -2,18 +2,22 @@ package com.zkqy.amichi.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.amichi.domain.ProductionBoms;
+import com.zkqy.amichi.domain.ProductionTasks;
+import com.zkqy.amichi.domain.TaskDetails;
+import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
+import com.zkqy.amichi.mapper.ProductionBomsMapper;
+import com.zkqy.amichi.mapper.ProductionPlanningManagementMapper;
+import com.zkqy.amichi.mapper.ProductionTasksMapper;
+import com.zkqy.amichi.mapper.TaskDetailsMapper;
+import com.zkqy.common.core.domain.entity.SysUser;
 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 org.springframework.security.core.parameters.P;
+import org.springframework.web.bind.annotation.*;
 import com.zkqy.common.annotation.Log;
 import com.zkqy.common.core.controller.BaseController;
 import com.zkqy.common.core.domain.AjaxResult;
@@ -22,6 +26,7 @@ import com.zkqy.amichi.domain.MaterialInfo;
 import com.zkqy.amichi.service.IMaterialInfoService;
 import com.zkqy.common.utils.poi.ExcelUtil;
 import com.zkqy.common.core.page.TableDataInfo;
+import org.springframework.web.multipart.MultipartFile;
 
 /**
  * 物料信息Controller
@@ -37,6 +42,21 @@ public class MaterialInfoController extends BaseController
     @Autowired
     private IMaterialInfoService materialInfoService;
 
+
+
+
+    /**
+     * 查询所有计划的物料信息并合并
+     * @RequestParam("specification") String specification,
+     * @RequestParam("modelNumber") String modelNumber
+     */
+    @Log(title = "查询所有计划的物料信息并合并", businessType = BusinessType.IMPORT)
+    //@PreAuthorize("@ss.hasPermi('system:user:import')")
+    @PostMapping("/viewPlannedMaterialStatus")
+    public AjaxResult viewPlannedMaterialStatus(@RequestBody List<String> ids)  {
+       return materialInfoService.viewPlannedMaterialStatus(ids);
+    }
+
     /**
      * 查询物料信息列表
      */
@@ -64,6 +84,19 @@ public class MaterialInfoController extends BaseController
         util.exportExcel(response, list, "物料信息数据");
     }
 
+    @Log(title = "物料管理", businessType = BusinessType.IMPORT)
+    //@PreAuthorize("@ss.hasPermi('system:user:import')")
+    @PostMapping("/importData")
+    public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception {
+        ExcelUtil<MaterialInfo> util = new ExcelUtil<>(MaterialInfo.class);
+        List<MaterialInfo> materialInfos = util.importExcel(file.getInputStream());
+        String operName = getUsername();//当前操作用户
+        String message = materialInfoService.importMaterialInfo(materialInfos, updateSupport, operName);
+        return success(message);
+    }
+
+
+
     /**
      * 获取物料信息详细信息
      */

+ 8 - 5
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/OperationInstructionController.java

@@ -1,7 +1,10 @@
-package com.zkqy.system.controller;
+package com.zkqy.amichi.controller;
 
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.amichi.domain.OperationInstruction;
+import com.zkqy.amichi.service.IOperationInstructionService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -18,8 +21,7 @@ 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.system.domain.OperationInstruction;
-import com.zkqy.system.service.IOperationInstructionService;
+
 import com.zkqy.common.utils.poi.ExcelUtil;
 import com.zkqy.common.core.page.TableDataInfo;
 
@@ -30,8 +32,8 @@ import com.zkqy.common.core.page.TableDataInfo;
  * @date 2024-07-05
  */
 @RestController
-@RequestMapping("/system/instruction")
-@Api(value = "/system/instruction", description = "作业指导书-接口")
+@RequestMapping("/amichi/operationInstruction")
+@Api(value = "/amichi/operationInstruction", description = "作业指导书-接口")
 public class OperationInstructionController extends BaseController
 {
     @Autowired
@@ -77,6 +79,7 @@ public class OperationInstructionController extends BaseController
 
     /**
      * 新增作业指导书
+     * /amichi/operationInstruction/
      */
     @PreAuthorize("@ss.hasPermi('system:instruction:add')")
     @Log(title = "作业指导书", businessType = BusinessType.INSERT)

+ 113 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PlanTaskDetailsController.java

@@ -0,0 +1,113 @@
+package com.zkqy.amichi.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.amichi.domain.PlanTaskDetails;
+import com.zkqy.amichi.service.IPlanTaskDetailsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 生产任务单明细Controller
+ *
+ * @author zkqy
+ * @date 2024-07-23
+ */
+@RestController
+@RequestMapping("/plan_task_details/计划详细信息表")
+@Api(value = "/plan_task_details/计划详细信息表", description = "生产任务单明细-接口")
+public class PlanTaskDetailsController extends BaseController
+{
+    @Autowired
+    private IPlanTaskDetailsService planTaskDetailsService;
+
+/**
+ * 查询生产任务单明细列表
+ */
+//@PreAuthorize("@ss.hasPermi('plan_task_details:计划详细信息表:list')")
+@GetMapping("/list")
+@ApiOperation(value = "查询生产任务单明细列表")
+    public TableDataInfo list(PlanTaskDetails planTaskDetails)
+    {
+        startPage();
+        List<PlanTaskDetails> list = planTaskDetailsService.selectPlanTaskDetailsList(planTaskDetails);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出生产任务单明细列表
+     */
+    @PreAuthorize("@ss.hasPermi('plan_task_details:计划详细信息表:export')")
+    @Log(title = "生产任务单明细", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出生产任务单明细列表")
+    public void export(HttpServletResponse response, PlanTaskDetails planTaskDetails)
+    {
+        List<PlanTaskDetails> list = planTaskDetailsService.selectPlanTaskDetailsList(planTaskDetails);
+        ExcelUtil<PlanTaskDetails> util = new ExcelUtil<PlanTaskDetails>(PlanTaskDetails.class);
+        util.exportExcel(response, list, "生产任务单明细数据");
+    }
+
+    /**
+     * 获取生产任务单明细详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('plan_task_details:计划详细信息表:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取生产任务单明细详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(planTaskDetailsService.selectPlanTaskDetailsById(id));
+    }
+
+    /**
+     * 新增生产任务单明细
+     */
+    @PreAuthorize("@ss.hasPermi('plan_task_details:计划详细信息表:add')")
+    @Log(title = "生产任务单明细", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增生产任务单明细")
+    public AjaxResult add(@RequestBody PlanTaskDetails planTaskDetails)
+    {
+        return toAjax(planTaskDetailsService.insertPlanTaskDetails(planTaskDetails));
+    }
+
+    /**
+     * 修改生产任务单明细
+     */
+    @PreAuthorize("@ss.hasPermi('plan_task_details:计划详细信息表:edit')")
+    @Log(title = "生产任务单明细", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改生产任务单明细")
+    public AjaxResult edit(@RequestBody PlanTaskDetails planTaskDetails)
+    {
+        return toAjax(planTaskDetailsService.updatePlanTaskDetails(planTaskDetails));
+    }
+
+    /**
+     * 删除生产任务单明细
+     */
+    @PreAuthorize("@ss.hasPermi('plan_task_details:计划详细信息表:remove')")
+    @Log(title = "生产任务单明细", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除生产任务单明细")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(planTaskDetailsService.deletePlanTaskDetailsByIds(ids));
+    }
+}

+ 113 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PlannedPurchaseLogController.java

@@ -0,0 +1,113 @@
+package com.zkqy.amichi.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.amichi.domain.PlannedPurchaseLog;
+import com.zkqy.amichi.service.IPlannedPurchaseLogService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 计划采购物料日志Controller
+ *
+ * @author zkqy
+ * @date 2024-07-22
+ */
+@RestController
+@RequestMapping("/amichi/plannedPurchaseLog")
+@Api(value = "/amichi/plannedPurchaseLog", description = "计划采购物料日志-接口")
+public class PlannedPurchaseLogController extends BaseController
+{
+    @Autowired
+    private IPlannedPurchaseLogService plannedPurchaseLogService;
+
+/**
+ * 查询计划采购物料日志列表
+ */
+//@PreAuthorize("@ss.hasPermi('amichi:plannedPurchaseLog:list')")
+@GetMapping("/list")
+@ApiOperation(value = "查询计划采购物料日志列表")
+    public TableDataInfo list(PlannedPurchaseLog plannedPurchaseLog)
+    {
+        startPage();
+        List<PlannedPurchaseLog> list = plannedPurchaseLogService.selectPlannedPurchaseLogList(plannedPurchaseLog);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出计划采购物料日志列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:plannedPurchaseLog:export')")
+    @Log(title = "计划采购物料日志", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出计划采购物料日志列表")
+    public void export(HttpServletResponse response, PlannedPurchaseLog plannedPurchaseLog)
+    {
+        List<PlannedPurchaseLog> list = plannedPurchaseLogService.selectPlannedPurchaseLogList(plannedPurchaseLog);
+        ExcelUtil<PlannedPurchaseLog> util = new ExcelUtil<PlannedPurchaseLog>(PlannedPurchaseLog.class);
+        util.exportExcel(response, list, "计划采购物料日志数据");
+    }
+
+    /**
+     * 获取计划采购物料日志详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:plannedPurchaseLog:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取计划采购物料日志详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(plannedPurchaseLogService.selectPlannedPurchaseLogById(id));
+    }
+
+    /**
+     * 新增计划采购物料日志
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:plannedPurchaseLog:add')")
+    @Log(title = "计划采购物料日志", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增计划采购物料日志")
+    public AjaxResult add(@RequestBody PlannedPurchaseLog plannedPurchaseLog)
+    {
+        return toAjax(plannedPurchaseLogService.insertPlannedPurchaseLog(plannedPurchaseLog));
+    }
+
+    /**
+     * 修改计划采购物料日志
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:plannedPurchaseLog:edit')")
+    @Log(title = "计划采购物料日志", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改计划采购物料日志")
+    public AjaxResult edit(@RequestBody PlannedPurchaseLog plannedPurchaseLog)
+    {
+        return toAjax(plannedPurchaseLogService.updatePlannedPurchaseLog(plannedPurchaseLog));
+    }
+
+    /**
+     * 删除计划采购物料日志
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:plannedPurchaseLog:remove')")
+    @Log(title = "计划采购物料日志", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除计划采购物料日志")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(plannedPurchaseLogService.deletePlannedPurchaseLogByIds(ids));
+    }
+}

+ 169 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductDeliverySheetController.java

@@ -0,0 +1,169 @@
+package  com.zkqy.amichi.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.amichi.domain.vo.ProductDeliverySheetVo;
+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.amichi.domain.ProductDeliverySheet;
+import  com.zkqy.amichi.service.IProductDeliverySheetService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 产品出库单Controller
+ *
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@RestController
+@RequestMapping("/amichi/sheet")
+@Api(value = "/amichi/sheet", description = "产品出库单-接口")
+public class ProductDeliverySheetController extends BaseController
+{
+    @Autowired
+    private IProductDeliverySheetService productDeliverySheetService;
+
+    /**
+     * 查询产品出库单列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:sheet:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询产品出库单列表")
+    public TableDataInfo list(ProductDeliverySheet productDeliverySheet)
+    {
+        startPage();
+        List<ProductDeliverySheet> list = productDeliverySheetService.selectProductDeliverySheetList(productDeliverySheet);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出产品出库单列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:export')")
+    @Log(title = "产品出库单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出产品出库单列表")
+    public void export(HttpServletResponse response, ProductDeliverySheet productDeliverySheet)
+    {
+        List<ProductDeliverySheet> list = productDeliverySheetService.selectProductDeliverySheetList(productDeliverySheet);
+        ExcelUtil<ProductDeliverySheet> util = new ExcelUtil<ProductDeliverySheet>(ProductDeliverySheet.class);
+        util.exportExcel(response, list, "产品出库单数据");
+    }
+
+    /**
+     * 获取产品出库单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取产品出库单详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productDeliverySheetService.selectProductDeliverySheetByIdVo(id));
+    }
+
+    /**
+     * 新增产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:add')")
+    @Log(title = "产品出库单", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增产品出库单")
+    public AjaxResult add(@RequestBody ProductDeliverySheet productDeliverySheet)
+    {
+        return toAjax(productDeliverySheetService.insertProductDeliverySheet(productDeliverySheet));
+    }
+
+    /**
+     * 新增产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:add')")
+    @Log(title = "产品出库单", businessType = BusinessType.INSERT)
+    @PostMapping("/insert")
+    @ApiOperation(value = "新增产品出库单")
+    public AjaxResult addVo(@RequestBody ProductDeliverySheetVo productDeliverySheetVo)
+    {
+        return toAjax(productDeliverySheetService.insertProductDeliverySheetVo(productDeliverySheetVo));
+    }
+
+    /**
+     * 新增产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:edit')")
+    @Log(title = "产品出库单", businessType = BusinessType.INSERT)
+    @PutMapping("/changeStatus")
+    @ApiOperation(value = "新增产品出库单")
+    public AjaxResult productDeliverySheetChangeStatus(@RequestBody ProductDeliverySheetVo productDeliverySheetVo)
+    {
+        return toAjax(productDeliverySheetService.productDeliverySheetChangeStatus(productDeliverySheetVo));
+    }
+
+
+    /**
+     * 新增产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:edit')")
+    @Log(title = "产品出库单", businessType = BusinessType.INSERT)
+    @PutMapping("/changeStatusSuccessOrfailure")
+    @ApiOperation(value = "新增产品出库单")
+    public AjaxResult changeStatusSuccessOrfailure(@RequestBody ProductDeliverySheetVo productDeliverySheetVo)
+    {
+        String s = productDeliverySheetService.changeStatusSuccessOrfailure(productDeliverySheetVo);
+        if(s.indexOf("不足") != -1){
+            return AjaxResult.warn(s);
+        }else{
+            return AjaxResult.success(s);
+        }
+    }
+
+    /**
+     * 修改产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:edit')")
+    @Log(title = "产品出库单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改产品出库单")
+    public AjaxResult edit(@RequestBody ProductDeliverySheet productDeliverySheet)
+    {
+        return toAjax(productDeliverySheetService.updateProductDeliverySheet(productDeliverySheet));
+    }
+
+    /**
+     * 修改产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:edit')")
+    @Log(title = "产品出库单", businessType = BusinessType.UPDATE)
+    @PutMapping("/update")
+    @ApiOperation(value = "修改产品出库单")
+    public AjaxResult update(@RequestBody ProductDeliverySheetVo productDeliverySheetVo)
+    {
+        return toAjax(productDeliverySheetService.updateProductDeliverySheetVo(productDeliverySheetVo));
+    }
+
+    /**
+     * 删除产品出库单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:sheet:remove')")
+    @Log(title = "产品出库单", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除产品出库单")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productDeliverySheetService.deleteProductDeliverySheetByIdsVo(ids));
+    }
+}

+ 113 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductDeliverySheetDetailsController.java

@@ -0,0 +1,113 @@
+package com.zkqy.amichi.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.amichi.domain.ProductDeliverySheetDetails;
+import com.zkqy.amichi.service.IProductDeliverySheetDetailsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 出库单详情Controller
+ *
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@RestController
+@RequestMapping("/amichi/productDeliverySheetDetails")
+@Api(value = "/amichi/details", description = "出库单详情-接口")
+public class ProductDeliverySheetDetailsController extends BaseController
+{
+    @Autowired
+    private IProductDeliverySheetDetailsService productDeliverySheetDetailsService;
+
+    /**
+     * 查询出库单详情列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:details:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询出库单详情列表")
+    public TableDataInfo list(ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        startPage();
+        List<ProductDeliverySheetDetails> list = productDeliverySheetDetailsService.selectProductDeliverySheetDetailsList(productDeliverySheetDetails);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出出库单详情列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:export')")
+    @Log(title = "出库单详情", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出出库单详情列表")
+    public void export(HttpServletResponse response, ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        List<ProductDeliverySheetDetails> list = productDeliverySheetDetailsService.selectProductDeliverySheetDetailsList(productDeliverySheetDetails);
+        ExcelUtil<ProductDeliverySheetDetails> util = new ExcelUtil<ProductDeliverySheetDetails>(ProductDeliverySheetDetails.class);
+        util.exportExcel(response, list, "出库单详情数据");
+    }
+
+    /**
+     * 获取出库单详情详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取出库单详情详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productDeliverySheetDetailsService.selectProductDeliverySheetDetailsById(id));
+    }
+
+    /**
+     * 新增出库单详情
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:add')")
+    @Log(title = "出库单详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增出库单详情")
+    public AjaxResult add(@RequestBody ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        return toAjax(productDeliverySheetDetailsService.insertProductDeliverySheetDetails(productDeliverySheetDetails));
+    }
+
+    /**
+     * 修改出库单详情
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:edit')")
+    @Log(title = "出库单详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改出库单详情")
+    public AjaxResult edit(@RequestBody ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        return toAjax(productDeliverySheetDetailsService.updateProductDeliverySheetDetails(productDeliverySheetDetails));
+    }
+
+    /**
+     * 删除出库单详情
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:remove')")
+    @Log(title = "出库单详情", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除出库单详情")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productDeliverySheetDetailsService.deleteProductDeliverySheetDetailsByIds(ids));
+    }
+}

+ 115 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionBomsController.java

@@ -0,0 +1,115 @@
+package com.zkqy.amichi.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.amichi.domain.ProductionBoms;
+import com.zkqy.amichi.service.IProductionBomsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 生产用料清单Controller
+ *
+ * @author zkqy
+ * @date 2024-07-18
+ */
+@RestController
+@RequestMapping("/amichi/productionBoms")
+@Api(value = "/amichi/boms", description = "生产用料清单-接口")
+public class ProductionBomsController extends BaseController
+{
+    @Autowired
+    private IProductionBomsService productionBomsService;
+
+    /**
+     * 查询生产用料清单列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:boms:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询生产用料清单列表")
+    public TableDataInfo list(ProductionBoms productionBoms)
+    {
+        startPage();
+        List<ProductionBoms> list = productionBomsService.selectProductionBomsList(productionBoms);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出生产用料清单列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:boms:export')")
+    @Log(title = "生产用料清单", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出生产用料清单列表")
+    public void export(HttpServletResponse response, ProductionBoms productionBoms)
+    {
+        List<ProductionBoms> list = productionBomsService.selectProductionBomsList(productionBoms);
+        ExcelUtil<ProductionBoms> util = new ExcelUtil<ProductionBoms>(ProductionBoms.class);
+        util.exportExcel(response, list, "生产用料清单数据");
+    }
+
+    /**
+     * 获取生产用料清单详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:boms:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取生产用料清单详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productionBomsService.selectProductionBomsById(id));
+    }
+
+    /**
+     * 新增生产用料清单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:boms:add')")
+    @Log(title = "生产用料清单", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增生产用料清单")
+    public AjaxResult add(@RequestBody ProductionBoms productionBoms)
+    {
+        return toAjax(productionBomsService.insertProductionBoms(productionBoms));
+    }
+
+
+
+    /**
+     * 修改生产用料清单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:boms:edit')")
+    @Log(title = "生产用料清单", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改生产用料清单")
+    public AjaxResult edit(@RequestBody ProductionBoms productionBoms)
+    {
+        return toAjax(productionBomsService.updateProductionBoms(productionBoms));
+    }
+
+    /**
+     * 删除生产用料清单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:boms:remove')")
+    @Log(title = "生产用料清单", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除生产用料清单")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productionBomsService.deleteProductionBomsByIds(ids));
+    }
+}

+ 124 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionBomsDetailsController.java

@@ -0,0 +1,124 @@
+package com.zkqy.amichi.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.amichi.domain.ProductionBomsDetails;
+import com.zkqy.amichi.service.IProductionBomsDetailsService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 生产用料清单详细Controller
+ *
+ * @author zkqy
+ * @date 2024-07-18
+ */
+@RestController
+@RequestMapping("/amichi/productionBomsDetails")
+@Api(value = "/amichi/details", description = "生产用料清单详细-接口")
+public class ProductionBomsDetailsController extends BaseController
+{
+    @Autowired
+    private IProductionBomsDetailsService productionBomsDetailsService;
+
+    /**
+     * 查询生产用料清单详细列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:details:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询生产用料清单详细列表")
+    public TableDataInfo list(ProductionBomsDetails productionBomsDetails)
+    {
+        startPage();
+        List<ProductionBomsDetails> list = productionBomsDetailsService.selectProductionBomsDetailsList(productionBomsDetails);
+        return getDataTable(list);
+    }
+
+    @GetMapping("/listDetailsByProductionBomId")
+    @ApiOperation(value = "查询生产用料清单详细列表")
+    public AjaxResult listDetailsByProductionBomId(ProductionBomsDetails productionBomsDetails)
+    {
+        startPage();
+        List<ProductionBomsDetails> list = productionBomsDetailsService.selectProductionBomsDetailsList(productionBomsDetails);
+        return AjaxResult.success(list);
+    }
+
+
+
+    /**
+     * 导出生产用料清单详细列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:export')")
+    @Log(title = "生产用料清单详细", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出生产用料清单详细列表")
+    public void export(HttpServletResponse response, ProductionBomsDetails productionBomsDetails)
+    {
+        List<ProductionBomsDetails> list = productionBomsDetailsService.selectProductionBomsDetailsList(productionBomsDetails);
+        ExcelUtil<ProductionBomsDetails> util = new ExcelUtil<ProductionBomsDetails>(ProductionBomsDetails.class);
+        util.exportExcel(response, list, "生产用料清单详细数据");
+    }
+
+    /**
+     * 获取生产用料清单详细详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取生产用料清单详细详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(productionBomsDetailsService.selectProductionBomsDetailsById(id));
+    }
+
+    /**
+     * 新增生产用料清单详细
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:add')")
+    @Log(title = "生产用料清单详细", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增生产用料清单详细")
+    public AjaxResult add(@RequestBody ProductionBomsDetails productionBomsDetails)
+    {
+        return toAjax(productionBomsDetailsService.insertProductionBomsDetails(productionBomsDetails));
+    }
+
+    /**
+     * 修改生产用料清单详细
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:edit')")
+    @Log(title = "生产用料清单详细", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改生产用料清单详细")
+    public AjaxResult edit(@RequestBody ProductionBomsDetails productionBomsDetails)
+    {
+        return toAjax(productionBomsDetailsService.updateProductionBomsDetails(productionBomsDetails));
+    }
+
+    /**
+     * 删除生产用料清单详细
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:details:remove')")
+    @Log(title = "生产用料清单详细", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除生产用料清单详细")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productionBomsDetailsService.deleteProductionBomsDetailsByIds(ids));
+    }
+}

+ 129 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionPlanningManagementController.java

@@ -0,0 +1,129 @@
+package com.zkqy.amichi.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.zkqy.amichi.domain.Exportproductionscheduling;
+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.amichi.domain.ProductionPlanningManagement;
+import com.zkqy.amichi.service.IProductionPlanningManagementService;
+import com.zkqy.common.utils.poi.ExcelUtil;
+import com.zkqy.common.core.page.TableDataInfo;
+
+/**
+ * 生产计划Controller
+ *
+ * @author zkqy
+ * @date 2024-07-09
+ */
+@RestController
+@RequestMapping("/amichi/management")
+@Api(value = "/amichi/management", description = "生产计划-接口")
+public class ProductionPlanningManagementController extends BaseController
+{
+    @Autowired
+    private IProductionPlanningManagementService productionPlanningManagementService;
+
+    /**
+     * 查询生产计划列表
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:management:list')")
+    @GetMapping("/list")
+    @ApiOperation(value = "查询生产计划列表")
+    public TableDataInfo list(ProductionPlanningManagement productionPlanningManagement)
+    {
+        startPage();
+        List<ProductionPlanningManagement> list = productionPlanningManagementService.selectProductionPlanningManagementList(productionPlanningManagement);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出生产计划列表
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:management:export')")
+    @Log(title = "生产计划", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    @ApiOperation(value = "导出生产计划列表")
+    public void export(HttpServletResponse response, ProductionPlanningManagement productionPlanningManagement)
+    {
+        List<ProductionPlanningManagement> list = productionPlanningManagementService.selectProductionPlanningManagementList(productionPlanningManagement);
+        ExcelUtil<ProductionPlanningManagement> util = new ExcelUtil<ProductionPlanningManagement>(ProductionPlanningManagement.class);
+        util.exportExcel(response, list, "生产计划数据");
+    }
+
+    /**
+     * 获取生产计划详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:management:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation(value = "获取生产计划详细信息")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return productionPlanningManagementService.selectProductionPlanningManagementById(id);
+    }
+
+    /**
+     * 新增生产计划
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:management:add')")
+    @Log(title = "生产计划", businessType = BusinessType.INSERT)
+    @PostMapping
+    @ApiOperation(value = "新增生产计划")
+    public AjaxResult add(@RequestBody ProductionPlanningManagement productionPlanningManagement)
+    {
+        return toAjax(productionPlanningManagementService.insertProductionPlanningManagement(productionPlanningManagement));
+    }
+
+    /**
+     * 修改生产计划
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:management:edit')")
+    @Log(title = "生产计划", businessType = BusinessType.UPDATE)
+    @PutMapping
+    @ApiOperation(value = "修改生产计划")
+    public AjaxResult edit(@RequestBody ProductionPlanningManagement productionPlanningManagement)
+    {
+        return toAjax(productionPlanningManagementService.updateProductionPlanningManagement(productionPlanningManagement));
+    }
+
+    /**
+     * 删除生产计划
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:management:remove')")
+    @Log(title = "生产计划", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    @ApiOperation(value = "删除生产计划")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(productionPlanningManagementService.deleteProductionPlanningManagementByIds(ids));
+    }
+
+
+    /**
+     * 查询计划的信息
+     */
+    //@PreAuthorize("@ss.hasPermi('amichi:exportproductionscheduling:add')")
+    @Log(title = "自动排产", businessType = BusinessType.INSERT)
+    @PostMapping("/viewPlanList")
+    @ApiOperation(value = "自动排产")
+    public TableDataInfo viewPlanList(@RequestBody ProductionPlanningManagement productionPlanningManagement)
+    {
+        startPage();
+        return  getDataTable(productionPlanningManagementService.selectProductionPlanningManagementListVo(productionPlanningManagement));
+    }
+}

+ 13 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/ProductionTasksController.java

@@ -112,6 +112,19 @@ public class ProductionTasksController extends BaseController
         return toAjax(productionTasksService.updateProductionTasksVo(productionTasks));
     }
 
+    /**
+     * 修改生产任务单
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:tasks:edit')")
+    @Log(title = "生产任务单", businessType = BusinessType.UPDATE)
+    @PutMapping("/changeStauts")
+    @ApiOperation(value = "修改生产任务单")
+    public AjaxResult changeStauts(@RequestBody ProductionTasksVo productionTasks)
+    {
+        return toAjax(productionTasksService.changeStauts(productionTasks));
+    }
+
+
     /**
      * 删除生产任务单
      */

+ 17 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/PurchaseOrderController.java

@@ -3,6 +3,8 @@ package com.zkqy.amichi.controller;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
+import com.zkqy.amichi.domain.PlannedPurchaseLog;
+import com.zkqy.amichi.domain.vo.PlanPurchaseOrder;
 import com.zkqy.amichi.domain.vo.PurchaseOrderVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -39,6 +41,19 @@ public class PurchaseOrderController extends BaseController
     @Autowired
     private IPurchaseOrderService purchaseOrderService;
 
+
+    /**
+     * 计划操作新增物料采购信息
+     *
+     */
+    @PreAuthorize("@ss.hasPermi('amichi:purchaseOrder:add')")
+    @Log(title = "采购", businessType = BusinessType.INSERT)
+    @PostMapping("/addPlanMaterialsPurchase")
+    @ApiOperation(value = "新增采购")
+    public AjaxResult addPlanMaterialsPurchase(@RequestBody List<PlanPurchaseOrder> planPurchaseOrder)
+    {
+        return toAjax(purchaseOrderService.addPlanMaterialsPurchase(planPurchaseOrder));
+    }
     /**
      * 查询采购列表
      */
@@ -133,9 +148,9 @@ public class PurchaseOrderController extends BaseController
     @Log(title = "采购", businessType = BusinessType.UPDATE)
     @PostMapping("/updatePurchaseOrderState")
     @ApiOperation(value = "修改采购")
-    public AjaxResult updatePurchaseOrderState(@RequestBody PurchaseOrder purchaseOrder)
+    public AjaxResult updatePurchaseOrderState(@RequestBody PurchaseOrderVo purchaseOrderVo)
     {
-        return toAjax(purchaseOrderService.updatePurchaseOrderState(purchaseOrder));
+        return toAjax(purchaseOrderService.updatePurchaseOrderState(purchaseOrderVo));
     }
     /**
      * 修改采购

+ 3 - 1
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/controller/WarehouseEntryInformationController.java

@@ -124,7 +124,9 @@ public class WarehouseEntryInformationController extends BaseController
     @ApiOperation(value = "修改入库单信息")
     public AjaxResult editStatus(@RequestBody WarehouseEntryInformation warehouseEntryInformation)
     {
-        warehouseEntryInformation.setExamine(SecurityUtils.getUsername());//审核人
+        if(!warehouseEntryInformation.getDataApprovalStatus().equals("0")){
+            warehouseEntryInformation.setExamine(SecurityUtils.getUsername());//审核人
+        }
         return toAjax(warehouseEntryInformationService.updateWarehouseEntryInformation(warehouseEntryInformation));
     }
 

+ 237 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/CustomerInformation.java

@@ -0,0 +1,237 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 客户信息对象 customer_information
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+public class CustomerInformation extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 客户名称 */
+    @Excel(name = "客户名称")
+    private String customerName;
+
+    /** 客户电话 */
+    @Excel(name = "客户电话")
+    private String customerPhone;
+
+    /** 客户传真 */
+    @Excel(name = "客户传真")
+    private String customerFax;
+
+    /** 客户地址 */
+    @Excel(name = "客户地址")
+    private String customerAddress;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private String contactPerson;
+
+    /** 收货地址 */
+    @Excel(name = "收货地址")
+    private String deliveryAddress;
+
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    private String contactNumber;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setCustomerPhone(String customerPhone) 
+    {
+        this.customerPhone = customerPhone;
+    }
+
+    public String getCustomerPhone() 
+    {
+        return customerPhone;
+    }
+    public void setCustomerFax(String customerFax) 
+    {
+        this.customerFax = customerFax;
+    }
+
+    public String getCustomerFax() 
+    {
+        return customerFax;
+    }
+    public void setCustomerAddress(String customerAddress) 
+    {
+        this.customerAddress = customerAddress;
+    }
+
+    public String getCustomerAddress() 
+    {
+        return customerAddress;
+    }
+    public void setContactPerson(String contactPerson) 
+    {
+        this.contactPerson = contactPerson;
+    }
+
+    public String getContactPerson() 
+    {
+        return contactPerson;
+    }
+    public void setDeliveryAddress(String deliveryAddress) 
+    {
+        this.deliveryAddress = deliveryAddress;
+    }
+
+    public String getDeliveryAddress() 
+    {
+        return deliveryAddress;
+    }
+    public void setContactNumber(String contactNumber) 
+    {
+        this.contactNumber = contactNumber;
+    }
+
+    public String getContactNumber() 
+    {
+        return contactNumber;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("customerName", getCustomerName())
+            .append("customerPhone", getCustomerPhone())
+            .append("customerFax", getCustomerFax())
+            .append("customerAddress", getCustomerAddress())
+            .append("contactPerson", getContactPerson())
+            .append("deliveryAddress", getDeliveryAddress())
+            .append("contactNumber", getContactNumber())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 478 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/Exportproductionscheduling.java

@@ -0,0 +1,478 @@
+package com.zkqy.amichi.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+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;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 外销排产对象 exportproductionscheduling
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+public class Exportproductionscheduling extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderNo;
+
+    /** 数量台 */
+    @Excel(name = "数量台")
+    private String quantity;
+
+    /** 下单日期 */
+    @Excel(name = "下单日期")
+    private String placeanorder;
+
+    /** 发货日期 */
+    @Excel(name = "发货日期")
+    private String delivergoods;
+
+    /** 到期提醒 */
+    @Excel(name = "到期提醒")
+    private String remind;
+
+    /** 计划生产日期 */
+    @Excel(name = "计划生产日期")
+    private String plannedProductionDate;
+
+    /** 焊接工段 */
+    @Excel(name = "焊接工段")
+    private String welding;
+
+    /** 绕嵌工段 */
+    @Excel(name = "绕嵌工段")
+    private String rqgd;
+
+    /** 线头绑扎 */
+    @Excel(name = "线头绑扎")
+    private String threadhead;
+
+    /** 浸漆 */
+    @Excel(name = "浸漆")
+    private String paint;
+
+    /** 压装平衡 */
+    @Excel(name = "压装平衡")
+    private String balance;
+
+    /** 总装 */
+    @Excel(name = "总装")
+    private String finalassembly;
+
+    /** 试机开关箱 */
+    @Excel(name = "试机开关箱")
+    private String switchas;
+
+    /** 包装 */
+    @Excel(name = "包装")
+    private String packing;
+
+    /** 特殊要求 */
+    @Excel(name = "特殊要求")
+    private String demand;
+
+    /** 备用1 */
+    @Excel(name = "备用1")
+    private String sparea;
+
+    /** 备用2 */
+    @Excel(name = "备用2")
+    private String spareb;
+
+    /** 备用3 */
+    @Excel(name = "备用3")
+    private String sparec;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String state;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    @Excel(name = "排产类型")
+    private String type;
+
+    @Excel(name="物料是否齐全 0:齐全 1:不齐全")
+    private  String materialNo;
+
+    @Excel(name="排产工时信息")
+    private  String planTotalWorkingHours;
+
+    public String getPlanTotalWorkingHours() {
+        return planTotalWorkingHours;
+    }
+
+    public void setPlanTotalWorkingHours(String planTotalWorkingHours) {
+        this.planTotalWorkingHours = planTotalWorkingHours;
+    }
+
+    @Excel(name = "计划开始时间")
+    private List<String>  createTimeHe =new ArrayList<>();
+
+
+    @Excel(name = "计划开始时间")
+    private String  startTime;
+
+    private String  endTime;
+
+
+    public String getMaterialNo() {
+        return materialNo;
+    }
+
+    public void setMaterialNo(String materialNo) {
+        this.materialNo = materialNo;
+    }
+
+    public String getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(String startTime) {
+        this.startTime = startTime;
+    }
+
+    public String getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(String endTime) {
+        this.endTime = endTime;
+    }
+
+    public List<String> getCreateTimeHe() {
+        return createTimeHe;
+    }
+
+    public void setCreateTimeHe(List<String> createTimeHe) {
+        this.createTimeHe = createTimeHe;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setOrderNo(String orderNo) 
+    {
+        this.orderNo = orderNo;
+    }
+
+    public String getOrderNo() 
+    {
+        return orderNo;
+    }
+    public void setQuantity(String quantity) 
+    {
+        this.quantity = quantity;
+    }
+
+    public String getQuantity() 
+    {
+        return quantity;
+    }
+    public void setPlaceanorder(String placeanorder) 
+    {
+        this.placeanorder = placeanorder;
+    }
+
+    public String getPlaceanorder() 
+    {
+        return placeanorder;
+    }
+    public void setDelivergoods(String delivergoods) 
+    {
+        this.delivergoods = delivergoods;
+    }
+
+    public String getDelivergoods() 
+    {
+        return delivergoods;
+    }
+    public void setRemind(String remind) 
+    {
+        this.remind = remind;
+    }
+
+    public String getRemind() 
+    {
+        return remind;
+    }
+    public void setPlannedProductionDate(String plannedProductionDate) 
+    {
+        this.plannedProductionDate = plannedProductionDate;
+    }
+
+    public String getPlannedProductionDate() 
+    {
+        return plannedProductionDate;
+    }
+    public void setWelding(String welding) 
+    {
+        this.welding = welding;
+    }
+
+    public String getWelding() 
+    {
+        return welding;
+    }
+    public void setRqgd(String rqgd) 
+    {
+        this.rqgd = rqgd;
+    }
+
+    public String getRqgd() 
+    {
+        return rqgd;
+    }
+    public void setThreadhead(String threadhead) 
+    {
+        this.threadhead = threadhead;
+    }
+
+    public String getThreadhead() 
+    {
+        return threadhead;
+    }
+    public void setPaint(String paint) 
+    {
+        this.paint = paint;
+    }
+
+    public String getPaint() 
+    {
+        return paint;
+    }
+    public void setBalance(String balance) 
+    {
+        this.balance = balance;
+    }
+
+    public String getBalance() 
+    {
+        return balance;
+    }
+    public void setFinalassembly(String finalassembly) 
+    {
+        this.finalassembly = finalassembly;
+    }
+
+    public String getFinalassembly() 
+    {
+        return finalassembly;
+    }
+    public void setSwitchas(String switchas) 
+    {
+        this.switchas = switchas;
+    }
+
+    public String getSwitchas() 
+    {
+        return switchas;
+    }
+    public void setPacking(String packing) 
+    {
+        this.packing = packing;
+    }
+
+    public String getPacking() 
+    {
+        return packing;
+    }
+    public void setDemand(String demand) 
+    {
+        this.demand = demand;
+    }
+
+    public String getDemand() 
+    {
+        return demand;
+    }
+    public void setSparea(String sparea) 
+    {
+        this.sparea = sparea;
+    }
+
+    public String getSparea() 
+    {
+        return sparea;
+    }
+    public void setSpareb(String spareb) 
+    {
+        this.spareb = spareb;
+    }
+
+    public String getSpareb() 
+    {
+        return spareb;
+    }
+    public void setSparec(String sparec) 
+    {
+        this.sparec = sparec;
+    }
+
+    public String getSparec() 
+    {
+        return sparec;
+    }
+    public void setState(String state) 
+    {
+        this.state = state;
+    }
+
+    public String getState() 
+    {
+        return state;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("orderNo", getOrderNo())
+            .append("quantity", getQuantity())
+            .append("placeanorder", getPlaceanorder())
+            .append("delivergoods", getDelivergoods())
+            .append("remind", getRemind())
+            .append("plannedProductionDate", getPlannedProductionDate())
+            .append("welding", getWelding())
+            .append("rqgd", getRqgd())
+            .append("threadhead", getThreadhead())
+            .append("paint", getPaint())
+            .append("balance", getBalance())
+            .append("finalassembly", getFinalassembly())
+            .append("switchas", getSwitchas())
+            .append("packing", getPacking())
+            .append("demand", getDemand())
+            .append("sparea", getSparea())
+            .append("spareb", getSpareb())
+            .append("sparec", getSparec())
+            .append("state", getState())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 5 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/FinishedGoodsInventoryLog.java

@@ -89,6 +89,11 @@ public class FinishedGoodsInventoryLog extends BaseEntity
     @Excel(name = "任务节点编码")
     private String typeOfOperation;
 
+
+
+
+
+
     public String getTypeOfOperation() {
         return typeOfOperation;
     }

+ 223 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/Manhour.java

@@ -0,0 +1,223 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 产品工时对象 manhour
+ * 
+ * @author zkqy
+ * @date 2024-07-25
+ */
+public class Manhour extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 产品id */
+    @Excel(name = "产品id")
+    private String productId;
+
+    /** 产品名称 */
+    @Excel(name = "产品名称")
+    private String productName;
+
+    /** 所耗时间 */
+    @Excel(name = "所耗时间")
+    private String manhourspent;
+
+    /** 产品型号 */
+    @Excel(name = "产品型号")
+    private String productModel;
+
+    /** 产品规格 */
+    @Excel(name = "产品规格")
+    private String productSpecification;
+
+    /** 产品编码 */
+    @Excel(name = "产品编码")
+    private String productCode;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setProductId(String productId) 
+    {
+        this.productId = productId;
+    }
+
+    public String getProductId() 
+    {
+        return productId;
+    }
+    public void setProductName(String productName) 
+    {
+        this.productName = productName;
+    }
+
+    public String getProductName() 
+    {
+        return productName;
+    }
+    public void setManhourspent(String manhourspent) 
+    {
+        this.manhourspent = manhourspent;
+    }
+
+    public String getManhourspent() 
+    {
+        return manhourspent;
+    }
+    public void setProductModel(String productModel) 
+    {
+        this.productModel = productModel;
+    }
+
+    public String getProductModel() 
+    {
+        return productModel;
+    }
+    public void setProductSpecification(String productSpecification) 
+    {
+        this.productSpecification = productSpecification;
+    }
+
+    public String getProductSpecification() 
+    {
+        return productSpecification;
+    }
+    public void setProductCode(String productCode) 
+    {
+        this.productCode = productCode;
+    }
+
+    public String getProductCode() 
+    {
+        return productCode;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("productId", getProductId())
+            .append("productName", getProductName())
+            .append("manhourspent", getManhourspent())
+            .append("productModel", getProductModel())
+            .append("productSpecification", getProductSpecification())
+            .append("productCode", getProductCode())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 118 - 62
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/MaterialInfo.java

@@ -6,10 +6,10 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.zkqy.common.annotation.Excel;
 
 /**
- * 物料信息对象 materialInfo
- * 
+ * 物料信息对象 materialinfo
+ *
  * @author zkqy
- * @date 2024-06-30
+ * @date 2024-07-18
  */
 public class MaterialInfo extends BaseEntity
 {
@@ -35,7 +35,7 @@ public class MaterialInfo extends BaseEntity
     private String specification;
 
     /** 单位 */
-    @Excel(name = "单位")
+    @Excel(name = "库存主单位")
     private String unit;
 
     /** 属性 0自制 1外购 */
@@ -47,7 +47,7 @@ public class MaterialInfo extends BaseEntity
     private String issueMethod;
 
     /** 库存量 */
-    @Excel(name = "库存量")
+    @Excel(name = "库存量(主单位)")
     private Double stockQuantity;
 
     /** 创建者id */
@@ -77,175 +77,231 @@ public class MaterialInfo extends BaseEntity
     @Excel(name = "任务节点编码")
     private String taskNodeKey;
 
-    public void setId(Long id) 
+    /** 仓库id */
+    @Excel(name = "仓库名称")
+    private String ckId;
+
+    /** 图号 */
+    @Excel(name = "图号")
+    private String mapNumber;
+
+    /** 描述 */
+    @Excel(name = "描述")
+    private String description;
+
+    /** 批号 */
+    @Excel(name = "批号")
+    private String lotNumber;
+
+    public void setId(Long id)
     {
         this.id = id;
     }
 
-    public Long getId() 
+    public Long getId()
     {
         return id;
     }
-    public void setMaterialCode(String materialCode) 
+    public void setMaterialCode(String materialCode)
     {
         this.materialCode = materialCode;
     }
 
-    public String getMaterialCode() 
+    public String getMaterialCode()
     {
         return materialCode;
     }
-    public void setMaterialName(String materialName) 
+    public void setMaterialName(String materialName)
     {
         this.materialName = materialName;
     }
 
-    public String getMaterialName() 
+    public String getMaterialName()
     {
         return materialName;
     }
-    public void setModel(String model) 
+    public void setModel(String model)
     {
         this.model = model;
     }
 
-    public String getModel() 
+    public String getModel()
     {
         return model;
     }
-    public void setSpecification(String specification) 
+    public void setSpecification(String specification)
     {
         this.specification = specification;
     }
 
-    public String getSpecification() 
+    public String getSpecification()
     {
         return specification;
     }
-    public void setUnit(String unit) 
+    public void setUnit(String unit)
     {
         this.unit = unit;
     }
 
-    public String getUnit() 
+    public String getUnit()
     {
         return unit;
     }
-    public void setAttribute(String attribute) 
+    public void setAttribute(String attribute)
     {
         this.attribute = attribute;
     }
 
-    public String getAttribute() 
+    public String getAttribute()
     {
         return attribute;
     }
-    public void setIssueMethod(String issueMethod) 
+    public void setIssueMethod(String issueMethod)
     {
         this.issueMethod = issueMethod;
     }
 
-    public String getIssueMethod() 
+    public String getIssueMethod()
     {
         return issueMethod;
     }
-
-    public Double getStockQuantity() {
-        return stockQuantity;
-    }
-
-    public void setStockQuantity(Double stockQuantity) {
+    public void setStockQuantity(Double stockQuantity)
+    {
         this.stockQuantity = stockQuantity;
     }
 
+    public Double getStockQuantity()
+    {
+        return stockQuantity;
+    }
     public void setCreateById(Long createById)
     {
         this.createById = createById;
     }
 
-    public Long getCreateById() 
+    public Long getCreateById()
     {
         return createById;
     }
-    public void setUpdateById(Long updateById) 
+    public void setUpdateById(Long updateById)
     {
         this.updateById = updateById;
     }
 
-    public Long getUpdateById() 
+    public Long getUpdateById()
     {
         return updateById;
     }
-    public void setDelFlag(String delFlag) 
+    public void setDelFlag(String delFlag)
     {
         this.delFlag = delFlag;
     }
 
-    public String getDelFlag() 
+    public String getDelFlag()
     {
         return delFlag;
     }
-    public void setDataApprovalStatus(String dataApprovalStatus) 
+    public void setDataApprovalStatus(String dataApprovalStatus)
     {
         this.dataApprovalStatus = dataApprovalStatus;
     }
 
-    public String getDataApprovalStatus() 
+    public String getDataApprovalStatus()
     {
         return dataApprovalStatus;
     }
-    public void setProcessKey(String processKey) 
+    public void setProcessKey(String processKey)
     {
         this.processKey = processKey;
     }
 
-    public String getProcessKey() 
+    public String getProcessKey()
     {
         return processKey;
     }
-    public void setTaskProcessKey(String taskProcessKey) 
+    public void setTaskProcessKey(String taskProcessKey)
     {
         this.taskProcessKey = taskProcessKey;
     }
 
-    public String getTaskProcessKey() 
+    public String getTaskProcessKey()
     {
         return taskProcessKey;
     }
-    public void setTaskNodeKey(String taskNodeKey) 
+    public void setTaskNodeKey(String taskNodeKey)
     {
         this.taskNodeKey = taskNodeKey;
     }
 
-    public String getTaskNodeKey() 
+    public String getTaskNodeKey()
     {
         return taskNodeKey;
     }
+    public void setCkId(String ckId)
+    {
+        this.ckId = ckId;
+    }
+
+    public String getCkId()
+    {
+        return ckId;
+    }
+    public void setMapNumber(String mapNumber)
+    {
+        this.mapNumber = mapNumber;
+    }
+
+    public String getMapNumber()
+    {
+        return mapNumber;
+    }
+    public void setDescription(String description)
+    {
+        this.description = description;
+    }
+
+    public String getDescription()
+    {
+        return description;
+    }
+    public void setLotNumber(String lotNumber)
+    {
+        this.lotNumber = lotNumber;
+    }
+
+    public String getLotNumber()
+    {
+        return lotNumber;
+    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("materialCode", getMaterialCode())
-            .append("materialName", getMaterialName())
-            .append("model", getModel())
-            .append("specification", getSpecification())
-            .append("unit", getUnit())
-            .append("attribute", getAttribute())
-            .append("issueMethod", getIssueMethod())
-            .append("stockQuantity", getStockQuantity())
-            .append("remark", getRemark())
-            .append("createById", getCreateById())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateById", getUpdateById())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("delFlag", getDelFlag())
-            .append("dataApprovalStatus", getDataApprovalStatus())
-            .append("processKey", getProcessKey())
-            .append("taskProcessKey", getTaskProcessKey())
-            .append("taskNodeKey", getTaskNodeKey())
-            .toString();
+                .append("id", getId())
+                .append("materialCode", getMaterialCode())
+                .append("materialName", getMaterialName())
+                .append("model", getModel())
+                .append("specification", getSpecification())
+                .append("unit", getUnit())
+                .append("attribute", getAttribute())
+                .append("issueMethod", getIssueMethod())
+                .append("stockQuantity", getStockQuantity())
+                .append("remark", getRemark())
+                .append("createById", getCreateById())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateById", getUpdateById())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("delFlag", getDelFlag())
+                .append("dataApprovalStatus", getDataApprovalStatus())
+                .append("processKey", getProcessKey())
+                .append("taskProcessKey", getTaskProcessKey())
+                .append("taskNodeKey", getTaskNodeKey())
+                .append("ckId", getCkId())
+                .append("mapNumber", getMapNumber())
+                .append("description", getDescription())
+                .append("lotNumber", getLotNumber())
+                .toString();
     }
 }

+ 13 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/OperationInstruction.java

@@ -1,4 +1,4 @@
-package com.zkqy.system.domain;
+package com.zkqy.amichi.domain;
 
 import com.zkqy.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -61,7 +61,18 @@ public class OperationInstruction extends BaseEntity
     @Excel(name = "任务节点编码")
     private String taskNodeKey;
 
-    public void setId(Long id) 
+    @Excel(name = "图片路径")
+    private String imageSrc;
+
+    public String getImageSrc() {
+        return imageSrc;
+    }
+
+    public void setImageSrc(String imageSrc) {
+        this.imageSrc = imageSrc;
+    }
+
+    public void setId(Long id)
     {
         this.id = id;
     }

+ 321 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlanTaskDetails.java

@@ -0,0 +1,321 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 生产任务单明细对象 plan_task_details
+ * 
+ * @author zkqy
+ * @date 2024-07-23
+ */
+public class PlanTaskDetails extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 任务单id关联字段 */
+    @Excel(name = "任务单id关联字段")
+    private String taskId;
+
+    /** 规格型号 */
+    @Excel(name = "规格型号")
+    private String model;
+
+    /** 铭牌及包装 */
+    @Excel(name = "铭牌及包装")
+    private String nameplate;
+
+    /** 容量 */
+    @Excel(name = "容量")
+    private String capacity;
+
+    /** 接口/盘片 */
+    @Excel(name = "接口/盘片")
+    private String interfaceDisk;
+
+    /** 铁心长度(定子/励磁) */
+    @Excel(name = "铁心长度", readConverterExp = "定=子/励磁")
+    private String length;
+
+    /** 电压/频率 */
+    @Excel(name = "电压/频率")
+    private String voltage;
+
+    /** 电磁方案 */
+    @Excel(name = "电磁方案")
+    private String programme;
+
+    /** 数量 */
+    @Excel(name = "数量")
+    private String quantity;
+
+    /** 备用字段1 */
+    @Excel(name = "备用字段1")
+    private String sparea;
+
+    /** 备用字段2 */
+    @Excel(name = "备用字段2")
+    private String spareb;
+
+    /** 备用字段3 */
+    @Excel(name = "备用字段3")
+    private String sparec;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    /** 计划id */
+    @Excel(name = "计划id")
+    private Long planId;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setTaskId(String taskId) 
+    {
+        this.taskId = taskId;
+    }
+
+    public String getTaskId() 
+    {
+        return taskId;
+    }
+    public void setModel(String model) 
+    {
+        this.model = model;
+    }
+
+    public String getModel() 
+    {
+        return model;
+    }
+    public void setNameplate(String nameplate) 
+    {
+        this.nameplate = nameplate;
+    }
+
+    public String getNameplate() 
+    {
+        return nameplate;
+    }
+    public void setCapacity(String capacity) 
+    {
+        this.capacity = capacity;
+    }
+
+    public String getCapacity() 
+    {
+        return capacity;
+    }
+    public void setInterfaceDisk(String interfaceDisk) 
+    {
+        this.interfaceDisk = interfaceDisk;
+    }
+
+    public String getInterfaceDisk() 
+    {
+        return interfaceDisk;
+    }
+    public void setLength(String length) 
+    {
+        this.length = length;
+    }
+
+    public String getLength() 
+    {
+        return length;
+    }
+    public void setVoltage(String voltage) 
+    {
+        this.voltage = voltage;
+    }
+
+    public String getVoltage() 
+    {
+        return voltage;
+    }
+    public void setProgramme(String programme) 
+    {
+        this.programme = programme;
+    }
+
+    public String getProgramme() 
+    {
+        return programme;
+    }
+    public void setQuantity(String quantity) 
+    {
+        this.quantity = quantity;
+    }
+
+    public String getQuantity() 
+    {
+        return quantity;
+    }
+    public void setSparea(String sparea) 
+    {
+        this.sparea = sparea;
+    }
+
+    public String getSparea() 
+    {
+        return sparea;
+    }
+    public void setSpareb(String spareb) 
+    {
+        this.spareb = spareb;
+    }
+
+    public String getSpareb() 
+    {
+        return spareb;
+    }
+    public void setSparec(String sparec) 
+    {
+        this.sparec = sparec;
+    }
+
+    public String getSparec() 
+    {
+        return sparec;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+    public void setPlanId(Long planId) 
+    {
+        this.planId = planId;
+    }
+
+    public Long getPlanId() 
+    {
+        return planId;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("taskId", getTaskId())
+            .append("model", getModel())
+            .append("nameplate", getNameplate())
+            .append("capacity", getCapacity())
+            .append("interfaceDisk", getInterfaceDisk())
+            .append("length", getLength())
+            .append("voltage", getVoltage())
+            .append("programme", getProgramme())
+            .append("quantity", getQuantity())
+            .append("sparea", getSparea())
+            .append("spareb", getSpareb())
+            .append("sparec", getSparec())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .append("planId", getPlanId())
+            .toString();
+    }
+}

+ 53 - 78
zkqy-laboratory-information/src/main/java/com/zkqy/laboratory/domain/SampleTestingProcessInformation.java → zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/PlannedPurchaseLog.java

@@ -1,4 +1,4 @@
-package com.zkqy.laboratory.domain;
+package com.zkqy.amichi.domain;
 
 import com.zkqy.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
@@ -6,41 +6,41 @@ import org.apache.commons.lang3.builder.ToStringStyle;
 import com.zkqy.common.annotation.Excel;
 
 /**
- * 样品检测过程对象 sample_testing_process_information
+ * 计划采购物料日志对象 planned_purchase_log
  * 
  * @author zkqy
- * @date 2024-06-19
+ * @date 2024-07-22
  */
-public class SampleTestingProcessInformation extends BaseEntity
+public class PlannedPurchaseLog extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
     /** 主键 */
     private Long id;
 
-    /** 环境温度 */
-    @Excel(name = "环境温度")
-    private String ambientTemperature;
+    /** 计划号 */
+    @Excel(name = "计划号")
+    private String planNumber;
 
-    /** 环境湿度 */
-    @Excel(name = "环境湿度")
-    private String ambientHumidity;
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderNumber;
 
-    /** 检测设备编号 */
-    @Excel(name = "检测设备编号")
-    private String testEquipmentNumber;
+    /** 物料编码 */
+    @Excel(name = "物料编码")
+    private String materialCode;
 
-    /** 检测设备 */
-    @Excel(name = "检测设备")
-    private String testingEquipment;
+    /** 物料名称 */
+    @Excel(name = "物料名称")
+    private String materialName;
 
-    /** 检测人员 */
-    @Excel(name = "检测人员")
-    private String testingPersonnel;
+    /** 需求量 */
+    @Excel(name = "需求量")
+    private String quantityDemanded;
 
-    /** 检测时间 */
-    @Excel(name = "检测时间")
-    private String detectionTime;
+    /** 采购量 */
+    @Excel(name = "采购量")
+    private String quantityPurchased;
 
     /** 创建者id */
     @Excel(name = "创建者id")
@@ -69,22 +69,7 @@ public class SampleTestingProcessInformation extends BaseEntity
     @Excel(name = "任务节点编码")
     private String taskNodeKey;
 
-    /** 委托单id */
-    @Excel(name = "委托单id")
-    private String wtId;
-
-    @Excel(name="委托单编号")
-    private  String orderNumber;
-
-    public String getOrderNumber() {
-        return orderNumber;
-    }
-
-    public void setOrderNumber(String orderNumber) {
-        this.orderNumber = orderNumber;
-    }
-
-    public void setId(Long id)
+    public void setId(Long id) 
     {
         this.id = id;
     }
@@ -93,59 +78,59 @@ public class SampleTestingProcessInformation extends BaseEntity
     {
         return id;
     }
-    public void setAmbientTemperature(String ambientTemperature) 
+    public void setPlanNumber(String planNumber) 
     {
-        this.ambientTemperature = ambientTemperature;
+        this.planNumber = planNumber;
     }
 
-    public String getAmbientTemperature() 
+    public String getPlanNumber() 
     {
-        return ambientTemperature;
+        return planNumber;
     }
-    public void setAmbientHumidity(String ambientHumidity) 
+    public void setOrderNumber(String orderNumber) 
     {
-        this.ambientHumidity = ambientHumidity;
+        this.orderNumber = orderNumber;
     }
 
-    public String getAmbientHumidity() 
+    public String getOrderNumber() 
     {
-        return ambientHumidity;
+        return orderNumber;
     }
-    public void setTestEquipmentNumber(String testEquipmentNumber) 
+    public void setMaterialCode(String materialCode) 
     {
-        this.testEquipmentNumber = testEquipmentNumber;
+        this.materialCode = materialCode;
     }
 
-    public String getTestEquipmentNumber() 
+    public String getMaterialCode() 
     {
-        return testEquipmentNumber;
+        return materialCode;
     }
-    public void setTestingEquipment(String testingEquipment) 
+    public void setMaterialName(String materialName) 
     {
-        this.testingEquipment = testingEquipment;
+        this.materialName = materialName;
     }
 
-    public String getTestingEquipment() 
+    public String getMaterialName() 
     {
-        return testingEquipment;
+        return materialName;
     }
-    public void setTestingPersonnel(String testingPersonnel) 
+    public void setQuantityDemanded(String quantityDemanded) 
     {
-        this.testingPersonnel = testingPersonnel;
+        this.quantityDemanded = quantityDemanded;
     }
 
-    public String getTestingPersonnel() 
+    public String getQuantityDemanded() 
     {
-        return testingPersonnel;
+        return quantityDemanded;
     }
-    public void setDetectionTime(String detectionTime) 
+    public void setQuantityPurchased(String quantityPurchased) 
     {
-        this.detectionTime = detectionTime;
+        this.quantityPurchased = quantityPurchased;
     }
 
-    public String getDetectionTime() 
+    public String getQuantityPurchased() 
     {
-        return detectionTime;
+        return quantityPurchased;
     }
     public void setCreateById(Long createById) 
     {
@@ -210,26 +195,17 @@ public class SampleTestingProcessInformation extends BaseEntity
     {
         return taskNodeKey;
     }
-    public void setWtId(String wtId) 
-    {
-        this.wtId = wtId;
-    }
-
-    public String getWtId() 
-    {
-        return wtId;
-    }
 
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
             .append("id", getId())
-            .append("ambientTemperature", getAmbientTemperature())
-            .append("ambientHumidity", getAmbientHumidity())
-            .append("testEquipmentNumber", getTestEquipmentNumber())
-            .append("testingEquipment", getTestingEquipment())
-            .append("testingPersonnel", getTestingPersonnel())
-            .append("detectionTime", getDetectionTime())
+            .append("planNumber", getPlanNumber())
+            .append("orderNumber", getOrderNumber())
+            .append("materialCode", getMaterialCode())
+            .append("materialName", getMaterialName())
+            .append("quantityDemanded", getQuantityDemanded())
+            .append("quantityPurchased", getQuantityPurchased())
             .append("remark", getRemark())
             .append("createById", getCreateById())
             .append("createBy", getCreateBy())
@@ -242,7 +218,6 @@ public class SampleTestingProcessInformation extends BaseEntity
             .append("processKey", getProcessKey())
             .append("taskProcessKey", getTaskProcessKey())
             .append("taskNodeKey", getTaskNodeKey())
-            .append("wtId", getWtId())
             .toString();
     }
 }

+ 339 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductDeliverySheet.java

@@ -0,0 +1,339 @@
+package  com.zkqy.amichi.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+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;
+
+import java.util.Date;
+
+/**
+ * 产品出库单对象 product_delivery_sheet
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+public class ProductDeliverySheet extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 客户名称 */
+    @Excel(name = "客户名称")
+    private String customerName;
+
+    /** 客户电话 */
+    @Excel(name = "客户电话")
+    private String customerPhone;
+
+    /** 客户传真 */
+    @Excel(name = "客户传真")
+    private String customerFax;
+
+    /** 客户地址 */
+    @Excel(name = "客户地址")
+    private String customerAddress;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private String contactPerson;
+
+    /** 收货地址 */
+    @Excel(name = "收货地址")
+    private String deliveryAddress;
+
+    /** 联系电话 */
+    @Excel(name = "联系电话")
+    private String contactNumber;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderNumber;
+
+
+    /** 单据编号 */
+    @Excel(name = "单据编号")
+    private String documentNumber;
+
+    /** 合同号 */
+    @Excel(name = "合同号")
+    private String contractNumber;
+    /** 制单人 */
+    @Excel(name = "制单人")
+    private String documenter;
+
+    /** 审核人 */
+    @Excel(name = "审核人")
+    private String auditor;
+
+    /** 签收人 */
+    @Excel(name = "签收人")
+    private String signer;
+
+    /** 签收人 */
+    @Excel(name = "签收时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date dateOfReceipt;
+
+    /** 审批意见 */
+    @Excel(name = "审批意见")
+    private String approvalOpinionFirst;
+
+    public String getApprovalOpinionFirst() {
+        return approvalOpinionFirst;
+    }
+
+    public void setApprovalOpinionFirst(String approvalOpinionFirst) {
+        this.approvalOpinionFirst = approvalOpinionFirst;
+    }
+
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber;
+    }
+
+    public String getDocumentNumber() {
+        return documentNumber;
+    }
+
+    public void setDocumentNumber(String documentNumber) {
+        this.documentNumber = documentNumber;
+    }
+
+    public String getContractNumber() {
+        return contractNumber;
+    }
+
+    public void setContractNumber(String contractNumber) {
+        this.contractNumber = contractNumber;
+    }
+
+    public String getDocumenter() {
+        return documenter;
+    }
+
+    public void setDocumenter(String documenter) {
+        this.documenter = documenter;
+    }
+
+    public String getAuditor() {
+        return auditor;
+    }
+
+    public void setAuditor(String auditor) {
+        this.auditor = auditor;
+    }
+
+    public String getSigner() {
+        return signer;
+    }
+
+    public void setSigner(String signer) {
+        this.signer = signer;
+    }
+
+    public Date getDateOfReceipt() {
+        return dateOfReceipt;
+    }
+
+    public void setDateOfReceipt(Date dateOfReceipt) {
+        this.dateOfReceipt = dateOfReceipt;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+
+    public void setCustomerName(String customerName) 
+    {
+        this.customerName = customerName;
+    }
+
+    public String getCustomerName() 
+    {
+        return customerName;
+    }
+    public void setCustomerPhone(String customerPhone) 
+    {
+        this.customerPhone = customerPhone;
+    }
+
+    public String getCustomerPhone() 
+    {
+        return customerPhone;
+    }
+    public void setCustomerFax(String customerFax) 
+    {
+        this.customerFax = customerFax;
+    }
+
+    public String getCustomerFax() 
+    {
+        return customerFax;
+    }
+    public void setCustomerAddress(String customerAddress) 
+    {
+        this.customerAddress = customerAddress;
+    }
+
+    public String getCustomerAddress() 
+    {
+        return customerAddress;
+    }
+    public void setContactPerson(String contactPerson) 
+    {
+        this.contactPerson = contactPerson;
+    }
+
+    public String getContactPerson() 
+    {
+        return contactPerson;
+    }
+    public void setDeliveryAddress(String deliveryAddress) 
+    {
+        this.deliveryAddress = deliveryAddress;
+    }
+
+    public String getDeliveryAddress() 
+    {
+        return deliveryAddress;
+    }
+    public void setContactNumber(String contactNumber) 
+    {
+        this.contactNumber = contactNumber;
+    }
+
+    public String getContactNumber() 
+    {
+        return contactNumber;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("customerName", getCustomerName())
+            .append("customerPhone", getCustomerPhone())
+            .append("customerFax", getCustomerFax())
+            .append("customerAddress", getCustomerAddress())
+            .append("contactPerson", getContactPerson())
+            .append("deliveryAddress", getDeliveryAddress())
+            .append("contactNumber", getContactNumber())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 209 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductDeliverySheetDetails.java

@@ -0,0 +1,209 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 出库单详情对象 product_delivery_sheet_details
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+public class ProductDeliverySheetDetails extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 出库单id */
+    @Excel(name = "出库单id")
+    private String deliveryId;
+
+    /** 产品名称 */
+    @Excel(name = "产品名称")
+    private String productName;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String modelNumber;
+
+    /** 单位 */
+    @Excel(name = "单位")
+    private String unit;
+
+    /** 数量 */
+    @Excel(name = "数量")
+    private String quantity;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setDeliveryId(String deliveryId) 
+    {
+        this.deliveryId = deliveryId;
+    }
+
+    public String getDeliveryId() 
+    {
+        return deliveryId;
+    }
+    public void setProductName(String productName) 
+    {
+        this.productName = productName;
+    }
+
+    public String getProductName() 
+    {
+        return productName;
+    }
+    public void setModelNumber(String modelNumber) 
+    {
+        this.modelNumber = modelNumber;
+    }
+
+    public String getModelNumber() 
+    {
+        return modelNumber;
+    }
+    public void setUnit(String unit) 
+    {
+        this.unit = unit;
+    }
+
+    public String getUnit() 
+    {
+        return unit;
+    }
+    public void setQuantity(String quantity) 
+    {
+        this.quantity = quantity;
+    }
+
+    public String getQuantity() 
+    {
+        return quantity;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("deliveryId", getDeliveryId())
+            .append("productName", getProductName())
+            .append("modelNumber", getModelNumber())
+            .append("unit", getUnit())
+            .append("quantity", getQuantity())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 265 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionBoms.java

@@ -0,0 +1,265 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 生产用料清单对象 production_boms
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+public class ProductionBoms extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 单据编号 */
+    @Excel(name = "单据编号")
+    private String documentNumber;
+
+    /** 需求单据 */
+    @Excel(name = "需求单据")
+    private String demandDocument;
+
+    /** 产品编码 */
+    @Excel(name = "产品编码")
+    private String productCode;
+
+    /** 产品名称 */
+    @Excel(name = "产品名称")
+    private String productName;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String modelNumber;
+
+    /** 规格 */
+    @Excel(name = "规格")
+    private String specification;
+
+    /** 生产订单编号 */
+    @Excel(name = "生产订单编号")
+    private String productionOrderNumber;
+
+    /** 生产订单状态 */
+    @Excel(name = "生产订单状态")
+    private String productionOrderStatus;
+
+    /** 单据状态 */
+    @Excel(name = "单据状态")
+    private String documentStatus;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setDocumentNumber(String documentNumber) 
+    {
+        this.documentNumber = documentNumber;
+    }
+
+    public String getDocumentNumber() 
+    {
+        return documentNumber;
+    }
+    public void setDemandDocument(String demandDocument) 
+    {
+        this.demandDocument = demandDocument;
+    }
+
+    public String getDemandDocument() 
+    {
+        return demandDocument;
+    }
+    public void setProductCode(String productCode) 
+    {
+        this.productCode = productCode;
+    }
+
+    public String getProductCode() 
+    {
+        return productCode;
+    }
+    public void setProductName(String productName) 
+    {
+        this.productName = productName;
+    }
+
+    public String getProductName() 
+    {
+        return productName;
+    }
+    public void setModelNumber(String modelNumber) 
+    {
+        this.modelNumber = modelNumber;
+    }
+
+    public String getModelNumber() 
+    {
+        return modelNumber;
+    }
+    public void setSpecification(String specification) 
+    {
+        this.specification = specification;
+    }
+
+    public String getSpecification() 
+    {
+        return specification;
+    }
+    public void setProductionOrderNumber(String productionOrderNumber) 
+    {
+        this.productionOrderNumber = productionOrderNumber;
+    }
+
+    public String getProductionOrderNumber() 
+    {
+        return productionOrderNumber;
+    }
+    public void setProductionOrderStatus(String productionOrderStatus) 
+    {
+        this.productionOrderStatus = productionOrderStatus;
+    }
+
+    public String getProductionOrderStatus() 
+    {
+        return productionOrderStatus;
+    }
+    public void setDocumentStatus(String documentStatus) 
+    {
+        this.documentStatus = documentStatus;
+    }
+
+    public String getDocumentStatus() 
+    {
+        return documentStatus;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("documentNumber", getDocumentNumber())
+            .append("demandDocument", getDemandDocument())
+            .append("productCode", getProductCode())
+            .append("productName", getProductName())
+            .append("modelNumber", getModelNumber())
+            .append("specification", getSpecification())
+            .append("productionOrderNumber", getProductionOrderNumber())
+            .append("productionOrderStatus", getProductionOrderStatus())
+            .append("documentStatus", getDocumentStatus())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 248 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionBomsDetails.java

@@ -0,0 +1,248 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 生产用料清单详细对象 production_boms_details
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+public class ProductionBomsDetails extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 生产bomid */
+    private String productionBomId;
+
+    public String getProductionBomId() {
+        return productionBomId;
+    }
+
+    public void setProductionBomId(String productionBomId) {
+        this.productionBomId = productionBomId;
+    }
+
+    /** 物料编码 */
+    @Excel(name = "物料编码")
+    private String subitemMaterialCode;
+
+    /** 物料名称 */
+    @Excel(name = "物料名称")
+    private String subitemMaterialName;
+
+    /** 型号 */
+    @Excel(name = "型号")
+    private String subitemDetailModel;
+
+    /** 规格 */
+    @Excel(name = "规格")
+    private String subitemDetailSpecifications;
+
+    /** 作业工序 */
+    @Excel(name = "作业工序")
+    private String workingProcedure;
+
+    /** 应发数量 */
+    @Excel(name = "应发数量")
+    private String quantityToBeDelivered;
+
+    /** 未领数量 */
+    @Excel(name = "未领数量")
+    private String unclaimedQuantity;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setSubitemMaterialCode(String subitemMaterialCode) 
+    {
+        this.subitemMaterialCode = subitemMaterialCode;
+    }
+
+    public String getSubitemMaterialCode() 
+    {
+        return subitemMaterialCode;
+    }
+    public void setSubitemMaterialName(String subitemMaterialName) 
+    {
+        this.subitemMaterialName = subitemMaterialName;
+    }
+
+    public String getSubitemMaterialName() 
+    {
+        return subitemMaterialName;
+    }
+    public void setSubitemDetailModel(String subitemDetailModel) 
+    {
+        this.subitemDetailModel = subitemDetailModel;
+    }
+
+    public String getSubitemDetailModel() 
+    {
+        return subitemDetailModel;
+    }
+    public void setSubitemDetailSpecifications(String subitemDetailSpecifications) 
+    {
+        this.subitemDetailSpecifications = subitemDetailSpecifications;
+    }
+
+    public String getSubitemDetailSpecifications() 
+    {
+        return subitemDetailSpecifications;
+    }
+    public void setWorkingProcedure(String workingProcedure) 
+    {
+        this.workingProcedure = workingProcedure;
+    }
+
+    public String getWorkingProcedure() 
+    {
+        return workingProcedure;
+    }
+    public void setQuantityToBeDelivered(String quantityToBeDelivered) 
+    {
+        this.quantityToBeDelivered = quantityToBeDelivered;
+    }
+
+    public String getQuantityToBeDelivered() 
+    {
+        return quantityToBeDelivered;
+    }
+    public void setUnclaimedQuantity(String unclaimedQuantity) 
+    {
+        this.unclaimedQuantity = unclaimedQuantity;
+    }
+
+    public String getUnclaimedQuantity() 
+    {
+        return unclaimedQuantity;
+    }
+    public void setCreateById(Long createById) 
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById() 
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById) 
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById() 
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag) 
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag() 
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus) 
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus() 
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey) 
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey() 
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey) 
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey() 
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey) 
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey() 
+    {
+        return taskNodeKey;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("subitemMaterialCode", getSubitemMaterialCode())
+            .append("subitemMaterialName", getSubitemMaterialName())
+            .append("subitemDetailModel", getSubitemDetailModel())
+            .append("subitemDetailSpecifications", getSubitemDetailSpecifications())
+            .append("workingProcedure", getWorkingProcedure())
+            .append("quantityToBeDelivered", getQuantityToBeDelivered())
+            .append("unclaimedQuantity", getUnclaimedQuantity())
+            .append("remark", getRemark())
+            .append("createById", getCreateById())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateById", getUpdateById())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("delFlag", getDelFlag())
+            .append("dataApprovalStatus", getDataApprovalStatus())
+            .append("processKey", getProcessKey())
+            .append("taskProcessKey", getTaskProcessKey())
+            .append("taskNodeKey", getTaskNodeKey())
+            .toString();
+    }
+}

+ 344 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/ProductionPlanningManagement.java

@@ -0,0 +1,344 @@
+package com.zkqy.amichi.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;
+
+/**
+ * 生产计划对象 production_planning_management
+ *
+ * @author zkqy
+ * @date 2024-07-17
+ */
+public class ProductionPlanningManagement extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 计划编号 */
+    @Excel(name = "计划编号")
+    private String planNumber;
+
+    /** 计划名称 */
+    @Excel(name = "计划名称")
+    private String planName;
+
+    /** 订单号 */
+    @Excel(name = "订单号")
+    private String orderNumber;
+
+    /** 计划数量 */
+    @Excel(name = "计划数量")
+    private String quantity;
+
+    /** 完成时间 */
+    @Excel(name = "完成时间")
+    private String completionTime;
+
+    /** 投产状态(0:已投产 1:未投产) */
+    @Excel(name = "投产状态(0:已投产 1:未投产)")
+    private String taskStatus;
+
+    /** 任务单id */
+    @Excel(name = "任务单id")
+    private String taskId;
+
+    /** 备用1 */
+    @Excel(name = "备用1:存放当前计划耗费的工时信息")
+    private String sparea;
+
+    /** 备用2 */
+    @Excel(name = "备用2")
+    private String spareb;
+
+    /** 备用3 */
+    @Excel(name = "备用3")
+    private String sparec;
+
+    /** 创建者id */
+    @Excel(name = "创建者id")
+    private Long createById;
+
+    /** 更新者id */
+    @Excel(name = "更新者id")
+    private Long updateById;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
+    /** 数据条审批状态(默认字段 0:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中) */
+    @Excel(name = "数据条审批状态", readConverterExp = "默=认字段,0=:已提交、1:已通过、2:不通过、3:未提交、4:驳回、5:审批中")
+    private String dataApprovalStatus;
+
+    /** 流程编号 */
+    @Excel(name = "流程编号")
+    private String processKey;
+
+    /** 任务编码 */
+    @Excel(name = "任务编码")
+    private String taskProcessKey;
+
+    /** 任务节点编码 */
+    @Excel(name = "任务节点编码")
+    private String taskNodeKey;
+
+    /** 合同号 */
+    @Excel(name = "合同号")
+    private String contractNumber;
+
+    /** 制单人 */
+    @Excel(name = "制单人")
+    private String documenter;
+
+    /** 技术部审批人 */
+    @Excel(name = "技术部审批人")
+    private String approvedByDepartment;
+
+    @Excel(name = "排产状态")
+    private String schedulingState;
+
+    @Excel(name="计划类型")
+    private  String planType;
+
+
+    public String getPlanType() {
+        return planType;
+    }
+
+    public void setPlanType(String planType) {
+        this.planType = planType;
+    }
+
+    public String getSchedulingState() {
+        return schedulingState;
+    }
+
+    public void setSchedulingState(String schedulingState) {
+        this.schedulingState = schedulingState;
+    }
+
+    public void setId(Long id)
+    {
+        this.id = id;
+    }
+
+    public Long getId()
+    {
+        return id;
+    }
+    public void setPlanNumber(String planNumber)
+    {
+        this.planNumber = planNumber;
+    }
+
+    public String getPlanNumber()
+    {
+        return planNumber;
+    }
+    public void setPlanName(String planName)
+    {
+        this.planName = planName;
+    }
+
+    public String getPlanName()
+    {
+        return planName;
+    }
+    public void setOrderNumber(String orderNumber)
+    {
+        this.orderNumber = orderNumber;
+    }
+
+    public String getOrderNumber()
+    {
+        return orderNumber;
+    }
+    public void setQuantity(String quantity)
+    {
+        this.quantity = quantity;
+    }
+
+    public String getQuantity()
+    {
+        return quantity;
+    }
+    public void setCompletionTime(String completionTime)
+    {
+        this.completionTime = completionTime;
+    }
+
+    public String getCompletionTime()
+    {
+        return completionTime;
+    }
+    public void setTaskStatus(String taskStatus)
+    {
+        this.taskStatus = taskStatus;
+    }
+
+    public String getTaskStatus()
+    {
+        return taskStatus;
+    }
+    public void setTaskId(String taskId)
+    {
+        this.taskId = taskId;
+    }
+
+    public String getTaskId()
+    {
+        return taskId;
+    }
+    public void setSparea(String sparea)
+    {
+        this.sparea = sparea;
+    }
+
+    public String getSparea()
+    {
+        return sparea;
+    }
+    public void setSpareb(String spareb)
+    {
+        this.spareb = spareb;
+    }
+
+    public String getSpareb()
+    {
+        return spareb;
+    }
+    public void setSparec(String sparec)
+    {
+        this.sparec = sparec;
+    }
+
+    public String getSparec()
+    {
+        return sparec;
+    }
+    public void setCreateById(Long createById)
+    {
+        this.createById = createById;
+    }
+
+    public Long getCreateById()
+    {
+        return createById;
+    }
+    public void setUpdateById(Long updateById)
+    {
+        this.updateById = updateById;
+    }
+
+    public Long getUpdateById()
+    {
+        return updateById;
+    }
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+    public void setDataApprovalStatus(String dataApprovalStatus)
+    {
+        this.dataApprovalStatus = dataApprovalStatus;
+    }
+
+    public String getDataApprovalStatus()
+    {
+        return dataApprovalStatus;
+    }
+    public void setProcessKey(String processKey)
+    {
+        this.processKey = processKey;
+    }
+
+    public String getProcessKey()
+    {
+        return processKey;
+    }
+    public void setTaskProcessKey(String taskProcessKey)
+    {
+        this.taskProcessKey = taskProcessKey;
+    }
+
+    public String getTaskProcessKey()
+    {
+        return taskProcessKey;
+    }
+    public void setTaskNodeKey(String taskNodeKey)
+    {
+        this.taskNodeKey = taskNodeKey;
+    }
+
+    public String getTaskNodeKey()
+    {
+        return taskNodeKey;
+    }
+    public void setContractNumber(String contractNumber)
+    {
+        this.contractNumber = contractNumber;
+    }
+
+    public String getContractNumber()
+    {
+        return contractNumber;
+    }
+    public void setDocumenter(String documenter)
+    {
+        this.documenter = documenter;
+    }
+
+    public String getDocumenter()
+    {
+        return documenter;
+    }
+    public void setApprovedByDepartment(String approvedByDepartment)
+    {
+        this.approvedByDepartment = approvedByDepartment;
+    }
+
+    public String getApprovedByDepartment()
+    {
+        return approvedByDepartment;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("planNumber", getPlanNumber())
+                .append("planName", getPlanName())
+                .append("orderNumber", getOrderNumber())
+                .append("quantity", getQuantity())
+                .append("completionTime", getCompletionTime())
+                .append("taskStatus", getTaskStatus())
+                .append("taskId", getTaskId())
+                .append("sparea", getSparea())
+                .append("spareb", getSpareb())
+                .append("sparec", getSparec())
+                .append("remark", getRemark())
+                .append("createById", getCreateById())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateById", getUpdateById())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("delFlag", getDelFlag())
+                .append("dataApprovalStatus", getDataApprovalStatus())
+                .append("processKey", getProcessKey())
+                .append("taskProcessKey", getTaskProcessKey())
+                .append("taskNodeKey", getTaskNodeKey())
+                .append("contractNumber", getContractNumber())
+                .append("documenter", getDocumenter())
+                .append("approvedByDepartment", getApprovedByDepartment())
+                .toString();
+    }
+}

+ 36 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ExportproductionschedulingArgumentVo.java

@@ -0,0 +1,36 @@
+package com.zkqy.amichi.domain.vo;
+
+import java.util.List;
+
+public class ExportproductionschedulingArgumentVo {
+    private  String  schedulingType;
+
+    private List<String> planIds;
+
+    //物料计划信息
+    private List<ProductionBomsDetailsVo>  bomFormTableDataS;
+
+    public List<ProductionBomsDetailsVo> getBomFormTableDataS() {
+        return bomFormTableDataS;
+    }
+
+    public void setBomFormTableDataS(List<ProductionBomsDetailsVo> bomFormTableDataS) {
+        this.bomFormTableDataS = bomFormTableDataS;
+    }
+
+    public List<String> getPlanIds() {
+        return planIds;
+    }
+
+    public void setPlanIds(List<String> planIds) {
+        this.planIds = planIds;
+    }
+
+    public String getSchedulingType() {
+        return schedulingType;
+    }
+
+    public void setSchedulingType(String schedulingType) {
+        this.schedulingType = schedulingType;
+    }
+}

+ 82 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/PlanPurchaseOrder.java

@@ -0,0 +1,82 @@
+package com.zkqy.amichi.domain.vo;
+
+import com.zkqy.common.annotation.Excel;
+
+/**
+ * 计划页面生成物料采购单
+ */
+public class PlanPurchaseOrder{
+    @Excel(name = "计划号--用不到")
+    private  String planNumber;
+    @Excel(name = "计划名称--用不到")
+    private  String planName;
+    @Excel(name = "订单号")
+    private  String orderNumber;
+    @Excel(name = "物料编码")
+    private  String materialCode;
+    @Excel(name = "物料名称")
+    private  String  materialName;
+    @Excel(name = "需求量")
+    private  String quantityDemanded;
+
+    public String getPlanNumber() {
+        return planNumber;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuffer sb = new StringBuffer("PlanPurchaseOrder{");
+        sb.append("planNumber='").append(planNumber).append('\'');
+        sb.append(", planName='").append(planName).append('\'');
+        sb.append(", orderNumber='").append(orderNumber).append('\'');
+        sb.append(", materialCode='").append(materialCode).append('\'');
+        sb.append(", materialName='").append(materialName).append('\'');
+        sb.append(", quantityDemanded='").append(quantityDemanded).append('\'');
+        sb.append('}');
+        return sb.toString();
+    }
+
+    public void setPlanNumber(String planNumber) {
+        this.planNumber = planNumber;
+    }
+
+    public String getPlanName() {
+        return planName;
+    }
+
+    public void setPlanName(String planName) {
+        this.planName = planName;
+    }
+
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber;
+    }
+
+    public String getMaterialCode() {
+        return materialCode;
+    }
+
+    public void setMaterialCode(String materialCode) {
+        this.materialCode = materialCode;
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName;
+    }
+
+    public String getQuantityDemanded() {
+        return quantityDemanded;
+    }
+
+    public void setQuantityDemanded(String quantityDemanded) {
+        this.quantityDemanded = quantityDemanded;
+    }
+}

+ 21 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductDeliverySheetVo.java

@@ -0,0 +1,21 @@
+package com.zkqy.amichi.domain.vo;
+
+import com.zkqy.amichi.domain.ProductDeliverySheet;
+import com.zkqy.amichi.domain.ProductDeliverySheetDetails;
+
+import java.util.List;
+
+public class ProductDeliverySheetVo extends ProductDeliverySheet {
+
+    //出库单详情
+    private List<ProductDeliverySheetDetails> productDeliverySheetDetailsList;
+
+    public List<ProductDeliverySheetDetails> getProductDeliverySheetDetailsList() {
+        return productDeliverySheetDetailsList;
+    }
+
+    public void setProductDeliverySheetDetailsList(List<ProductDeliverySheetDetails> productDeliverySheetDetailsList) {
+        this.productDeliverySheetDetailsList = productDeliverySheetDetailsList;
+    }
+
+}

+ 24 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductionBomsDetailsVo.java

@@ -0,0 +1,24 @@
+package com.zkqy.amichi.domain.vo;
+
+import com.zkqy.amichi.domain.ProductionBomsDetails;
+
+public class ProductionBomsDetailsVo extends ProductionBomsDetails {
+    private  Double  stockQuantity;
+    private  String  orderNumber;
+
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber;
+    }
+
+    public Double getStockQuantity() {
+        return stockQuantity;
+    }
+
+    public void setStockQuantity(Double stockQuantity) {
+        this.stockQuantity = stockQuantity;
+    }
+}

+ 216 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/domain/vo/ProductionPlanningManagementVo.java

@@ -0,0 +1,216 @@
+package com.zkqy.amichi.domain.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zkqy.amichi.domain.PlanTaskDetails;
+import com.zkqy.amichi.domain.ProductionPlanningManagement;
+import com.zkqy.amichi.domain.TaskDetails;
+import com.zkqy.common.annotation.Excel;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+public class ProductionPlanningManagementVo extends ProductionPlanningManagement {
+
+    //生产计划明细(以前用生产任务单做的明细)
+    private List<TaskDetails> taskDetails;
+
+
+    //生产计划明细(独立出来的计划明细)
+    private List<PlanTaskDetails> planTaskDetails;
+
+    //生产任务单的创建时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime ptcreateTime;
+
+    public LocalDateTime getPtcreateTime() {
+        return ptcreateTime;
+    }
+
+    public void setPtcreateTime(LocalDateTime ptcreateTime) {
+        this.ptcreateTime = ptcreateTime;
+    }
+
+    public List<PlanTaskDetails> getPlanTaskDetails() {
+        return planTaskDetails;
+    }
+
+    public void setPlanTaskDetails(List<PlanTaskDetails> planTaskDetails) {
+        this.planTaskDetails = planTaskDetails;
+    }
+
+    /** 数据 */
+    @Excel(name = "数据")
+    private String requirementDate;
+
+    /** 机壳-端盖 */
+    @Excel(name = "机壳-端盖")
+    private String shell;
+
+    /** 开关 */
+    @Excel(name = "开关")
+    private String switching;
+
+    /** 颜色 */
+    @Excel(name = "颜色")
+    private String colour;
+
+    /** 铭牌 */
+    @Excel(name = "铭牌")
+    private String nameplate;
+
+    /** 说明书 */
+    @Excel(name = "说明书")
+    private String instructions;
+
+    /** 合格证 */
+    @Excel(name = "合格证")
+    private String certificate;
+
+    /** 包装箱 */
+    @Excel(name = "包装箱")
+    private String packingbox;
+
+    /** 特殊要求 */
+    @Excel(name = "特殊要求")
+    private String special;
+
+    /** 完成时间 */
+    @Excel(name = "完成时间")
+    private String completiontime;
+
+    /** 制单人 */
+    @Excel(name = "制单人")
+    private String creator;
+
+    /** 技术部 */
+    @Excel(name = "技术部")
+    private String technology;
+
+    /** 总经理 */
+    @Excel(name = "总经理")
+    private String general;
+
+    /** 状态 */
+    @Excel(name = "状态")
+    private String state;
+
+    public String getRequirementDate() {
+        return requirementDate;
+    }
+
+    public void setRequirementDate(String requirementDate) {
+        this.requirementDate = requirementDate;
+    }
+
+    public String getShell() {
+        return shell;
+    }
+
+    public void setShell(String shell) {
+        this.shell = shell;
+    }
+
+    public String getSwitching() {
+        return switching;
+    }
+
+    public void setSwitching(String switching) {
+        this.switching = switching;
+    }
+
+    public String getColour() {
+        return colour;
+    }
+
+    public void setColour(String colour) {
+        this.colour = colour;
+    }
+
+    public String getNameplate() {
+        return nameplate;
+    }
+
+    public void setNameplate(String nameplate) {
+        this.nameplate = nameplate;
+    }
+
+    public String getInstructions() {
+        return instructions;
+    }
+
+    public void setInstructions(String instructions) {
+        this.instructions = instructions;
+    }
+
+    public String getCertificate() {
+        return certificate;
+    }
+
+    public void setCertificate(String certificate) {
+        this.certificate = certificate;
+    }
+
+    public String getPackingbox() {
+        return packingbox;
+    }
+
+    public void setPackingbox(String packingbox) {
+        this.packingbox = packingbox;
+    }
+
+    public String getSpecial() {
+        return special;
+    }
+
+    public void setSpecial(String special) {
+        this.special = special;
+    }
+
+    public String getCompletiontime() {
+        return completiontime;
+    }
+
+    public void setCompletiontime(String completiontime) {
+        this.completiontime = completiontime;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getTechnology() {
+        return technology;
+    }
+
+    public void setTechnology(String technology) {
+        this.technology = technology;
+    }
+
+    public String getGeneral() {
+        return general;
+    }
+
+    public void setGeneral(String general) {
+        this.general = general;
+    }
+
+    public String getState() {
+        return state;
+    }
+
+    public void setState(String state) {
+        this.state = state;
+    }
+
+    public List<TaskDetails> getTaskDetails() {
+        return taskDetails;
+    }
+
+    public void setTaskDetails(List<TaskDetails> taskDetails) {
+        this.taskDetails = taskDetails;
+    }
+}

+ 63 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/CustomerInformationMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.CustomerInformation;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 客户信息Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@Mapper
+public interface CustomerInformationMapper 
+{
+    /**
+     * 查询客户信息
+     * 
+     * @param id 客户信息主键
+     * @return 客户信息
+     */
+    public CustomerInformation selectCustomerInformationById(Long id);
+
+    /**
+     * 查询客户信息列表
+     * 
+     * @param customerInformation 客户信息
+     * @return 客户信息集合
+     */
+    public List<CustomerInformation> selectCustomerInformationList(CustomerInformation customerInformation);
+
+    /**
+     * 新增客户信息
+     * 
+     * @param customerInformation 客户信息
+     * @return 结果
+     */
+    public int insertCustomerInformation(CustomerInformation customerInformation);
+
+    /**
+     * 修改客户信息
+     * 
+     * @param customerInformation 客户信息
+     * @return 结果
+     */
+    public int updateCustomerInformation(CustomerInformation customerInformation);
+
+    /**
+     * 删除客户信息
+     * 
+     * @param id 客户信息主键
+     * @return 结果
+     */
+    public int deleteCustomerInformationById(Long id);
+
+    /**
+     * 批量删除客户信息
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteCustomerInformationByIds(Long[] ids);
+}

+ 63 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ExportproductionschedulingMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.Exportproductionscheduling;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 外销排产Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+@Mapper
+public interface ExportproductionschedulingMapper 
+{
+    /**
+     * 查询外销排产
+     * 
+     * @param id 外销排产主键
+     * @return 外销排产
+     */
+    public Exportproductionscheduling selectExportproductionschedulingById(Long id);
+
+    /**
+     * 查询外销排产列表
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 外销排产集合
+     */
+    public List<Exportproductionscheduling> selectExportproductionschedulingList(Exportproductionscheduling exportproductionscheduling);
+
+    /**
+     * 新增外销排产
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 结果
+     */
+    public int insertExportproductionscheduling(Exportproductionscheduling exportproductionscheduling);
+
+    /**
+     * 修改外销排产
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 结果
+     */
+    public int updateExportproductionscheduling(Exportproductionscheduling exportproductionscheduling);
+
+    /**
+     * 删除外销排产
+     * 
+     * @param id 外销排产主键
+     * @return 结果
+     */
+    public int deleteExportproductionschedulingById(Long id);
+
+    /**
+     * 批量删除外销排产
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteExportproductionschedulingByIds(Long[] ids);
+}

+ 63 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ManhourMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.Manhour;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 产品工时Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-25
+ */
+@Mapper
+public interface ManhourMapper 
+{
+    /**
+     * 查询产品工时
+     * 
+     * @param id 产品工时主键
+     * @return 产品工时
+     */
+    public Manhour selectManhourById(Long id);
+
+    /**
+     * 查询产品工时列表
+     * 
+     * @param manhour 产品工时
+     * @return 产品工时集合
+     */
+    public List<Manhour> selectManhourList(Manhour manhour);
+
+    /**
+     * 新增产品工时
+     * 
+     * @param manhour 产品工时
+     * @return 结果
+     */
+    public int insertManhour(Manhour manhour);
+
+    /**
+     * 修改产品工时
+     * 
+     * @param manhour 产品工时
+     * @return 结果
+     */
+    public int updateManhour(Manhour manhour);
+
+    /**
+     * 删除产品工时
+     * 
+     * @param id 产品工时主键
+     * @return 结果
+     */
+    public int deleteManhourById(Long id);
+
+    /**
+     * 批量删除产品工时
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteManhourByIds(Long[] ids);
+}

+ 13 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/MaterialInfoMapper.java

@@ -62,4 +62,17 @@ public interface MaterialInfoMapper
     public int deleteMaterialInfoByIds(Long[] ids);
 
     int updateMaterialInfoByCode(MaterialInfo materialInfo1);
+
+    /**
+     * 批量新增
+     * @param toBeInserted
+     * @return
+     */
+    int batchInsert(List<MaterialInfo> toBeInserted);
+
+    /**
+     * 批量修改
+     * @param toBeUpdated
+     */
+    void batchUpdate(List<MaterialInfo> toBeUpdated);
 }

+ 4 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/OperationInstructionMapper.java

@@ -1,7 +1,8 @@
-package com.zkqy.system.mapper;
+package com.zkqy.amichi.mapper;
 
 import java.util.List;
-import com.zkqy.system.domain.OperationInstruction;
+import  com.zkqy.amichi.domain.OperationInstruction;
+import org.apache.ibatis.annotations.Mapper;
 
 /**
  * 作业指导书Mapper接口
@@ -9,6 +10,7 @@ import com.zkqy.system.domain.OperationInstruction;
  * @author zkqy
  * @date 2024-07-05
  */
+@Mapper
 public interface OperationInstructionMapper 
 {
     /**

+ 63 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlanTaskDetailsMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.PlanTaskDetails;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 生产任务单明细Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-23
+ */
+@Mapper
+public interface PlanTaskDetailsMapper 
+{
+    /**
+     * 查询生产任务单明细
+     * 
+     * @param id 生产任务单明细主键
+     * @return 生产任务单明细
+     */
+    public PlanTaskDetails selectPlanTaskDetailsById(Long id);
+
+    /**
+     * 查询生产任务单明细列表
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 生产任务单明细集合
+     */
+    public List<PlanTaskDetails> selectPlanTaskDetailsList(PlanTaskDetails planTaskDetails);
+
+    /**
+     * 新增生产任务单明细
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    public int insertPlanTaskDetails(PlanTaskDetails planTaskDetails);
+
+    /**
+     * 修改生产任务单明细
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    public int updatePlanTaskDetails(PlanTaskDetails planTaskDetails);
+
+    /**
+     * 删除生产任务单明细
+     * 
+     * @param id 生产任务单明细主键
+     * @return 结果
+     */
+    public int deletePlanTaskDetailsById(Long id);
+
+    /**
+     * 批量删除生产任务单明细
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePlanTaskDetailsByIds(Long[] ids);
+}

+ 63 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PlannedPurchaseLogMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.PlannedPurchaseLog;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 计划采购物料日志Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-22
+ */
+@Mapper
+public interface PlannedPurchaseLogMapper 
+{
+    /**
+     * 查询计划采购物料日志
+     * 
+     * @param id 计划采购物料日志主键
+     * @return 计划采购物料日志
+     */
+    public PlannedPurchaseLog selectPlannedPurchaseLogById(Long id);
+
+    /**
+     * 查询计划采购物料日志列表
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 计划采购物料日志集合
+     */
+    public List<PlannedPurchaseLog> selectPlannedPurchaseLogList(PlannedPurchaseLog plannedPurchaseLog);
+
+    /**
+     * 新增计划采购物料日志
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 结果
+     */
+    public int insertPlannedPurchaseLog(PlannedPurchaseLog plannedPurchaseLog);
+
+    /**
+     * 修改计划采购物料日志
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 结果
+     */
+    public int updatePlannedPurchaseLog(PlannedPurchaseLog plannedPurchaseLog);
+
+    /**
+     * 删除计划采购物料日志
+     * 
+     * @param id 计划采购物料日志主键
+     * @return 结果
+     */
+    public int deletePlannedPurchaseLogById(Long id);
+
+    /**
+     * 批量删除计划采购物料日志
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deletePlannedPurchaseLogByIds(Long[] ids);
+}

+ 2 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/PocurementdetailsMapper.java

@@ -76,4 +76,6 @@ public interface PocurementdetailsMapper
      * @return 结果
      */
     public int updatePocurementdetailsByIdsDelete(Long[] ids);
+
+    int updatePocurementdetailsPurchaseId(Pocurementdetails pocurementdetails);
 }

+ 72 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductDeliverySheetDetailsMapper.java

@@ -0,0 +1,72 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductDeliverySheetDetails;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 出库单详情Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@Mapper
+public interface ProductDeliverySheetDetailsMapper 
+{
+    /**
+     * 查询出库单详情
+     * 
+     * @param id 出库单详情主键
+     * @return 出库单详情
+     */
+    public ProductDeliverySheetDetails selectProductDeliverySheetDetailsById(Long id);
+
+
+
+    /**
+     * 查询出库单详情列表
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 出库单详情集合
+     */
+    public List<ProductDeliverySheetDetails> selectProductDeliverySheetDetailsList(ProductDeliverySheetDetails productDeliverySheetDetails);
+
+    /**
+     * 新增出库单详情
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 结果
+     */
+    public int insertProductDeliverySheetDetails(ProductDeliverySheetDetails productDeliverySheetDetails);
+
+    /**
+     * 修改出库单详情
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 结果
+     */
+    public int updateProductDeliverySheetDetails(ProductDeliverySheetDetails productDeliverySheetDetails);
+
+    /**
+     * 删除出库单详情
+     * 
+     * @param id 出库单详情主键
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetDetailsById(Long id);
+
+    /**
+     * 批量删除出库单详情
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetDetailsByIds(Long[] ids);
+
+    /**
+     * 根据id进行修改
+     * @param productDeliverySheetDetails
+     * @return
+     */
+    int updateProductDeliverySheetDetailsById(ProductDeliverySheetDetails productDeliverySheetDetails);
+}

+ 74 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductDeliverySheetMapper.java

@@ -0,0 +1,74 @@
+package  com.zkqy.amichi.mapper;
+
+import java.util.List;
+import  com.zkqy.amichi.domain.ProductDeliverySheet;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+/**
+ * 产品出库单Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@Mapper
+public interface ProductDeliverySheetMapper 
+{
+    /**
+     * 查询产品出库单
+     * 
+     * @param id 产品出库单主键
+     * @return 产品出库单
+     */
+    public ProductDeliverySheet selectProductDeliverySheetById(Long id);
+
+    /**
+     * 查询产品出库单列表
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 产品出库单集合
+     */
+    public List<ProductDeliverySheet> selectProductDeliverySheetList(ProductDeliverySheet productDeliverySheet);
+
+    /**
+     * 新增产品出库单
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 结果
+     */
+    public int insertProductDeliverySheet(ProductDeliverySheet productDeliverySheet);
+
+    /**
+     * 修改产品出库单
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 结果
+     */
+    public int updateProductDeliverySheet(ProductDeliverySheet productDeliverySheet);
+
+    /**
+     * 删除产品出库单
+     * 
+     * @param id 产品出库单主键
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetById(Long id);
+
+    /**
+     * 删除产品出库单
+     *
+     * @param ids 产品出库单主键
+     * @return 结果
+     */
+    public int updateProductDeliverySheetByIdIn(@Param("pds") ProductDeliverySheet productDeliverySheet, @Param("ids") Long[] ids);
+
+    /**
+     * 批量删除产品出库单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetByIds(Long[] ids);
+
+
+}

+ 80 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionBomsDetailsMapper.java

@@ -0,0 +1,80 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductionBomsDetails;
+import com.zkqy.amichi.domain.vo.ProductionBomsDetailsVo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 生产用料清单详细Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+@Mapper
+public interface ProductionBomsDetailsMapper 
+{
+    /**
+     * 查询生产用料清单详细
+     * 
+     * @param id 生产用料清单详细主键
+     * @return 生产用料清单详细
+     */
+    public ProductionBomsDetails selectProductionBomsDetailsById(Long id);
+
+    /**
+     * 查询生产用料清单详细列表
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 生产用料清单详细集合
+     */
+    public List<ProductionBomsDetails> selectProductionBomsDetailsList(ProductionBomsDetails productionBomsDetails);
+
+    /**
+     * 查询生产用料清单详细列表In
+     *
+     * @param ids 生产用料清单详细
+     * @return 生产用料清单详细集合
+     */
+    public List<ProductionBomsDetailsVo> selectProductionBomsDetailsListByInProductionBomId(List<String> ids);
+
+
+    /**
+     * 新增生产用料清单详细
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 结果
+     */
+    public int insertProductionBomsDetails(ProductionBomsDetails productionBomsDetails);
+
+    /**
+     * 修改生产用料清单详细
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 结果
+     */
+    public int updateProductionBomsDetails(ProductionBomsDetails productionBomsDetails);
+
+    /**
+     * 删除生产用料清单详细
+     * 
+     * @param id 生产用料清单详细主键
+     * @return 结果
+     */
+    public int deleteProductionBomsDetailsById(Long id);
+
+    /**
+     * 批量删除生产用料清单详细
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductionBomsDetailsByIds(Long[] ids);
+
+
+    /**
+     * 查询物料跟物料库存表
+     * @return
+     */
+    ProductionBomsDetailsVo selectProductionBomsDetailsListAndStockInfo();
+}

+ 63 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionBomsMapper.java

@@ -0,0 +1,63 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductionBoms;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 生产用料清单Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+@Mapper
+public interface ProductionBomsMapper 
+{
+    /**
+     * 查询生产用料清单
+     * 
+     * @param id 生产用料清单主键
+     * @return 生产用料清单
+     */
+    public ProductionBoms selectProductionBomsById(Long id);
+
+    /**
+     * 查询生产用料清单列表
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 生产用料清单集合
+     */
+    public List<ProductionBoms> selectProductionBomsList(ProductionBoms productionBoms);
+
+    /**
+     * 新增生产用料清单
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 结果
+     */
+    public int insertProductionBoms(ProductionBoms productionBoms);
+
+    /**
+     * 修改生产用料清单
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 结果
+     */
+    public int updateProductionBoms(ProductionBoms productionBoms);
+
+    /**
+     * 删除生产用料清单
+     * 
+     * @param id 生产用料清单主键
+     * @return 结果
+     */
+    public int deleteProductionBomsById(Long id);
+
+    /**
+     * 批量删除生产用料清单
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductionBomsByIds(Long[] ids);
+}

+ 73 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/ProductionPlanningManagementMapper.java

@@ -0,0 +1,73 @@
+package com.zkqy.amichi.mapper;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductionPlanningManagement;
+import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 生产计划Mapper接口
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+@Mapper
+public interface ProductionPlanningManagementMapper 
+{
+    /**
+     * 查询生产计划
+     * 
+     * @param id 生产计划主键
+     * @return 生产计划
+     */
+    public ProductionPlanningManagement selectProductionPlanningManagementById(Long id);
+
+    /**
+     * 查询生产计划列表
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 生产计划集合
+     */
+    public List<ProductionPlanningManagement> selectProductionPlanningManagementList(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 新增生产计划
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    public int insertProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 修改生产计划
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    public int updateProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 删除生产计划
+     * 
+     * @param id 生产计划主键
+     * @return 结果
+     */
+    public int deleteProductionPlanningManagementById(Long id);
+
+    /**
+     * 批量删除生产计划
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteProductionPlanningManagementByIds(Long[] ids);
+
+    List<ProductionPlanningManagementVo> selectProductionPlanningManagementListVo(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 根据计划id查询计划列表信息
+     * @param ids
+     * @return
+     */
+    List<ProductionPlanningManagementVo> selectProductionPlanningManagementListVoIn(List<String> ids);
+}

+ 2 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/mapper/WorkingprocedureMapper.java

@@ -2,6 +2,7 @@ package com.zkqy.amichi.mapper;
 
 import java.util.List;
 import com.zkqy.amichi.domain.Workingprocedure;
+import org.apache.ibatis.annotations.Mapper;
 
 /**
  * 工序Mapper接口
@@ -9,6 +10,7 @@ import com.zkqy.amichi.domain.Workingprocedure;
  * @author zkqy
  * @date 2024-07-04
  */
+@Mapper
 public interface WorkingprocedureMapper 
 {
     /**

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/ICustomerInformationService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.CustomerInformation;
+
+/**
+ * 客户信息Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+public interface ICustomerInformationService 
+{
+    /**
+     * 查询客户信息
+     * 
+     * @param id 客户信息主键
+     * @return 客户信息
+     */
+    public CustomerInformation selectCustomerInformationById(Long id);
+
+    /**
+     * 查询客户信息列表
+     * 
+     * @param customerInformation 客户信息
+     * @return 客户信息集合
+     */
+    public List<CustomerInformation> selectCustomerInformationList(CustomerInformation customerInformation);
+
+    /**
+     * 新增客户信息
+     * 
+     * @param customerInformation 客户信息
+     * @return 结果
+     */
+    public int insertCustomerInformation(CustomerInformation customerInformation);
+
+    /**
+     * 修改客户信息
+     * 
+     * @param customerInformation 客户信息
+     * @return 结果
+     */
+    public int updateCustomerInformation(CustomerInformation customerInformation);
+
+    /**
+     * 批量删除客户信息
+     * 
+     * @param ids 需要删除的客户信息主键集合
+     * @return 结果
+     */
+    public int deleteCustomerInformationByIds(Long[] ids);
+
+    /**
+     * 删除客户信息信息
+     * 
+     * @param id 客户信息主键
+     * @return 结果
+     */
+    public int deleteCustomerInformationById(Long id);
+}

+ 77 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IExportproductionschedulingService.java

@@ -0,0 +1,77 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.Exportproductionscheduling;
+import com.zkqy.amichi.domain.vo.ExportproductionschedulingArgumentVo;
+import com.zkqy.common.core.domain.AjaxResult;
+
+/**
+ * 外销排产Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+public interface IExportproductionschedulingService 
+{
+    /**
+     * 查询外销排产
+     * 
+     * @param id 外销排产主键
+     * @return 外销排产
+     */
+    public Exportproductionscheduling selectExportproductionschedulingById(Long id);
+
+    /**
+     * 查询外销排产列表
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 外销排产集合
+     */
+    public List<Exportproductionscheduling> selectExportproductionschedulingList(Exportproductionscheduling exportproductionscheduling);
+
+    /**
+     * 新增外销排产
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 结果
+     */
+    public int insertExportproductionscheduling(Exportproductionscheduling exportproductionscheduling);
+
+    /**
+     * 修改外销排产
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 结果
+     */
+    public int updateExportproductionscheduling(Exportproductionscheduling exportproductionscheduling);
+
+    /**
+     * 批量删除外销排产
+     * 
+     * @param ids 需要删除的外销排产主键集合
+     * @return 结果
+     */
+    public int deleteExportproductionschedulingByIds(Long[] ids);
+
+    /**
+     * 删除外销排产信息
+     * 
+     * @param id 外销排产主键
+     * @return 结果
+     */
+    public int deleteExportproductionschedulingById(Long id);
+
+    /**
+     * 新增外销排产信息
+     * @param exportproductionscheduling
+     * @return
+     */
+    int insertExportproductionschedulingS(List<Exportproductionscheduling> exportproductionscheduling);
+
+    /**
+     *
+     * @param exportproductionschedulingVo
+     * @return
+     */
+    AjaxResult automaticScheduling(ExportproductionschedulingArgumentVo exportproductionschedulingVo);
+}

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IManhourService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.Manhour;
+
+/**
+ * 产品工时Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-25
+ */
+public interface IManhourService 
+{
+    /**
+     * 查询产品工时
+     * 
+     * @param id 产品工时主键
+     * @return 产品工时
+     */
+    public Manhour selectManhourById(Long id);
+
+    /**
+     * 查询产品工时列表
+     * 
+     * @param manhour 产品工时
+     * @return 产品工时集合
+     */
+    public List<Manhour> selectManhourList(Manhour manhour);
+
+    /**
+     * 新增产品工时
+     * 
+     * @param manhour 产品工时
+     * @return 结果
+     */
+    public int insertManhour(Manhour manhour);
+
+    /**
+     * 修改产品工时
+     * 
+     * @param manhour 产品工时
+     * @return 结果
+     */
+    public int updateManhour(Manhour manhour);
+
+    /**
+     * 批量删除产品工时
+     * 
+     * @param ids 需要删除的产品工时主键集合
+     * @return 结果
+     */
+    public int deleteManhourByIds(Long[] ids);
+
+    /**
+     * 删除产品工时信息
+     * 
+     * @param id 产品工时主键
+     * @return 结果
+     */
+    public int deleteManhourById(Long id);
+}

+ 18 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IMaterialInfoService.java

@@ -2,6 +2,7 @@ package com.zkqy.amichi.service;
 
 import java.util.List;
 import com.zkqy.amichi.domain.MaterialInfo;
+import com.zkqy.common.core.domain.AjaxResult;
 
 /**
  * 物料信息Service接口
@@ -72,4 +73,21 @@ public interface IMaterialInfoService
      * @return
      */
     String outLibrary(MaterialInfo materialInfo);
+
+    /**
+     * 导入物料信息
+     *
+     * @param materialInfos        物料数据列表
+     * @param updateSupport 是否更新支持,如果已存在,则进行更新数据
+     * @param operName        操作用户
+     * @return 结果
+     */
+    String importMaterialInfo(List<MaterialInfo> materialInfos, boolean updateSupport, String operName);
+
+    /**
+     * 查询所有计划的物料信息并合并
+     * @param ids
+     * @return
+     */
+    AjaxResult viewPlannedMaterialStatus(List<String> ids);
 }

+ 4 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IOperationInstructionService.java

@@ -1,7 +1,8 @@
-package com.zkqy.system.service;
+package com.zkqy.amichi.service;
 
 import java.util.List;
-import com.zkqy.system.domain.OperationInstruction;
+import  com.zkqy.amichi.domain.OperationInstruction;
+import org.apache.ibatis.annotations.Mapper;
 
 /**
  * 作业指导书Service接口
@@ -9,6 +10,7 @@ import com.zkqy.system.domain.OperationInstruction;
  * @author zkqy
  * @date 2024-07-05
  */
+
 public interface IOperationInstructionService 
 {
     /**

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPlanTaskDetailsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.PlanTaskDetails;
+
+/**
+ * 生产任务单明细Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-23
+ */
+public interface IPlanTaskDetailsService 
+{
+    /**
+     * 查询生产任务单明细
+     * 
+     * @param id 生产任务单明细主键
+     * @return 生产任务单明细
+     */
+    public PlanTaskDetails selectPlanTaskDetailsById(Long id);
+
+    /**
+     * 查询生产任务单明细列表
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 生产任务单明细集合
+     */
+    public List<PlanTaskDetails> selectPlanTaskDetailsList(PlanTaskDetails planTaskDetails);
+
+    /**
+     * 新增生产任务单明细
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    public int insertPlanTaskDetails(PlanTaskDetails planTaskDetails);
+
+    /**
+     * 修改生产任务单明细
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    public int updatePlanTaskDetails(PlanTaskDetails planTaskDetails);
+
+    /**
+     * 批量删除生产任务单明细
+     * 
+     * @param ids 需要删除的生产任务单明细主键集合
+     * @return 结果
+     */
+    public int deletePlanTaskDetailsByIds(Long[] ids);
+
+    /**
+     * 删除生产任务单明细信息
+     * 
+     * @param id 生产任务单明细主键
+     * @return 结果
+     */
+    public int deletePlanTaskDetailsById(Long id);
+}

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPlannedPurchaseLogService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.PlannedPurchaseLog;
+
+/**
+ * 计划采购物料日志Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-22
+ */
+public interface IPlannedPurchaseLogService 
+{
+    /**
+     * 查询计划采购物料日志
+     * 
+     * @param id 计划采购物料日志主键
+     * @return 计划采购物料日志
+     */
+    public PlannedPurchaseLog selectPlannedPurchaseLogById(Long id);
+
+    /**
+     * 查询计划采购物料日志列表
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 计划采购物料日志集合
+     */
+    public List<PlannedPurchaseLog> selectPlannedPurchaseLogList(PlannedPurchaseLog plannedPurchaseLog);
+
+    /**
+     * 新增计划采购物料日志
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 结果
+     */
+    public int insertPlannedPurchaseLog(PlannedPurchaseLog plannedPurchaseLog);
+
+    /**
+     * 修改计划采购物料日志
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 结果
+     */
+    public int updatePlannedPurchaseLog(PlannedPurchaseLog plannedPurchaseLog);
+
+    /**
+     * 批量删除计划采购物料日志
+     * 
+     * @param ids 需要删除的计划采购物料日志主键集合
+     * @return 结果
+     */
+    public int deletePlannedPurchaseLogByIds(Long[] ids);
+
+    /**
+     * 删除计划采购物料日志信息
+     * 
+     * @param id 计划采购物料日志主键
+     * @return 结果
+     */
+    public int deletePlannedPurchaseLogById(Long id);
+}

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductDeliverySheetDetailsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductDeliverySheetDetails;
+
+/**
+ * 出库单详情Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+public interface IProductDeliverySheetDetailsService 
+{
+    /**
+     * 查询出库单详情
+     * 
+     * @param id 出库单详情主键
+     * @return 出库单详情
+     */
+    public ProductDeliverySheetDetails selectProductDeliverySheetDetailsById(Long id);
+
+    /**
+     * 查询出库单详情列表
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 出库单详情集合
+     */
+    public List<ProductDeliverySheetDetails> selectProductDeliverySheetDetailsList(ProductDeliverySheetDetails productDeliverySheetDetails);
+
+    /**
+     * 新增出库单详情
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 结果
+     */
+    public int insertProductDeliverySheetDetails(ProductDeliverySheetDetails productDeliverySheetDetails);
+
+    /**
+     * 修改出库单详情
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 结果
+     */
+    public int updateProductDeliverySheetDetails(ProductDeliverySheetDetails productDeliverySheetDetails);
+
+    /**
+     * 批量删除出库单详情
+     * 
+     * @param ids 需要删除的出库单详情主键集合
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetDetailsByIds(Long[] ids);
+
+    /**
+     * 删除出库单详情信息
+     * 
+     * @param id 出库单详情主键
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetDetailsById(Long id);
+}

+ 104 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductDeliverySheetService.java

@@ -0,0 +1,104 @@
+package  com.zkqy.amichi.service;
+
+import java.util.List;
+import  com.zkqy.amichi.domain.ProductDeliverySheet;
+import com.zkqy.amichi.domain.vo.ProductDeliverySheetVo;
+
+/**
+ * 产品出库单Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+public interface IProductDeliverySheetService 
+{
+    /**
+     * 查询产品出库单
+     * 
+     * @param id 产品出库单主键
+     * @return 产品出库单
+     */
+    public ProductDeliverySheet selectProductDeliverySheetById(Long id);
+
+    /**
+     * 查询产品出库单列表
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 产品出库单集合
+     */
+    public List<ProductDeliverySheet> selectProductDeliverySheetList(ProductDeliverySheet productDeliverySheet);
+
+    /**
+     * 新增产品出库单
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 结果
+     */
+    public int insertProductDeliverySheet(ProductDeliverySheet productDeliverySheet);
+
+    /**
+     * 修改产品出库单
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 结果
+     */
+    public int updateProductDeliverySheet(ProductDeliverySheet productDeliverySheet);
+
+    /**
+     * 批量删除产品出库单
+     * 
+     * @param ids 需要删除的产品出库单主键集合
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetByIds(Long[] ids);
+
+    /**
+     * 删除产品出库单信息
+     * 
+     * @param id 产品出库单主键
+     * @return 结果
+     */
+    public int deleteProductDeliverySheetById(Long id);
+
+    /**
+     * 新增产品出库单
+     * @param productDeliverySheet
+     * @return
+     */
+    int insertProductDeliverySheetVo(ProductDeliverySheetVo productDeliverySheet);
+
+    /**
+     * 查看出库单详情
+     * @param id
+     * @return
+     */
+    ProductDeliverySheetVo selectProductDeliverySheetByIdVo(Long id);
+
+    /**
+     * 修改产品出库单
+     * @param productDeliverySheetVo
+     * @return
+     */
+    int updateProductDeliverySheetVo(ProductDeliverySheetVo productDeliverySheetVo);
+
+    /**
+     * 逻辑删除出库信息
+     * @param ids
+     * @return
+     */
+    int deleteProductDeliverySheetByIdsVo(Long[] ids);
+
+    /**
+     * 改状态
+     * @param productDeliverySheetVo
+     * @return
+     */
+    int productDeliverySheetChangeStatus(ProductDeliverySheetVo productDeliverySheetVo);
+
+    /**
+     * 改状态成功或者失败
+     * @param productDeliverySheetVo
+     * @return
+     */
+    String changeStatusSuccessOrfailure(ProductDeliverySheetVo productDeliverySheetVo);
+}

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionBomsDetailsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductionBomsDetails;
+
+/**
+ * 生产用料清单详细Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+public interface IProductionBomsDetailsService 
+{
+    /**
+     * 查询生产用料清单详细
+     * 
+     * @param id 生产用料清单详细主键
+     * @return 生产用料清单详细
+     */
+    public ProductionBomsDetails selectProductionBomsDetailsById(Long id);
+
+    /**
+     * 查询生产用料清单详细列表
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 生产用料清单详细集合
+     */
+    public List<ProductionBomsDetails> selectProductionBomsDetailsList(ProductionBomsDetails productionBomsDetails);
+
+    /**
+     * 新增生产用料清单详细
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 结果
+     */
+    public int insertProductionBomsDetails(ProductionBomsDetails productionBomsDetails);
+
+    /**
+     * 修改生产用料清单详细
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 结果
+     */
+    public int updateProductionBomsDetails(ProductionBomsDetails productionBomsDetails);
+
+    /**
+     * 批量删除生产用料清单详细
+     * 
+     * @param ids 需要删除的生产用料清单详细主键集合
+     * @return 结果
+     */
+    public int deleteProductionBomsDetailsByIds(Long[] ids);
+
+    /**
+     * 删除生产用料清单详细信息
+     * 
+     * @param id 生产用料清单详细主键
+     * @return 结果
+     */
+    public int deleteProductionBomsDetailsById(Long id);
+}

+ 61 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionBomsService.java

@@ -0,0 +1,61 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductionBoms;
+
+/**
+ * 生产用料清单Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+public interface IProductionBomsService 
+{
+    /**
+     * 查询生产用料清单
+     * 
+     * @param id 生产用料清单主键
+     * @return 生产用料清单
+     */
+    public ProductionBoms selectProductionBomsById(Long id);
+
+    /**
+     * 查询生产用料清单列表
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 生产用料清单集合
+     */
+    public List<ProductionBoms> selectProductionBomsList(ProductionBoms productionBoms);
+
+    /**
+     * 新增生产用料清单
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 结果
+     */
+    public int insertProductionBoms(ProductionBoms productionBoms);
+
+    /**
+     * 修改生产用料清单
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 结果
+     */
+    public int updateProductionBoms(ProductionBoms productionBoms);
+
+    /**
+     * 批量删除生产用料清单
+     * 
+     * @param ids 需要删除的生产用料清单主键集合
+     * @return 结果
+     */
+    public int deleteProductionBomsByIds(Long[] ids);
+
+    /**
+     * 删除生产用料清单信息
+     * 
+     * @param id 生产用料清单主键
+     * @return 结果
+     */
+    public int deleteProductionBomsById(Long id);
+}

+ 70 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionPlanningManagementService.java

@@ -0,0 +1,70 @@
+package com.zkqy.amichi.service;
+
+import java.util.List;
+import com.zkqy.amichi.domain.ProductionPlanningManagement;
+import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
+import com.zkqy.common.core.domain.AjaxResult;
+
+/**
+ * 生产计划Service接口
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+public interface IProductionPlanningManagementService 
+{
+    /**
+     * 查询生产计划
+     * 
+     * @param id 生产计划主键
+     * @return 生产计划
+     */
+    public AjaxResult selectProductionPlanningManagementById(Long id);
+
+    /**
+     * 查询生产计划列表
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 生产计划集合
+     */
+    public List<ProductionPlanningManagement> selectProductionPlanningManagementList(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 新增生产计划
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    public int insertProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 修改生产计划
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    public int updateProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement);
+
+    /**
+     * 批量删除生产计划
+     * 
+     * @param ids 需要删除的生产计划主键集合
+     * @return 结果
+     */
+    public int deleteProductionPlanningManagementByIds(Long[] ids);
+
+    /**
+     * 删除生产计划信息
+     * 
+     * @param id 生产计划主键
+     * @return 结果
+     */
+    public int deleteProductionPlanningManagementById(Long id);
+
+    /**
+     * 查询计划跟计划表详情
+     * @param productionPlanningManagement
+     * @return
+     */
+    List<ProductionPlanningManagementVo> selectProductionPlanningManagementListVo(ProductionPlanningManagement productionPlanningManagement);
+}

+ 7 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IProductionTasksService.java

@@ -87,4 +87,11 @@ public interface IProductionTasksService {
      *
      */
     int updateProductionTasksIn(Long[] ids);
+
+    /**
+     * 修改任务工单状态 1、发起审批 1、技术部审批都要走这个接口
+     * @param productionTasks
+     * @return
+     */
+    int changeStauts(ProductionTasksVo productionTasks);
 }

+ 10 - 2
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/IPurchaseOrderService.java

@@ -2,6 +2,7 @@ package com.zkqy.amichi.service;
 
 import java.util.List;
 import com.zkqy.amichi.domain.PurchaseOrder;
+import com.zkqy.amichi.domain.vo.PlanPurchaseOrder;
 import com.zkqy.amichi.domain.vo.PurchaseOrderVo;
 
 /**
@@ -95,8 +96,15 @@ public interface IPurchaseOrderService
 
     /**
      * 修改审批状态
-     * @param purchaseOrder
+     * @param purchaseOrderVo
+     * @return
+     */
+    int updatePurchaseOrderState(PurchaseOrderVo purchaseOrderVo);
+
+    /**
+     * 计划页面添加物料采购信息
+     * @param purchaseOrderList
      * @return
      */
-    int updatePurchaseOrderState(PurchaseOrder purchaseOrder);
+    int addPlanMaterialsPurchase(List<PlanPurchaseOrder> purchaseOrderList);
 }

+ 96 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/CustomerInformationServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.amichi.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.amichi.mapper.CustomerInformationMapper;
+import com.zkqy.amichi.domain.CustomerInformation;
+import com.zkqy.amichi.service.ICustomerInformationService;
+
+/**
+ * 客户信息Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@Service
+public class CustomerInformationServiceImpl implements ICustomerInformationService 
+{
+    @Autowired
+    private CustomerInformationMapper customerInformationMapper;
+
+    /**
+     * 查询客户信息
+     * 
+     * @param id 客户信息主键
+     * @return 客户信息
+     */
+    @Override
+    public CustomerInformation selectCustomerInformationById(Long id)
+    {
+        return customerInformationMapper.selectCustomerInformationById(id);
+    }
+
+    /**
+     * 查询客户信息列表
+     * 
+     * @param customerInformation 客户信息
+     * @return 客户信息
+     */
+    @Override
+    public List<CustomerInformation> selectCustomerInformationList(CustomerInformation customerInformation)
+    {
+        return customerInformationMapper.selectCustomerInformationList(customerInformation);
+    }
+
+    /**
+     * 新增客户信息
+     * 
+     * @param customerInformation 客户信息
+     * @return 结果
+     */
+    @Override
+    public int insertCustomerInformation(CustomerInformation customerInformation)
+    {
+        customerInformation.setCreateTime(DateUtils.getNowDate());
+        return customerInformationMapper.insertCustomerInformation(customerInformation);
+    }
+
+    /**
+     * 修改客户信息
+     * 
+     * @param customerInformation 客户信息
+     * @return 结果
+     */
+    @Override
+    public int updateCustomerInformation(CustomerInformation customerInformation)
+    {
+        customerInformation.setUpdateTime(DateUtils.getNowDate());
+        return customerInformationMapper.updateCustomerInformation(customerInformation);
+    }
+
+    /**
+     * 批量删除客户信息
+     * 
+     * @param ids 需要删除的客户信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerInformationByIds(Long[] ids)
+    {
+        return customerInformationMapper.deleteCustomerInformationByIds(ids);
+    }
+
+    /**
+     * 删除客户信息信息
+     * 
+     * @param id 客户信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteCustomerInformationById(Long id)
+    {
+        return customerInformationMapper.deleteCustomerInformationById(id);
+    }
+}

+ 271 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ExportproductionschedulingServiceImpl.java

@@ -0,0 +1,271 @@
+package com.zkqy.amichi.service.impl;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import com.zkqy.amichi.domain.ProductionTasks;
+import com.zkqy.amichi.domain.vo.ExportproductionschedulingArgumentVo;
+import com.zkqy.amichi.domain.vo.ProductionBomsDetailsVo;
+import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
+import com.zkqy.amichi.mapper.PlanTaskDetailsMapper;
+import com.zkqy.amichi.mapper.ProductionPlanningManagementMapper;
+import com.zkqy.amichi.mapper.ProductionTasksMapper;
+import com.zkqy.common.annotation.Log;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.amichi.mapper.ExportproductionschedulingMapper;
+import com.zkqy.amichi.domain.Exportproductionscheduling;
+import com.zkqy.amichi.service.IExportproductionschedulingService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 外销排产Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+@Service
+public class ExportproductionschedulingServiceImpl implements IExportproductionschedulingService 
+{
+    @Autowired
+    private ProductionTasksMapper productionTasksMapper;
+
+    @Autowired
+    private PlanTaskDetailsMapper planTaskDetailsMapper;
+
+    @Autowired
+    private ExportproductionschedulingMapper exportproductionschedulingMapper;
+
+    @Autowired
+    private ProductionPlanningManagementMapper productionPlanningManagementMapper;
+
+    /**
+     * 查询外销排产
+     * @param id 外销排产主键
+     * @return 外销排产
+     */
+    @Override
+    public Exportproductionscheduling selectExportproductionschedulingById(Long id)
+    {
+        return exportproductionschedulingMapper.selectExportproductionschedulingById(id);
+    }
+
+    /**
+     * 查询外销排产列表
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 外销排产
+     */
+    @Override
+    public List<Exportproductionscheduling> selectExportproductionschedulingList(Exportproductionscheduling exportproductionscheduling)
+    {
+        if(exportproductionscheduling.getCreateTimeHe().size()>0){
+            if(exportproductionscheduling.getCreateTimeHe().size()>=1){
+                exportproductionscheduling.setStartTime(exportproductionscheduling.getCreateTimeHe().get(0));
+            }
+            if(exportproductionscheduling.getCreateTimeHe().size()>=2){
+                exportproductionscheduling.setEndTime(exportproductionscheduling.getCreateTimeHe().get(1));
+            }
+        }
+        return exportproductionschedulingMapper.selectExportproductionschedulingList(exportproductionscheduling);
+    }
+
+    /**
+     * 新增外销排产
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 结果
+     */
+    @Override
+    public int insertExportproductionscheduling(Exportproductionscheduling exportproductionscheduling)
+    {
+        exportproductionscheduling.setCreateTime(DateUtils.getNowDate());
+        return exportproductionschedulingMapper.insertExportproductionscheduling(exportproductionscheduling);
+    }
+
+    /**
+     * 修改外销排产
+     * 
+     * @param exportproductionscheduling 外销排产
+     * @return 结果
+     */
+    @Override
+    public int updateExportproductionscheduling(Exportproductionscheduling exportproductionscheduling)
+    {
+        exportproductionscheduling.setUpdateTime(DateUtils.getNowDate());
+        return exportproductionschedulingMapper.updateExportproductionscheduling(exportproductionscheduling);
+    }
+
+    /**
+     * 批量删除外销排产
+     * 
+     * @param ids 需要删除的外销排产主键
+     * @return 结果
+     */
+    @Override
+    public int deleteExportproductionschedulingByIds(Long[] ids)
+    {
+        return exportproductionschedulingMapper.deleteExportproductionschedulingByIds(ids);
+    }
+
+    /**
+     * 删除外销排产信息
+     * 
+     * @param id 外销排产主键
+     * @return 结果
+     */
+    @Override
+    public int deleteExportproductionschedulingById(Long id)
+    {
+        return exportproductionschedulingMapper.deleteExportproductionschedulingById(id);
+    }
+
+    @Override
+    public int insertExportproductionschedulingS(List<Exportproductionscheduling> exportproductionscheduling) {
+        //批量插入明细
+        exportproductionscheduling.stream().forEach(item->{
+            item.setCreateTime(DateUtils.getNowDate());
+            item.setCreateById(SecurityUtils.getUserId());
+            item.setCreateBy(SecurityUtils.getUsername());
+            item.setDelFlag("0");
+            exportproductionschedulingMapper.insertExportproductionscheduling(item);
+        });
+        return 1;
+    }
+
+    @Override
+    @Transactional
+    public AjaxResult automaticScheduling(ExportproductionschedulingArgumentVo exportproductionschedulingVo) {
+        String cgMes="";
+        //判断是否需要创建进行采购单的创建
+        if(exportproductionschedulingVo.getBomFormTableDataS().size()>0){
+            //进行采购创建
+            cgMes= this.generatePurchaseOrder();
+        }
+        switch (exportproductionschedulingVo.getSchedulingType()) {
+            case "0":
+                //外销排产
+                System.out.println("内销排产");
+                this.exportSalesAutomaticScheduling(exportproductionschedulingVo);
+                break;
+            case "1":
+                //内销排产
+                System.out.println("外销排产");
+                this.exportSalesAutomaticScheduling(exportproductionschedulingVo);
+                break;
+            case "2":
+                //内销排产
+                System.out.println("g高压机");
+                this.exportSalesAutomaticScheduling(exportproductionschedulingVo);
+                break;
+            default:
+                System.out.println("请选择正确的排产类型");
+                return  AjaxResult.error("请选择正确的排产类型");
+        }
+        if(!cgMes.equals("")){
+            return AjaxResult.success("采购申请-自动排产成功");
+        }else {
+            return AjaxResult.success("自动排产成功");
+        }
+
+    }
+
+    /**
+     * 封装外部通讯接口(如果满足了条件)--->调用ERP的接口创建对应的采购单
+     */
+    public  String  generatePurchaseOrder(){
+        //对接采购单,ABC
+        return "success";
+    }
+
+    /**
+     * 外销排产逻辑
+     * 交货日期,工时,物料齐套
+     * 下单日期就是工单的创建时间
+     * 订单发货日期就是任务完成时间
+     *
+     * @return
+     */
+    public AjaxResult exportSalesAutomaticScheduling(ExportproductionschedulingArgumentVo exportproductionschedulingVo){
+        System.out.println(exportproductionschedulingVo.getPlanIds());
+        //拿到物料不全的订单号
+        List<ProductionBomsDetailsVo> bomFormTableDataS = exportproductionschedulingVo.getBomFormTableDataS();
+        //函数式接口(存放所有物料不够的订单号)
+        Set<String> uniqueOrderNumbers = bomFormTableDataS.parallelStream()
+                .map(ProductionBomsDetailsVo::getOrderNumber)
+                .collect(Collectors.toSet());
+        //set转成list集合
+        List<String> uniqueOrderNumbersList = new ArrayList<>(uniqueOrderNumbers);
+        //根据id查询查询计划信息
+        List<ProductionPlanningManagementVo> managementVoList = productionPlanningManagementMapper.selectProductionPlanningManagementListVoIn(exportproductionschedulingVo.getPlanIds());
+        managementVoList.parallelStream().forEach(item->{
+            Exportproductionscheduling exportproductionscheduling=new Exportproductionscheduling();
+            if(uniqueOrderNumbers.contains(item.getOrderNumber())){
+                //判断这个计划是否产生了物料部齐全的问题 0全 1不全
+                exportproductionscheduling.setMaterialNo("1");
+            }
+
+            //下单日期
+            exportproductionscheduling.setPlaceanorder(item.getPtcreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //发货日期等于完成时间+2天
+            System.out.println(item.getCompletionTime());
+            LocalDate completiontime = getLocalDateTime(item.getCompletionTime(),"yyyy-MM-dd");
+            LocalDate delivergoodsTime = completiontime.plusDays(2);
+            exportproductionscheduling.setDelivergoods(delivergoodsTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //到期提醒
+            exportproductionscheduling.setRemind("");
+            //包装=就等于完成时间
+            exportproductionscheduling.setPacking(completiontime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //测机开关箱
+            LocalDate switchasTime = completiontime.minusDays(1);
+            exportproductionscheduling.setSwitchas(switchasTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //总装
+            LocalDate finalassemblyTime = switchasTime.minusDays(1);
+            exportproductionscheduling.setFinalassembly(finalassemblyTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //压装平衡
+            LocalDate balanceTime = finalassemblyTime.minusDays(1);
+            exportproductionscheduling.setBalance(balanceTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //浸漆
+            LocalDate paintTime = balanceTime.minusDays(1);
+            exportproductionscheduling.setPaint(paintTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //线头绑扎
+            LocalDate threadheadTime = paintTime.minusDays(1);
+            exportproductionscheduling.setThreadhead(threadheadTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //绕嵌工段
+            LocalDate rqgdTime = threadheadTime.minusDays(1);
+            exportproductionscheduling.setRqgd(rqgdTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //焊接工段
+            LocalDate weldingTime = rqgdTime.minusDays(1);
+            exportproductionscheduling.setWelding(weldingTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //计划生产日期
+            exportproductionscheduling.setPlannedProductionDate(weldingTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+            //这是什么类型的排产的数据(外销)
+            exportproductionscheduling.setType(exportproductionschedulingVo.getSchedulingType());
+            //订单号
+            exportproductionscheduling.setOrderNo(item.getOrderNumber());
+            //数量台
+            exportproductionscheduling.setQuantity(item.getQuantity());
+            //工时信息(当前订单需要耗费的总工时信息)
+            exportproductionscheduling.setPlanTotalWorkingHours(item.getSparea());
+            //当前计划数据插入到排产数据中
+            int i = exportproductionschedulingMapper.insertExportproductionscheduling(exportproductionscheduling);
+        });
+        //事务生效了
+//        int i=10/0;
+        //逻辑
+        return  AjaxResult.success();
+    }
+
+    private LocalDate getLocalDateTime(String dateTime, String df){
+        return DateUtils.toLocalDate(dateTime,df);
+    }
+}

+ 96 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ManhourServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.amichi.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.amichi.mapper.ManhourMapper;
+import com.zkqy.amichi.domain.Manhour;
+import com.zkqy.amichi.service.IManhourService;
+
+/**
+ * 产品工时Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-25
+ */
+@Service
+public class ManhourServiceImpl implements IManhourService 
+{
+    @Autowired
+    private ManhourMapper manhourMapper;
+
+    /**
+     * 查询产品工时
+     * 
+     * @param id 产品工时主键
+     * @return 产品工时
+     */
+    @Override
+    public Manhour selectManhourById(Long id)
+    {
+        return manhourMapper.selectManhourById(id);
+    }
+
+    /**
+     * 查询产品工时列表
+     * 
+     * @param manhour 产品工时
+     * @return 产品工时
+     */
+    @Override
+    public List<Manhour> selectManhourList(Manhour manhour)
+    {
+        return manhourMapper.selectManhourList(manhour);
+    }
+
+    /**
+     * 新增产品工时
+     * 
+     * @param manhour 产品工时
+     * @return 结果
+     */
+    @Override
+    public int insertManhour(Manhour manhour)
+    {
+        manhour.setCreateTime(DateUtils.getNowDate());
+        return manhourMapper.insertManhour(manhour);
+    }
+
+    /**
+     * 修改产品工时
+     * 
+     * @param manhour 产品工时
+     * @return 结果
+     */
+    @Override
+    public int updateManhour(Manhour manhour)
+    {
+        manhour.setUpdateTime(DateUtils.getNowDate());
+        return manhourMapper.updateManhour(manhour);
+    }
+
+    /**
+     * 批量删除产品工时
+     * 
+     * @param ids 需要删除的产品工时主键
+     * @return 结果
+     */
+    @Override
+    public int deleteManhourByIds(Long[] ids)
+    {
+        return manhourMapper.deleteManhourByIds(ids);
+    }
+
+    /**
+     * 删除产品工时信息
+     * 
+     * @param id 产品工时主键
+     * @return 结果
+     */
+    @Override
+    public int deleteManhourById(Long id)
+    {
+        return manhourMapper.deleteManhourById(id);
+    }
+}

+ 133 - 5
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/MaterialInfoServiceImpl.java

@@ -1,17 +1,23 @@
 package com.zkqy.amichi.service.impl;
 
 import java.time.LocalDateTime;
+import java.util.ArrayList;
 import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Collectors;
 
-import com.zkqy.amichi.domain.Materialtransactionlog;
-import com.zkqy.amichi.mapper.MaterialtransactionlogMapper;
+import com.zkqy.amichi.domain.*;
+import com.zkqy.amichi.domain.vo.ProductionBomsDetailsVo;
+import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
+import com.zkqy.amichi.mapper.*;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.exception.ServiceException;
 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.amichi.mapper.MaterialInfoMapper;
-import com.zkqy.amichi.domain.MaterialInfo;
 import com.zkqy.amichi.service.IMaterialInfoService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -30,6 +36,21 @@ public class MaterialInfoServiceImpl implements IMaterialInfoService
     @Autowired
     private MaterialtransactionlogMapper materialtransactionlogMapper;
 
+    @Autowired
+    private ProductionPlanningManagementMapper productionPlanningManagementMapper;
+
+    @Autowired
+    private TaskDetailsMapper taskDetailsMapper;
+
+    @Autowired
+    private ProductionTasksMapper productionTasksMapper;
+
+    @Autowired
+    private ProductionBomsMapper productionBomsMapper;
+
+    @Autowired
+    private ProductionBomsDetailsMapper productionBomsDetailsMapper;
+
     /**
      * 查询物料信息
      * 
@@ -127,7 +148,8 @@ public class MaterialInfoServiceImpl implements IMaterialInfoService
             materialInfoMapper.updateMaterialInfoByCode(materialInfo1);
             //插入日志信息
             Materialtransactionlog materialtransactionlog=new Materialtransactionlog();
-            BeanUtils.copyProperties(materialInfo,materialtransactionlog);
+            materialInfos.get(0).setStockQuantity(materialInfo.getStockQuantity());
+            BeanUtils.copyProperties(materialInfos.get(0),materialtransactionlog);
             materialtransactionlog.setTypeOfOperation("0");//操作类型
             materialtransactionlog.setQuantity(materialInfo.getStockQuantity());//当前操作数量
             materialtransactionlog.setWarehousingTime(LocalDateTime.now());//入库时间
@@ -186,4 +208,110 @@ public class MaterialInfoServiceImpl implements IMaterialInfoService
             }
         }
     }
+
+    /**
+     * 导入物料信息
+     *
+     * @param materialInfos        物料数据列表
+     * @param updateSupport 是否更新支持,如果已存在,则进行更新数据
+     * @param operName        操作用户
+     * @return 结果
+     */
+    @Override
+    @Transactional
+    public String importMaterialInfo(List<MaterialInfo> materialInfos, boolean updateSupport, String operName) {
+        if (StringUtils.isNull(materialInfos) || materialInfos.size() == 0) {
+            throw new ServiceException("导入物料数据不能为空!");
+        }
+        int successNum = 0;
+        int failureNum = 0;
+        StringBuilder successMsg = new StringBuilder();
+        StringBuilder failureMsg = new StringBuilder();
+
+        List<MaterialInfo> toBeInserted = new ArrayList<>();
+        List<MaterialInfo> toBeUpdated = new ArrayList<>();
+
+        for (MaterialInfo materialInfo : materialInfos) {
+           if(materialInfo.getMaterialCode().equals("")||materialInfo.getMaterialCode()==null||
+              materialInfo.getMaterialName().equals("")||materialInfo.getMaterialName()==null||
+              materialInfo.getStockQuantity().equals("")||materialInfo.getStockQuantity()==null){
+              failureNum++;
+              continue;
+           }
+           //查询有没有此条数据
+           MaterialInfo materialInfo1=new MaterialInfo();
+           materialInfo1.setMaterialCode(materialInfo.getMaterialCode());
+           materialInfo1.setMaterialName(materialInfo.getMaterialName());
+           materialInfo1.setCkId(materialInfo.getCkId());
+           //根据物料编码和物料名称
+           List<MaterialInfo> materialInfos1 = materialInfoMapper.selectMaterialInfoList(materialInfo1);
+           if(materialInfos1.size()>0){
+                //假如我更新了库存这个字段
+               BeanUtils.copyProperties(materialInfo,materialInfos1.get(0), com.zkqy.common.utils.bean.BeanUtils.getNullPropertyNames(materialInfo));
+                //更新当前数据,
+                int i = materialInfoMapper.updateMaterialInfo(materialInfos1.get(0));
+                successNum++;
+           }else {
+                //插入当前数据
+//              materialInfoMapper.insertMaterialInfo(materialInfo);
+                toBeInserted.add(materialInfo);
+           }
+        }
+        //需要新增的话
+        if(toBeInserted.size()>0){
+            int insert = materialInfoMapper.batchInsert(toBeInserted);
+            successNum=successNum+insert;
+        }
+        if (failureNum > 0) {
+            failureMsg.insert(0, "很抱歉,全部导入失败!共 " + failureNum + " 条数据格式不正确");
+            throw new ServiceException(failureMsg.toString());
+        } else {
+            successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条");
+            return successMsg.toString();
+        }
+
+    }
+
+    @Override
+    public AjaxResult viewPlannedMaterialStatus(List<String> ids) {
+        //根据计划id查询所有计划下的产品信息
+        List<ProductionPlanningManagementVo> managementVoList=productionPlanningManagementMapper.selectProductionPlanningManagementListVoIn(ids);
+        //记录有那些需求单据是没有生产物料单的
+        List<String> stringList=new ArrayList<>();
+        //记录所有查询物料的bom id信息
+        List<String> idStringList=new ArrayList<>();
+        //当前所有计划进行循环
+        managementVoList.stream().forEach(item->{
+            ProductionTasks productionTasks = productionTasksMapper.selectProductionTasksById(Long.valueOf(item.getTaskId()));
+            //查询生产物料单
+            ProductionBoms productionBoms=new ProductionBoms();
+            productionBoms.setDemandDocument(productionTasks.getOrderNo());//需求单号
+            //查询生产bom信息
+            List<ProductionBoms> productionBoms1 = productionBomsMapper.selectProductionBomsList(productionBoms);
+            //当前计划有没有生产物料单?
+            if(productionBoms1.size()<=0){//一个属于这个生产的的物料bom都没有
+                stringList.add(item.getPlanNumber());
+            }else {//查询到当前生产任务单的bom信息
+                //收集所有的生产bomid
+                List<String> collect = productionBoms1.stream().map(ProductionBoms::getId).map(String::valueOf).collect(Collectors.toList());
+                idStringList.addAll(collect);
+            }
+        });
+        AtomicReference<String> mes= new AtomicReference<>("");
+        //拼接没有物料生产单的情况
+        stringList.forEach(item->{
+            if(mes.get().equals("")){
+                mes.set(item);
+            }else {
+                mes.set(mes.get()+","+item);
+            }
+        });
+        //如果有些计划他没有对应的生产物料单就不让他排产
+        if(stringList.size()>0){
+            return AjaxResult.error(501,"计划编号为:"+mes.get()+"的计划没有生产物料单,请联系管理员核对数据");
+        }
+        //查询所有的物料清单信息
+        List<ProductionBomsDetailsVo> productionBomsDetails = productionBomsDetailsMapper.selectProductionBomsDetailsListByInProductionBomId(idStringList);
+        return  AjaxResult.success(productionBomsDetails);
+    }
 }

+ 4 - 4
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/OperationInstructionServiceImpl.java

@@ -1,12 +1,12 @@
-package com.zkqy.system.service.impl;
+package com.zkqy.amichi.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.system.mapper.OperationInstructionMapper;
-import com.zkqy.system.domain.OperationInstruction;
-import com.zkqy.system.service.IOperationInstructionService;
+import  com.zkqy.amichi.mapper.OperationInstructionMapper;
+import  com.zkqy.amichi.domain.OperationInstruction;
+import  com.zkqy.amichi.service.IOperationInstructionService;
 
 /**
  * 作业指导书Service业务层处理

+ 96 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PlanTaskDetailsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.amichi.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.amichi.mapper.PlanTaskDetailsMapper;
+import com.zkqy.amichi.domain.PlanTaskDetails;
+import com.zkqy.amichi.service.IPlanTaskDetailsService;
+
+/**
+ * 生产任务单明细Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-23
+ */
+@Service
+public class PlanTaskDetailsServiceImpl implements IPlanTaskDetailsService 
+{
+    @Autowired
+    private PlanTaskDetailsMapper planTaskDetailsMapper;
+
+    /**
+     * 查询生产任务单明细
+     * 
+     * @param id 生产任务单明细主键
+     * @return 生产任务单明细
+     */
+    @Override
+    public PlanTaskDetails selectPlanTaskDetailsById(Long id)
+    {
+        return planTaskDetailsMapper.selectPlanTaskDetailsById(id);
+    }
+
+    /**
+     * 查询生产任务单明细列表
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 生产任务单明细
+     */
+    @Override
+    public List<PlanTaskDetails> selectPlanTaskDetailsList(PlanTaskDetails planTaskDetails)
+    {
+        return planTaskDetailsMapper.selectPlanTaskDetailsList(planTaskDetails);
+    }
+
+    /**
+     * 新增生产任务单明细
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    @Override
+    public int insertPlanTaskDetails(PlanTaskDetails planTaskDetails)
+    {
+        planTaskDetails.setCreateTime(DateUtils.getNowDate());
+        return planTaskDetailsMapper.insertPlanTaskDetails(planTaskDetails);
+    }
+
+    /**
+     * 修改生产任务单明细
+     * 
+     * @param planTaskDetails 生产任务单明细
+     * @return 结果
+     */
+    @Override
+    public int updatePlanTaskDetails(PlanTaskDetails planTaskDetails)
+    {
+        planTaskDetails.setUpdateTime(DateUtils.getNowDate());
+        return planTaskDetailsMapper.updatePlanTaskDetails(planTaskDetails);
+    }
+
+    /**
+     * 批量删除生产任务单明细
+     * 
+     * @param ids 需要删除的生产任务单明细主键
+     * @return 结果
+     */
+    @Override
+    public int deletePlanTaskDetailsByIds(Long[] ids)
+    {
+        return planTaskDetailsMapper.deletePlanTaskDetailsByIds(ids);
+    }
+
+    /**
+     * 删除生产任务单明细信息
+     * 
+     * @param id 生产任务单明细主键
+     * @return 结果
+     */
+    @Override
+    public int deletePlanTaskDetailsById(Long id)
+    {
+        return planTaskDetailsMapper.deletePlanTaskDetailsById(id);
+    }
+}

+ 96 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PlannedPurchaseLogServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.amichi.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.amichi.mapper.PlannedPurchaseLogMapper;
+import com.zkqy.amichi.domain.PlannedPurchaseLog;
+import com.zkqy.amichi.service.IPlannedPurchaseLogService;
+
+/**
+ * 计划采购物料日志Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-22
+ */
+@Service
+public class PlannedPurchaseLogServiceImpl implements IPlannedPurchaseLogService 
+{
+    @Autowired
+    private PlannedPurchaseLogMapper plannedPurchaseLogMapper;
+
+    /**
+     * 查询计划采购物料日志
+     * 
+     * @param id 计划采购物料日志主键
+     * @return 计划采购物料日志
+     */
+    @Override
+    public PlannedPurchaseLog selectPlannedPurchaseLogById(Long id)
+    {
+        return plannedPurchaseLogMapper.selectPlannedPurchaseLogById(id);
+    }
+
+    /**
+     * 查询计划采购物料日志列表
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 计划采购物料日志
+     */
+    @Override
+    public List<PlannedPurchaseLog> selectPlannedPurchaseLogList(PlannedPurchaseLog plannedPurchaseLog)
+    {
+        return plannedPurchaseLogMapper.selectPlannedPurchaseLogList(plannedPurchaseLog);
+    }
+
+    /**
+     * 新增计划采购物料日志
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 结果
+     */
+    @Override
+    public int insertPlannedPurchaseLog(PlannedPurchaseLog plannedPurchaseLog)
+    {
+        plannedPurchaseLog.setCreateTime(DateUtils.getNowDate());
+        return plannedPurchaseLogMapper.insertPlannedPurchaseLog(plannedPurchaseLog);
+    }
+
+    /**
+     * 修改计划采购物料日志
+     * 
+     * @param plannedPurchaseLog 计划采购物料日志
+     * @return 结果
+     */
+    @Override
+    public int updatePlannedPurchaseLog(PlannedPurchaseLog plannedPurchaseLog)
+    {
+        plannedPurchaseLog.setUpdateTime(DateUtils.getNowDate());
+        return plannedPurchaseLogMapper.updatePlannedPurchaseLog(plannedPurchaseLog);
+    }
+
+    /**
+     * 批量删除计划采购物料日志
+     * 
+     * @param ids 需要删除的计划采购物料日志主键
+     * @return 结果
+     */
+    @Override
+    public int deletePlannedPurchaseLogByIds(Long[] ids)
+    {
+        return plannedPurchaseLogMapper.deletePlannedPurchaseLogByIds(ids);
+    }
+
+    /**
+     * 删除计划采购物料日志信息
+     * 
+     * @param id 计划采购物料日志主键
+     * @return 结果
+     */
+    @Override
+    public int deletePlannedPurchaseLogById(Long id)
+    {
+        return plannedPurchaseLogMapper.deletePlannedPurchaseLogById(id);
+    }
+}

+ 96 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductDeliverySheetDetailsServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zkqy.amichi.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.amichi.mapper.ProductDeliverySheetDetailsMapper;
+import com.zkqy.amichi.domain.ProductDeliverySheetDetails;
+import com.zkqy.amichi.service.IProductDeliverySheetDetailsService;
+
+/**
+ * 出库单详情Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@Service
+public class ProductDeliverySheetDetailsServiceImpl implements IProductDeliverySheetDetailsService 
+{
+    @Autowired
+    private ProductDeliverySheetDetailsMapper productDeliverySheetDetailsMapper;
+
+    /**
+     * 查询出库单详情
+     * 
+     * @param id 出库单详情主键
+     * @return 出库单详情
+     */
+    @Override
+    public ProductDeliverySheetDetails selectProductDeliverySheetDetailsById(Long id)
+    {
+        return productDeliverySheetDetailsMapper.selectProductDeliverySheetDetailsById(id);
+    }
+
+    /**
+     * 查询出库单详情列表
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 出库单详情
+     */
+    @Override
+    public List<ProductDeliverySheetDetails> selectProductDeliverySheetDetailsList(ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        return productDeliverySheetDetailsMapper.selectProductDeliverySheetDetailsList(productDeliverySheetDetails);
+    }
+
+    /**
+     * 新增出库单详情
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 结果
+     */
+    @Override
+    public int insertProductDeliverySheetDetails(ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        productDeliverySheetDetails.setCreateTime(DateUtils.getNowDate());
+        return productDeliverySheetDetailsMapper.insertProductDeliverySheetDetails(productDeliverySheetDetails);
+    }
+
+    /**
+     * 修改出库单详情
+     * 
+     * @param productDeliverySheetDetails 出库单详情
+     * @return 结果
+     */
+    @Override
+    public int updateProductDeliverySheetDetails(ProductDeliverySheetDetails productDeliverySheetDetails)
+    {
+        productDeliverySheetDetails.setUpdateTime(DateUtils.getNowDate());
+        return productDeliverySheetDetailsMapper.updateProductDeliverySheetDetails(productDeliverySheetDetails);
+    }
+
+    /**
+     * 批量删除出库单详情
+     * 
+     * @param ids 需要删除的出库单详情主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductDeliverySheetDetailsByIds(Long[] ids)
+    {
+        return productDeliverySheetDetailsMapper.deleteProductDeliverySheetDetailsByIds(ids);
+    }
+
+    /**
+     * 删除出库单详情信息
+     * 
+     * @param id 出库单详情主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductDeliverySheetDetailsById(Long id)
+    {
+        return productDeliverySheetDetailsMapper.deleteProductDeliverySheetDetailsById(id);
+    }
+}

+ 287 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductDeliverySheetServiceImpl.java

@@ -0,0 +1,287 @@
+package  com.zkqy.amichi.service.impl;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicReference;
+
+import com.zkqy.amichi.domain.*;
+import com.zkqy.amichi.domain.vo.ProductDeliverySheetVo;
+import com.zkqy.amichi.mapper.FinishedGoodsInventoryLogMapper;
+import com.zkqy.amichi.mapper.FinishedGoodsInventoryMapper;
+import com.zkqy.amichi.mapper.ProductDeliverySheetDetailsMapper;
+import com.zkqy.common.utils.DateUtils;
+import com.zkqy.common.utils.SecurityUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import  com.zkqy.amichi.mapper.ProductDeliverySheetMapper;
+import  com.zkqy.amichi.service.IProductDeliverySheetService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 产品出库单Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-08
+ */
+@Service
+public class ProductDeliverySheetServiceImpl implements IProductDeliverySheetService 
+{
+    @Autowired
+    private ProductDeliverySheetMapper productDeliverySheetMapper;
+
+    @Autowired
+    private ProductDeliverySheetDetailsMapper productDeliverySheetDetailsMapper;
+
+    @Autowired
+    private FinishedGoodsInventoryMapper finishedGoodsInventoryMapper;
+
+    @Autowired
+    private FinishedGoodsInventoryLogMapper finishedGoodsInventoryLogMapper;
+
+    /**
+     * 查询产品出库单
+     *
+     * @param id 产品出库单主键
+     * @return 产品出库单
+     */
+    @Override
+    public ProductDeliverySheet selectProductDeliverySheetById(Long id)
+    {
+        return productDeliverySheetMapper.selectProductDeliverySheetById(id);
+    };
+
+
+
+    /**
+     * 查询产品出库单列表
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 产品出库单
+     */
+    @Override
+    public List<ProductDeliverySheet> selectProductDeliverySheetList(ProductDeliverySheet productDeliverySheet)
+    {
+        productDeliverySheet.setDelFlag("0");
+        return productDeliverySheetMapper.selectProductDeliverySheetList(productDeliverySheet);
+    }
+
+    /**
+     * 新增产品出库单
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 结果
+     */
+    @Override
+    public int insertProductDeliverySheet(ProductDeliverySheet productDeliverySheet)
+    {
+        productDeliverySheet.setCreateTime(DateUtils.getNowDate());
+        return productDeliverySheetMapper.insertProductDeliverySheet(productDeliverySheet);
+    }
+
+    /**
+     * 修改产品出库单
+     * 
+     * @param productDeliverySheet 产品出库单
+     * @return 结果
+     */
+    @Override
+    public int updateProductDeliverySheet(ProductDeliverySheet productDeliverySheet)
+    {
+        productDeliverySheet.setUpdateTime(DateUtils.getNowDate());
+        return productDeliverySheetMapper.updateProductDeliverySheet(productDeliverySheet);
+    }
+
+    /**
+     * 批量删除产品出库单
+     * 
+     * @param ids 需要删除的产品出库单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductDeliverySheetByIds(Long[] ids)
+    {
+        return productDeliverySheetMapper.deleteProductDeliverySheetByIds(ids);
+    }
+
+    /**
+     * 删除产品出库单信息
+     * 
+     * @param id 产品出库单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductDeliverySheetById(Long id)
+    {
+        return productDeliverySheetMapper.deleteProductDeliverySheetById(id);
+    }
+
+    @Override
+    @Transactional
+    public int insertProductDeliverySheetVo(ProductDeliverySheetVo productDeliverySheetVo) {
+        //TODO Auto-generated method stub
+        productDeliverySheetVo.setCreateTime(DateUtils.getNowDate());
+        productDeliverySheetVo.setCreateById(SecurityUtils.getUserId());
+        productDeliverySheetVo.setCreateBy(SecurityUtils.getUsername().toString());
+        productDeliverySheetVo.setDelFlag("0");
+        ProductDeliverySheet productDeliverySheet = new ProductDeliverySheet();
+        BeanUtils.copyProperties(productDeliverySheetVo, productDeliverySheet);
+        productDeliverySheet.setDataApprovalStatus("3");
+        productDeliverySheet.setDocumenter(SecurityUtils.getUsername().toString());//制单人
+        int i = productDeliverySheetMapper.insertProductDeliverySheet(productDeliverySheet);
+        //循环添加产品详情
+        if(productDeliverySheetVo.getProductDeliverySheetDetailsList() != null&&productDeliverySheetVo.getProductDeliverySheetDetailsList().size() > 0){
+            productDeliverySheetVo.getProductDeliverySheetDetailsList().stream().forEach(productDeliverySheetDetail -> {
+                productDeliverySheetDetail.setCreateTime(DateUtils.getNowDate());
+                productDeliverySheetDetail.setCreateById(SecurityUtils.getUserId());
+                productDeliverySheetDetail.setCreateBy(SecurityUtils.getUsername().toString());
+                productDeliverySheetDetail.setDeliveryId(productDeliverySheet.getId().toString());
+                productDeliverySheetDetail.setDelFlag("0");
+                productDeliverySheetDetailsMapper.insertProductDeliverySheetDetails(productDeliverySheetDetail);
+            });
+        }
+        return 1;
+    }
+
+    @Override
+    public ProductDeliverySheetVo selectProductDeliverySheetByIdVo(Long id) {
+        ProductDeliverySheet productDeliverySheet = productDeliverySheetMapper.selectProductDeliverySheetById(id);
+        ProductDeliverySheetVo productDeliverySheetVo = new ProductDeliverySheetVo();
+        BeanUtils.copyProperties(productDeliverySheet, productDeliverySheetVo);
+        //查询产品详情
+        ProductDeliverySheetDetails productDeliverySheetDetails = new ProductDeliverySheetDetails();
+        productDeliverySheetDetails.setDeliveryId(id.toString());
+        productDeliverySheetDetails.setDelFlag("0");
+        List<ProductDeliverySheetDetails> productDeliverySheetDetails1 = productDeliverySheetDetailsMapper.selectProductDeliverySheetDetailsList(productDeliverySheetDetails);
+        productDeliverySheetVo.setProductDeliverySheetDetailsList(productDeliverySheetDetails1);
+        return productDeliverySheetVo;
+    }
+
+    @Override
+    @Transactional
+    public int updateProductDeliverySheetVo(ProductDeliverySheetVo productDeliverySheetVo) {
+        //先删除产品详情
+        ProductDeliverySheetDetails productDeliverySheetDetails = new ProductDeliverySheetDetails();
+        productDeliverySheetDetails.setDeliveryId(productDeliverySheetVo.getId().toString());
+        productDeliverySheetDetails.setDelFlag("1");
+        productDeliverySheetDetailsMapper.updateProductDeliverySheetDetailsById(productDeliverySheetDetails);
+        //循环添加产品详情
+        if(productDeliverySheetVo.getProductDeliverySheetDetailsList() != null&&productDeliverySheetVo.getProductDeliverySheetDetailsList().size() > 0){
+            productDeliverySheetVo.getProductDeliverySheetDetailsList().stream().forEach(productDeliverySheetDetail -> {
+                productDeliverySheetDetail.setCreateTime(DateUtils.getNowDate());
+                productDeliverySheetDetail.setCreateById(SecurityUtils.getUserId());
+                productDeliverySheetDetail.setCreateBy(SecurityUtils.getUsername().toString());
+                productDeliverySheetDetail.setDeliveryId(productDeliverySheetVo.getId().toString());
+                productDeliverySheetDetail.setDelFlag("0");
+                productDeliverySheetDetailsMapper.insertProductDeliverySheetDetails(productDeliverySheetDetail);
+            });
+        }
+        //修改产品出库单
+        return productDeliverySheetMapper.updateProductDeliverySheet(productDeliverySheetVo);
+    }
+
+    @Override
+    @Transactional
+    public int deleteProductDeliverySheetByIdsVo(Long[] ids) {
+        //先删除产品详情
+        ProductDeliverySheetDetails productDeliverySheetDetails = new ProductDeliverySheetDetails();
+        productDeliverySheetDetails.setCreateTime(DateUtils.getNowDate());
+        productDeliverySheetDetails.setCreateById(SecurityUtils.getUserId());
+        productDeliverySheetDetails.setCreateBy(SecurityUtils.getUsername().toString());
+        productDeliverySheetDetails.setDelFlag("1");
+        productDeliverySheetDetailsMapper.updateProductDeliverySheetDetails(productDeliverySheetDetails);
+        ProductDeliverySheet productDeliverySheet =new ProductDeliverySheet();
+        productDeliverySheet.setUpdateTime(DateUtils.getNowDate());
+        productDeliverySheet.setUpdateById(SecurityUtils.getUserId());
+        productDeliverySheet.setUpdateBy(SecurityUtils.getUsername().toString());
+        productDeliverySheet.setDelFlag("1");
+        return productDeliverySheetMapper.updateProductDeliverySheetByIdIn(productDeliverySheet,ids);
+    }
+
+    @Override
+    public int productDeliverySheetChangeStatus(ProductDeliverySheetVo productDeliverySheetVo) {
+        ProductDeliverySheet productDeliverySheet = new ProductDeliverySheet();
+        BeanUtils.copyProperties(productDeliverySheetVo, productDeliverySheet);
+        productDeliverySheet.setUpdateById(SecurityUtils.getUserId());
+        productDeliverySheet.setUpdateBy(SecurityUtils.getUsername().toString());
+        productDeliverySheet.setUpdateTime(DateUtils.getNowDate());
+        return  productDeliverySheetMapper.updateProductDeliverySheet(productDeliverySheet);
+    }
+
+    @Override
+    public String changeStatusSuccessOrfailure(ProductDeliverySheetVo productDeliverySheetVo) {
+        ProductDeliverySheet productDeliverySheet = new ProductDeliverySheet();
+        BeanUtils.copyProperties(productDeliverySheetVo, productDeliverySheet);
+        productDeliverySheet.setUpdateById(SecurityUtils.getUserId());
+        productDeliverySheet.setUpdateBy(SecurityUtils.getUsername().toString());
+        productDeliverySheet.setUpdateTime(DateUtils.getNowDate());
+        List<String> mes=new ArrayList<>();
+        String msg="";
+        if (productDeliverySheetVo.getDataApprovalStatus().equals("1")){//通过
+            //查询出--要减去库存
+            ProductDeliverySheetDetails productDeliverySheetDetails=new ProductDeliverySheetDetails();
+            productDeliverySheetDetails.setDeliveryId(productDeliverySheet.getId().toString());
+            productDeliverySheetDetails.setDelFlag("0");
+            List<ProductDeliverySheetDetails> productDeliverySheetDetails1 = productDeliverySheetDetailsMapper.selectProductDeliverySheetDetailsList(productDeliverySheetDetails);
+            for (ProductDeliverySheetDetails productDetail : productDeliverySheetDetails1) {
+                //查询要出库的产品数量够不够
+                FinishedGoodsInventory finishedGoodsInventory = new FinishedGoodsInventory();
+                finishedGoodsInventory.setProductName(productDetail.getProductName());//产品名称
+                finishedGoodsInventory.setModelNumber(productDetail.getModelNumber());//型号
+                List<FinishedGoodsInventory> finishedGoodsInventories = finishedGoodsInventoryMapper.selectFinishedGoodsInventoryList(finishedGoodsInventory);
+                if(Double.parseDouble(finishedGoodsInventories.get(0).getTotalInventory())<=Double.parseDouble(productDetail.getQuantity())){
+                    mes.add(finishedGoodsInventories.get(0).getProductName());
+                }
+            }
+            if(mes.size()>0){
+                for (String s : mes) {
+                   msg=s.toString()+",";
+                }
+                return msg+"库存不足";
+            }else {
+                for (ProductDeliverySheetDetails productDetail : productDeliverySheetDetails1) {
+                    //查询要出库的产品数量够不够
+                    FinishedGoodsInventory finishedGoodsInventory = new FinishedGoodsInventory();
+                    finishedGoodsInventory.setProductName(productDetail.getProductName());//铲平名称
+                    finishedGoodsInventory.setModelNumber(productDetail.getModelNumber());//型号
+                    List<FinishedGoodsInventory> finishedGoodsInventories = finishedGoodsInventoryMapper.selectFinishedGoodsInventoryList(finishedGoodsInventory);
+                    String totalInventory= String.valueOf(Double.parseDouble(finishedGoodsInventories.get(0).getTotalInventory()) - Double.parseDouble(productDetail.getQuantity()));
+                    finishedGoodsInventories.get(0).setTotalInventory(totalInventory);
+                    FinishedGoodsInventory finishedGoodsInventories1 = new FinishedGoodsInventory();
+                    finishedGoodsInventories1.setId(finishedGoodsInventories.get(0).getId());
+                    finishedGoodsInventories1.setTotalInventory(totalInventory);
+                    finishedGoodsInventoryMapper.updateFinishedGoodsInventory(finishedGoodsInventories1);
+                    //插入出库日志信息
+                    FinishedGoodsInventoryLog finishedGoodsInventoryLog = new FinishedGoodsInventoryLog();
+                    finishedGoodsInventoryLog.setMaterialCode(finishedGoodsInventories.get(0).getMaterialCode());
+                    finishedGoodsInventoryLog.setProductName(finishedGoodsInventories.get(0).getProductName());
+                    finishedGoodsInventoryLog.setModelNumber(productDetail.getModelNumber());
+                    finishedGoodsInventoryLog.setUnit(productDetail.getUnit());
+                    finishedGoodsInventoryLog.setOutInQuantity(productDetail.getQuantity());
+                    //订单号
+                    finishedGoodsInventoryLog.setProductionOrderNumber(productDeliverySheet.getOrderNumber());
+                    //单据编号
+                    finishedGoodsInventoryLog.setWarehouseEntryNumber(productDeliverySheet.getDocumentNumber());
+                    //合同号
+                    finishedGoodsInventoryLog.setProductionTaskOrderNumber(productDeliverySheet.getContactNumber());
+                    //制单时间
+                    finishedGoodsInventoryLog.setDocumentPreparationTime(productDeliverySheet.getCreateTime());
+                    //制单人
+                    finishedGoodsInventoryLog.setDocumenter(productDeliverySheet.getDocumenter());
+                    //审核
+                    finishedGoodsInventoryLog.setAuditor(SecurityUtils.getUsername());
+                    finishedGoodsInventoryLog.setCreateBy(SecurityUtils.getUsername());
+                    finishedGoodsInventoryLog.setCreateById(SecurityUtils.getUserId());
+                    finishedGoodsInventoryLog.setCreateTime(new Date());
+                    finishedGoodsInventoryLog.setTypeOfOperation("1");//1是出库
+                    finishedGoodsInventoryLogMapper.insertFinishedGoodsInventoryLog(finishedGoodsInventoryLog);
+                }
+            }
+        }
+        //更新审批人信息
+        productDeliverySheet.setAuditor(SecurityUtils.getUsername());
+        int i = productDeliverySheetMapper.updateProductDeliverySheet(productDeliverySheet);
+        return "审批成功-已成功出库";
+    }
+}

+ 97 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionBomsDetailsServiceImpl.java

@@ -0,0 +1,97 @@
+package com.zkqy.amichi.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.amichi.mapper.ProductionBomsDetailsMapper;
+import com.zkqy.amichi.domain.ProductionBomsDetails;
+import com.zkqy.amichi.service.IProductionBomsDetailsService;
+
+/**
+ * 生产用料清单详细Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+@Service
+public class ProductionBomsDetailsServiceImpl implements IProductionBomsDetailsService 
+{
+    @Autowired
+    private ProductionBomsDetailsMapper productionBomsDetailsMapper;
+
+    /**
+     * 查询生产用料清单详细
+     * 
+     * @param id 生产用料清单详细主键
+     * @return 生产用料清单详细
+     */
+    @Override
+    public ProductionBomsDetails selectProductionBomsDetailsById(Long id)
+    {
+        return productionBomsDetailsMapper.selectProductionBomsDetailsById(id);
+    }
+
+    /**
+     * 查询生产用料清单详细列表
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 生产用料清单详细
+     */
+    @Override
+    public List<ProductionBomsDetails> selectProductionBomsDetailsList(ProductionBomsDetails productionBomsDetails)
+    {
+        return productionBomsDetailsMapper.selectProductionBomsDetailsList(productionBomsDetails);
+    }
+
+    /**
+     * 新增生产用料清单详细
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 结果
+     */
+    @Override
+    public int insertProductionBomsDetails(ProductionBomsDetails productionBomsDetails)
+    {
+        productionBomsDetails.setCreateTime(DateUtils.getNowDate());
+        productionBomsDetails.setDelFlag("0");
+        return productionBomsDetailsMapper.insertProductionBomsDetails(productionBomsDetails);
+    }
+
+    /**
+     * 修改生产用料清单详细
+     * 
+     * @param productionBomsDetails 生产用料清单详细
+     * @return 结果
+     */
+    @Override
+    public int updateProductionBomsDetails(ProductionBomsDetails productionBomsDetails)
+    {
+        productionBomsDetails.setUpdateTime(DateUtils.getNowDate());
+        return productionBomsDetailsMapper.updateProductionBomsDetails(productionBomsDetails);
+    }
+
+    /**
+     * 批量删除生产用料清单详细
+     * 
+     * @param ids 需要删除的生产用料清单详细主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductionBomsDetailsByIds(Long[] ids)
+    {
+        return productionBomsDetailsMapper.deleteProductionBomsDetailsByIds(ids);
+    }
+
+    /**
+     * 删除生产用料清单详细信息
+     * 
+     * @param id 生产用料清单详细主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductionBomsDetailsById(Long id)
+    {
+        return productionBomsDetailsMapper.deleteProductionBomsDetailsById(id);
+    }
+}

+ 97 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionBomsServiceImpl.java

@@ -0,0 +1,97 @@
+package com.zkqy.amichi.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.amichi.mapper.ProductionBomsMapper;
+import com.zkqy.amichi.domain.ProductionBoms;
+import com.zkqy.amichi.service.IProductionBomsService;
+
+/**
+ * 生产用料清单Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-18
+ */
+@Service
+public class ProductionBomsServiceImpl implements IProductionBomsService 
+{
+    @Autowired
+    private ProductionBomsMapper productionBomsMapper;
+
+    /**
+     * 查询生产用料清单
+     * 
+     * @param id 生产用料清单主键
+     * @return 生产用料清单
+     */
+    @Override
+    public ProductionBoms selectProductionBomsById(Long id)
+    {
+        return productionBomsMapper.selectProductionBomsById(id);
+    }
+
+    /**
+     * 查询生产用料清单列表
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 生产用料清单
+     */
+    @Override
+    public List<ProductionBoms> selectProductionBomsList(ProductionBoms productionBoms)
+    {
+        return productionBomsMapper.selectProductionBomsList(productionBoms);
+    }
+
+    /**
+     * 新增生产用料清单
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 结果
+     */
+    @Override
+    public int insertProductionBoms(ProductionBoms productionBoms)
+    {
+        productionBoms.setCreateTime(DateUtils.getNowDate());
+        productionBoms.setDelFlag("0");
+        return productionBomsMapper.insertProductionBoms(productionBoms);
+    }
+
+    /**
+     * 修改生产用料清单
+     * 
+     * @param productionBoms 生产用料清单
+     * @return 结果
+     */
+    @Override
+    public int updateProductionBoms(ProductionBoms productionBoms)
+    {
+        productionBoms.setUpdateTime(DateUtils.getNowDate());
+        return productionBomsMapper.updateProductionBoms(productionBoms);
+    }
+
+    /**
+     * 批量删除生产用料清单
+     * 
+     * @param ids 需要删除的生产用料清单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductionBomsByIds(Long[] ids)
+    {
+        return productionBomsMapper.deleteProductionBomsByIds(ids);
+    }
+
+    /**
+     * 删除生产用料清单信息
+     * 
+     * @param id 生产用料清单主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductionBomsById(Long id)
+    {
+        return productionBomsMapper.deleteProductionBomsById(id);
+    }
+}

+ 159 - 0
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionPlanningManagementServiceImpl.java

@@ -0,0 +1,159 @@
+package com.zkqy.amichi.service.impl;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import com.zkqy.amichi.domain.PlanTaskDetails;
+import com.zkqy.amichi.domain.ProductionTasks;
+import com.zkqy.amichi.domain.TaskDetails;
+import com.zkqy.amichi.domain.vo.ProductionPlanningManagementVo;
+import com.zkqy.amichi.mapper.PlanTaskDetailsMapper;
+import com.zkqy.amichi.mapper.ProductionTasksMapper;
+import com.zkqy.amichi.service.ITaskDetailsService;
+import com.zkqy.common.core.domain.AjaxResult;
+import com.zkqy.common.utils.DateUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.zkqy.amichi.mapper.ProductionPlanningManagementMapper;
+import com.zkqy.amichi.domain.ProductionPlanningManagement;
+import com.zkqy.amichi.service.IProductionPlanningManagementService;
+
+/**
+ * 生产计划Service业务层处理
+ * 
+ * @author zkqy
+ * @date 2024-07-09
+ */
+@Service
+public class ProductionPlanningManagementServiceImpl implements IProductionPlanningManagementService 
+{
+
+    @Autowired
+    private ProductionPlanningManagementMapper productionPlanningManagementMapper;
+
+    @Autowired
+    private ITaskDetailsService taskDetailsService;
+
+    @Autowired
+    private ProductionTasksMapper productionTasksMapper;
+
+    @Autowired
+    private PlanTaskDetailsMapper planTaskDetailsMapper;
+
+
+    /**
+     * 查询生产计划
+     * 
+     * @param id 生产计划主键
+     * @return 生产计划
+     */
+    @Override
+    public AjaxResult selectProductionPlanningManagementById(Long id)
+    {
+        ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
+        productionPlanningManagement.setId(id);
+        List<ProductionPlanningManagementVo> productionPlanningManagementVos = productionPlanningManagementMapper.selectProductionPlanningManagementListVo(productionPlanningManagement);
+        if(productionPlanningManagementVos.size()>0){
+            Long planId = productionPlanningManagement.getId();
+            //查询计划详细信息
+            PlanTaskDetails planTaskDetails1=new PlanTaskDetails();
+            planTaskDetails1.setPlanId(planId);
+            List<PlanTaskDetails> planTaskDetails = planTaskDetailsMapper.selectPlanTaskDetailsList(planTaskDetails1);
+            //保存当前计划的详细信息
+            productionPlanningManagementVos.get(0).setPlanTaskDetails(planTaskDetails);
+            return  AjaxResult.success(productionPlanningManagementVos.get(0));
+        }
+        return AjaxResult.error(500,"未查询到当前计划数据");
+    }
+
+    /**
+     * 查询生产计划列表
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 生产计划
+     */
+    @Override
+    public List<ProductionPlanningManagement> selectProductionPlanningManagementList(ProductionPlanningManagement productionPlanningManagement)
+    {
+        return productionPlanningManagementMapper.selectProductionPlanningManagementList(productionPlanningManagement);
+    }
+
+    /**
+     * 新增生产计划
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    @Override
+    public int insertProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement)
+    {
+        productionPlanningManagement.setCreateTime(DateUtils.getNowDate());
+        return productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
+    }
+
+    /**
+     * 修改生产计划
+     * 
+     * @param productionPlanningManagement 生产计划
+     * @return 结果
+     */
+    @Override
+    public int updateProductionPlanningManagement(ProductionPlanningManagement productionPlanningManagement)
+    {
+        productionPlanningManagement.setUpdateTime(DateUtils.getNowDate());
+        return productionPlanningManagementMapper.updateProductionPlanningManagement(productionPlanningManagement);
+    }
+
+    /**
+     * 批量删除生产计划
+     * 
+     * @param ids 需要删除的生产计划主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductionPlanningManagementByIds(Long[] ids)
+    {
+        return productionPlanningManagementMapper.deleteProductionPlanningManagementByIds(ids);
+    }
+
+    /**
+     * 删除生产计划信息
+     * 
+     * @param id 生产计划主键
+     * @return 结果
+     */
+    @Override
+    public int deleteProductionPlanningManagementById(Long id)
+    {
+        return productionPlanningManagementMapper.deleteProductionPlanningManagementById(id);
+    }
+
+    @Override
+    public List<ProductionPlanningManagementVo> selectProductionPlanningManagementListVo(ProductionPlanningManagement productionPlanningManagement) {
+        //查询计划信息
+        List<ProductionPlanningManagementVo> productionPlanningManagements = productionPlanningManagementMapper.selectProductionPlanningManagementListVo(productionPlanningManagement);
+        //当前计划信息循环
+        List<ProductionPlanningManagementVo> collect = productionPlanningManagements.stream().map(item -> {
+           /** //查询当前计划的详情信息
+            TaskDetails taskDetails = new TaskDetails();
+            taskDetails.setTaskId(item.getTaskId());
+            List<TaskDetails> taskDetails1 = taskDetailsService.selectTaskDetailsList(taskDetails);
+            //保存当前计划的详细信息
+            item.setTaskDetails(taskDetails1);**/
+            //查询计划详细信息
+            PlanTaskDetails planTaskDetails1=new PlanTaskDetails();
+            planTaskDetails1.setPlanId(item.getId());
+            List<PlanTaskDetails> planTaskDetails = planTaskDetailsMapper.selectPlanTaskDetailsList(planTaskDetails1);
+            item.setPlanTaskDetails(planTaskDetails);
+            //查询任务单信息(主要是为了拿订单号,或者其他信息,这里面我没有做字段冗余)
+            ProductionTasks productionTasks = productionTasksMapper.selectProductionTasksById(Long.valueOf(item.getTaskId()));
+            Long id1 = item.getId();
+            BeanUtils.copyProperties(productionTasks,item);
+            item.setId(id1);
+            return item;
+        }).collect(Collectors.toList());
+        //返回信息
+        return collect;
+    }
+}

+ 134 - 5
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/ProductionTasksServiceImpl.java

@@ -1,17 +1,22 @@
 package com.zkqy.amichi.service.impl;
 
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
+import java.util.Date;
 import java.util.List;
+import java.util.Random;
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.atomic.AtomicReference;
 
-import com.zkqy.amichi.domain.TaskDetails;
+import com.zkqy.amichi.domain.*;
 import com.zkqy.amichi.domain.vo.ProductionTasksVo;
-import com.zkqy.amichi.mapper.TaskDetailsMapper;
+import com.zkqy.amichi.mapper.*;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.SecurityUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.stereotype.Service;
-import com.zkqy.amichi.mapper.ProductionTasksMapper;
-import com.zkqy.amichi.domain.ProductionTasks;
 import com.zkqy.amichi.service.IProductionTasksService;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -30,6 +35,18 @@ public class ProductionTasksServiceImpl implements IProductionTasksService {
     @Autowired
     private TaskDetailsMapper  taskDetailsMapper;
 
+    @Autowired
+    private  ProductionPlanningManagementMapper productionPlanningManagementMapper;
+
+    @Autowired
+    private PlanTaskDetailsMapper planTaskDetailsMapper;
+
+    @Autowired
+    private ManhourMapper manhourMapper;
+
+    @Autowired
+    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
+
     /**
      * 查询生产任务单
      * 
@@ -120,13 +137,15 @@ public class ProductionTasksServiceImpl implements IProductionTasksService {
     @Transactional
     public int insertProductionTasksVo(ProductionTasksVo productionTasks) {
         productionTasks.setCreator(SecurityUtils.getUsername());//制单人
+        productionTasks.setCreateBy(SecurityUtils.getUsername());//创建人
+        productionTasks.setCreateTime(new Date());//创建时间
+        productionTasks.setState("0");//初始状态为待发起 0待发起 1技术部审批 2经理审批 3通过 4驳回
         int i = productionTasksMapper.insertProductionTasks(productionTasks);
         productionTasks.getTaskDetails().forEach(item->{
             item.setTaskId(productionTasks.getId().toString());
             int i1 = taskDetailsMapper.insertTaskDetails(item);
         });
         return 1;
-
     }
 
     @Override
@@ -150,4 +169,114 @@ public class ProductionTasksServiceImpl implements IProductionTasksService {
         taskDetailsMapper.updateTaskDetailsInTaskId(ids);
         return productionTasksMapper.updateProductionTasksIn(ids);
     }
+
+//    @Override
+//    public int changeStauts(ProductionTasksVo productionTasks) {
+//        ProductionTasks productionTasks1=new ProductionTasks();
+//        productionTasks1.setState(productionTasks.getState());//
+//        productionTasks1.setId(productionTasks.getId());
+//        if(productionTasks.getState().equals("2")){ //0待发起 1技术部审批 2经理审批 3通过 4驳回
+//            //变成2 说明是技术部
+//            productionTasks1.setSparea(productionTasks.getSparea());//技术部审批意见
+//            productionTasks1.setTechnology(SecurityUtils.getUsername());//技术部审批人
+//        }else if(productionTasks.getState().equals("3")){ //要通过了说明是经理审批
+//            //变成3 说明是经理
+//            productionTasks1.setSpareb(productionTasks.getSpareb());//经理审批意见
+//            productionTasks1.setGeneral(SecurityUtils.getUsername());//经理审批人
+//            //添加任务单明细到计划表中
+//            //查询任务单明细
+//            List<TaskDetails> taskDetails = taskDetailsMapper.selectTaskDetailsListByTaskId(productionTasks1.getId().toString());
+//            //添加到计划表中
+//            taskDetails.forEach(item->{
+//                ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
+//                BeanUtils.copyProperties(item,productionPlanningManagement);//赋值给计划信息
+//                productionPlanningManagement.setLengthas(item.getLength());//长度
+//                productionPlanningManagement.setModelas(item.getModel());//型号
+//                productionPlanningManagement.setPlanName(item.getModel());//计划名称
+//                productionPlanningManagement.setTaskStatus("0");//状态
+//                productionPlanningManagement.setPlanNumber(returnString());//任务类型 1生产任务单
+//                productionPlanningManagement.setTaskId(item.getTaskId());//任务单id
+//                productionPlanningManagement.setCompletionTime(productionTasks.getCompletiontime());//完成时间
+//                //添加计划成功
+//                productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
+//            });
+//        }
+//        return productionTasksMapper.updateProductionTasks(productionTasks1);
+//    }
+    @Override
+    public int changeStauts(ProductionTasksVo productionTasks) {
+        ProductionTasks productionTasks1=new ProductionTasks();
+        productionTasks1.setState(productionTasks.getState());//
+        productionTasks1.setId(productionTasks.getId());
+        if(productionTasks.getState().equals("3")){ //0待发起 1技术部审批 2经理审批(20240715开会决定不需要经理审批) 3通过 4驳回
+            //变成3 说明是经理
+//            productionTasks1.setSpareb(productionTasks.getSpareb());//经理审批意见
+//            productionTasks1.setGeneral(SecurityUtils.getUsername());//经理审批人
+
+            productionTasks1.setSparea(productionTasks.getSpareb());//技术部门
+            productionTasks1.setTechnology(SecurityUtils.getUsername());//经理
+            //添加任务单明细到计划表中
+            //查询任务单明细
+            List<TaskDetails> taskDetails = taskDetailsMapper.selectTaskDetailsListByTaskId(productionTasks1.getId().toString());
+            //任务单信息
+            ProductionTasks productionTasks2 = productionTasksMapper.selectProductionTasksById(productionTasks1.getId());
+            ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
+            productionPlanningManagement.setTaskStatus("2");//状态
+            productionPlanningManagement.setPlanNumber(returnString());//任务编号
+            productionPlanningManagement.setTaskId(productionTasks2.getId().toString());//任务单id
+            productionPlanningManagement.setOrderNumber(productionTasks.getOrderNo());//订单号
+            productionPlanningManagement.setContractNumber(productionTasks.getContractNo());//合同号
+            productionPlanningManagement.setCompletionTime(productionTasks.getCompletiontime());//完成时间
+            productionPlanningManagement.setQuantity(productionTasks.getTotal());//生产总数量
+            productionPlanningManagement.setPlanType("0");
+
+            //计划总数
+            AtomicReference<Double> totalTime = new AtomicReference<>(0.0);
+            //添加到计划表中
+            taskDetails.forEach(item->{
+                //计算工时信息
+                String[] split = item.getModel().split("-");
+                if(split.length>=2){
+                    Manhour manhour=new Manhour();
+                    manhour.setProductModel(split[0]);
+                    manhour.setProductSpecification(split[1]);
+                    //规格型号
+                    List<Manhour> manhours = manhourMapper.selectManhourList(manhour);
+                    if(manhours.size()>0){
+                        //迭代工时
+                        totalTime.updateAndGet(v -> new Double(v + Double.parseDouble(manhours.get(0).getManhourspent())));
+                    }
+                }
+            });
+            productionPlanningManagement.setSparea(totalTime.get().toString());//存这个时间计算出来的东西
+            //把计划添加进去
+            productionPlanningManagementMapper.insertProductionPlanningManagement(productionPlanningManagement);
+            //添加到计划表中
+            taskDetails.forEach(item->{
+                //添加详情信息到计划信息中
+                PlanTaskDetails planTaskDetails=new PlanTaskDetails();
+                BeanUtils.copyProperties(item,planTaskDetails);
+                planTaskDetails.setPlanId(productionPlanningManagement.getId());//计划id
+                planTaskDetailsMapper.insertPlanTaskDetails(planTaskDetails);//循环添加计划信息
+            });
+        }
+        return productionTasksMapper.updateProductionTasks(productionTasks1);
+    }
+
+    public  String   returnString(){
+        // 当前日期
+        LocalDate now = LocalDate.now();
+        // 日期格式化为 "YYYYMMdd"
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
+        String formattedDate = now.format(formatter);
+        // 生成5位随机数
+        Random random = new Random();
+        int randomNumber = random.nextInt(99999); // [0, 99999)
+        if (randomNumber < 10000) { // 确保是5位数,不足前面补0
+            String numStr = String.format("%05d", randomNumber);
+            randomNumber = Integer.parseInt(numStr);
+        }
+        //拼接最终的计划编号
+        return "RW" + formattedDate + randomNumber;
+    }
 }

+ 127 - 20
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/PurchaseOrderServiceImpl.java

@@ -2,13 +2,18 @@ package com.zkqy.amichi.service.impl;
 
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
 import java.util.Date;
 import java.util.List;
+import java.util.Random;
 import java.util.stream.Collectors;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.zkqy.amichi.domain.Pocurementdetails;
+import com.zkqy.amichi.domain.vo.PlanPurchaseOrder;
 import com.zkqy.amichi.domain.vo.PurchaseOrderVo;
 import com.zkqy.amichi.mapper.PocurementdetailsMapper;
+import com.zkqy.common.annotation.Excel;
 import com.zkqy.common.utils.DateUtils;
 import com.zkqy.common.utils.SecurityUtils;
 import org.springframework.beans.BeanUtils;
@@ -105,24 +110,39 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
     @Transactional
     public int updatePurchaseOrderVo(PurchaseOrderVo purchaseOrder) {
         //删除旧的采购单数据
-        List<String> collect = purchaseOrder.getPocurementdetailsList().stream().map(Pocurementdetails::getPurchaseId).collect(Collectors.toList());
-        if (collect.size() > 0) {
-            // 使用流和map将List<String>转换为Long[]
-            Long[] longArray = collect.stream()
-                    .map(Long::valueOf) // 将String转换为Long
-                    .toArray(Long[]::new);
-            //这里应该改成逻辑删除
-//            pocurementdetailsMapper.deletePocurementdetailsByIds(longArray);
-            //逻辑删除
-            pocurementdetailsMapper.updatePocurementdetailsByIdsDelete(longArray);
-        }
+//        List<String> collect = purchaseOrder.getPocurementdetailsList().stream().map(Pocurementdetails::getPurchaseId).collect(Collectors.toList());
+//        if (collect.size() > 0) {
+//            // 使用流和map将List<String>转换为Long[]
+//            Long[] longArray = collect.stream()
+//                    .map(Long::valueOf) // 将String转换为Long
+//                    .toArray(Long[]::new);
+//            //这里应该改成逻辑删除
+////            pocurementdetailsMapper.deletePocurementdetailsByIds(longArray);
+//            //逻辑删除
+//            pocurementdetailsMapper.updatePocurementdetailsByIdsDelete(longArray);
+//        }
+        Pocurementdetails pocurementdetails=new Pocurementdetails();
+        pocurementdetails.setDelFlag("1");
+        pocurementdetails.setPurchaseId(purchaseOrder.getId().toString());
+        pocurementdetails.setUpdateBy(SecurityUtils.getUsername());
+        pocurementdetails.setUpdateById(SecurityUtils.getUserId());
+        pocurementdetails.setUpdateTime(new Date());//日期
+        pocurementdetailsMapper.updatePocurementdetailsPurchaseId(pocurementdetails);
         //修改采购单数据
         purchaseOrder.setUpdateBy(SecurityUtils.getUsername());
         purchaseOrder.setUpdateById(SecurityUtils.getUserId());
-        purchaseOrder.setCreateTime(new Date());
+        purchaseOrder.setUpdateTime(new Date());
         int i = purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
+        List<Pocurementdetails> collect = purchaseOrder.getPocurementdetailsList().stream().map(item -> {
+            item.setPurchaseId(purchaseOrder.getId().toString());
+            item.setDelFlag("0");
+            item.setCreateBy(SecurityUtils.getUsername());
+            item.setCreateById(SecurityUtils.getUserId());
+            item.setCreateTime(new Date());
+            return item;
+        }).collect(Collectors.toList());
         //从新插入订单数据
-        int i1 = pocurementdetailsMapper.insertPocurementdetailsBatch(purchaseOrder.getPocurementdetailsList());
+        int i1 = pocurementdetailsMapper.insertPocurementdetailsBatch(collect);
         return 1;
     }
 
@@ -153,8 +173,6 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
     @Override
     @Transactional
     public int insertPurchaseOrderVo(PurchaseOrderVo purchaseOrderVo) {
-
-
         //创建人
         purchaseOrderVo.setCreatepeople(SecurityUtils.getUsername());
         //审批状态(0:待审批,1:通过 2:驳回 3:待发起)
@@ -199,15 +217,104 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
     }
 
     @Override
-    public int updatePurchaseOrderState(PurchaseOrder purchaseOrder) {
-        //审批人
-        purchaseOrder.setApproval(SecurityUtils.getUsername());
-        //审批时间
-        purchaseOrder.setApprovaltime(LocalDateTime.now());
+    public int updatePurchaseOrderState(PurchaseOrderVo purchaseOrder) {
+        if(purchaseOrder.getState().equals("1")||purchaseOrder.getState().equals("2")){ //通过或者拒绝的时候记录审批信息
+            //审批人
+            purchaseOrder.setApproval(SecurityUtils.getUsername());
+            //审批时间
+            purchaseOrder.setApprovaltime(LocalDateTime.now());
+            if(purchaseOrder.getState().equals("1")){
+                //改审批详情(审批人需要确定我批多少)
+                purchaseOrder.getPocurementdetailsList().stream().forEach(item->{
+                    item.setUpdateTime(new Date());
+                    item.setUpdateById(SecurityUtils.getUserId());
+                    item.setUpdateBy(SecurityUtils.getUsername());
+                    item.setDelFlag("");//置空要不然状态也改了
+                    pocurementdetailsMapper.updatePocurementdetails(item);
+                });
+            }
+        }
         //修改时间
         purchaseOrder.setUpdateTime(DateUtils.getNowDate());
         purchaseOrder.setUpdateById(SecurityUtils.getUserId());
         purchaseOrder.setUpdateBy(SecurityUtils.getUsername());
         return purchaseOrderMapper.updatePurchaseOrder(purchaseOrder);
     }
+
+    @Override
+    public int addPlanMaterialsPurchase(List<PlanPurchaseOrder> purchaseOrderList) {
+        PurchaseOrderVo purchaseOrderVo=new PurchaseOrderVo();
+        //创建人
+        purchaseOrderVo.setCreatepeople(SecurityUtils.getUsername());
+        //审批状态(0:待审批,1:通过 2:驳回 3:待发起)
+        purchaseOrderVo.setState("3");
+        //删除状态
+        purchaseOrderVo.setDelFlag("0");
+        //创建者id
+        purchaseOrderVo.setCreateById(SecurityUtils.getUserId());
+        //创建者
+        purchaseOrderVo.setCreateBy(SecurityUtils.getUsername());
+        //创建时间
+        purchaseOrderVo.setCreateTime(new Date());
+        //采购编号(日期时间加随机数)
+        purchaseOrderVo.setNumber(this.generatePurchaseNumber(4));
+        //申请组织
+        purchaseOrderVo.setApply("福建铨一电源科技");
+        //币别
+        purchaseOrderVo.setCurrency("人民币");
+        //申请日期
+        purchaseOrderVo.setApplytime(LocalDate.now());
+        //申请部门
+        purchaseOrderVo.setDepartment("生产计划部");
+        //合计金额
+        purchaseOrderVo.setTotal(0L);
+        //备注
+        purchaseOrderVo.setRemark("");
+        //申请人
+        purchaseOrderVo.setApplypeople(SecurityUtils.getUsername());
+        //创建人
+        purchaseOrderVo.setCreatepeople(SecurityUtils.getUsername());
+        //插入采购信息
+        int i1 = purchaseOrderMapper.insertPurchaseOrder(purchaseOrderVo);
+        //添加采购详情
+        purchaseOrderList.forEach(item->{
+
+        });
+        //插入采购详情信息
+        return 0;
+    }
+    /**
+     * 生成一个采购编号
+     *
+     * @param randomLength 随机数的长度(4或5)
+     * @return 返回生成的采购编号字符串
+     */
+    public static String generatePurchaseNumber(int randomLength) {
+        if (randomLength != 4 && randomLength != 5) {
+            throw new IllegalArgumentException("Random length must be 4 or 5.");
+        }
+
+        // 获取当前时间
+        LocalDateTime now = LocalDateTime.now();
+
+        // 定义日期时间格式化器
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+
+        // 格式化当前时间
+        String formattedDateTime = now.format(formatter);
+
+        // 生成随机数
+        Random random = new Random();
+        int randomNumber = random.nextInt((int)Math.pow(10, randomLength));
+
+        // 将随机数转换为字符串并补零
+        String randomString = String.format("%0" + randomLength + "d", randomNumber);
+
+        // 构建采购编号
+        String purchaseNumber = "CG" + formattedDateTime + randomString;
+
+        return purchaseNumber;
+    }
 }
+
+

+ 52 - 31
zkqy-fujian-amichi/src/main/java/com/zkqy/amichi/service/impl/WarehouseEntryInformationServiceImpl.java

@@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
 
 /**
  * 入库单信息Service业务层处理
- * 
  * @author zkqy
  * @date 2024-07-03
  */
@@ -81,6 +80,7 @@ public class WarehouseEntryInformationServiceImpl implements IWarehouseEntryInfo
      * @return 结果
      */
     @Override
+    @Transactional
     public int updateWarehouseEntryInformation(WarehouseEntryInformation warehouseEntryInformation)
     {
         warehouseEntryInformation.setUpdateTime(DateUtils.getNowDate());
@@ -88,35 +88,53 @@ public class WarehouseEntryInformationServiceImpl implements IWarehouseEntryInfo
             //合并入库信息
             //下查询有没有当前的入库单详细信息
             List<StoreEntryDetails> storeEntryDetails = storeEntryDetailsMapper.selectWarehouseEntryInformationByWarehouseEtryId(warehouseEntryInformation.getId());
-            if(storeEntryDetails.size()>0){
-                //更新入库单信息
-                storeEntryDetails.stream().forEach(storeEntryDetail -> {
-                    FinishedGoodsInventory finishedGoodsInventory = new FinishedGoodsInventory();
-                    finishedGoodsInventory.setMaterialCode(storeEntryDetail.getMaterialCode());
-                    finishedGoodsInventory.setProductName(storeEntryDetail.getProductName());
-                    List<FinishedGoodsInventory> finishedGoodsInventories = finishedGoodsInventoryMapper.selectFinishedGoodsInventoryList(finishedGoodsInventory);
-                    if(finishedGoodsInventories.size()>0){
-                        //更新成品库存信息
-                        FinishedGoodsInventory finishedGoodsInventory1 = finishedGoodsInventories.get(0);
-                        //老的库存
-                        String totalInventory = finishedGoodsInventory1.getTotalInventory();
-                        String newTotalInventory = Double.parseDouble(totalInventory) + storeEntryDetail.getQuantity();
-                        finishedGoodsInventory1.setTotalInventory(newTotalInventory);
-                        finishedGoodsInventoryMapper.updateFinishedGoodsInventory(finishedGoodsInventory1);
-                        //添加入库日志
-                        FinishedGoodsInventoryLog finishedGoodsInventoryLog = new FinishedGoodsInventoryLog();
-                        BeanUtils.copyProperties(storeEntryDetail,finishedGoodsInventoryLog);
-                        finishedGoodsInventoryLogMapper.insertFinishedGoodsInventoryLog(finishedGoodsInventoryLog);
-                    }else{
-                        //新增成品库存信息
-                        BeanUtils.copyProperties(storeEntryDetail,finishedGoodsInventory);
-                        finishedGoodsInventoryMapper.insertFinishedGoodsInventory(finishedGoodsInventory);
-                        //添加入库日志
-                        FinishedGoodsInventoryLog finishedGoodsInventoryLog = new FinishedGoodsInventoryLog();
-                        BeanUtils.copyProperties(storeEntryDetail,finishedGoodsInventoryLog);
-                        finishedGoodsInventoryLogMapper.insertFinishedGoodsInventoryLog(finishedGoodsInventoryLog);
-                    }
-                });
+            if(warehouseEntryInformation.getDataApprovalStatus().equals("1")){
+                if(storeEntryDetails.size()>0){
+                    //更新入库单信息
+                    storeEntryDetails.stream().forEach(storeEntryDetail -> {
+                        FinishedGoodsInventory finishedGoodsInventory = new FinishedGoodsInventory();
+                        finishedGoodsInventory.setMaterialCode(storeEntryDetail.getMaterialCode());
+                        finishedGoodsInventory.setProductName(storeEntryDetail.getProductName());
+                        List<FinishedGoodsInventory> finishedGoodsInventories = finishedGoodsInventoryMapper.selectFinishedGoodsInventoryList(finishedGoodsInventory);
+                        if(finishedGoodsInventories.size()>0){
+                            //更新成品库存信息
+                            FinishedGoodsInventory finishedGoodsInventory1 = finishedGoodsInventories.get(0);
+                            //老的库存
+                            String totalInventory = finishedGoodsInventory1.getTotalInventory();
+                            String newTotalInventory = String.valueOf(Double.parseDouble(totalInventory) + Double.parseDouble(storeEntryDetail.getQuantity()));
+                            finishedGoodsInventory1.setTotalInventory(newTotalInventory);
+                            finishedGoodsInventoryMapper.updateFinishedGoodsInventory(finishedGoodsInventory1);
+                            //添加入库日志
+                            FinishedGoodsInventoryLog finishedGoodsInventoryLog = new FinishedGoodsInventoryLog();
+                            BeanUtils.copyProperties(storeEntryDetail,finishedGoodsInventoryLog);
+                            finishedGoodsInventoryLog.setOutInQuantity(storeEntryDetail.getQuantity());//入库数量
+                            WarehouseEntryInformation warehouseEntryInformation1 = warehouseEntryInformationMapper.selectWarehouseEntryInformationById(warehouseEntryInformation.getId());
+                            BeanUtils.copyProperties(warehouseEntryInformation1,finishedGoodsInventoryLog);//拷贝入库单信息
+                            finishedGoodsInventoryLog.setDocumentPreparationTime(warehouseEntryInformation1.getCreateTime());//制单时间
+                            finishedGoodsInventoryLog.setAuditor(SecurityUtils.getUsername());//审核人
+                            finishedGoodsInventoryLog.setRemark(warehouseEntryInformation1.getRemark());//审核时间
+                            finishedGoodsInventoryLog.setTypeOfOperation("0");
+                            finishedGoodsInventoryLogMapper.insertFinishedGoodsInventoryLog(finishedGoodsInventoryLog);
+                        }else{
+                            //新增成品库存信息
+                            BeanUtils.copyProperties(storeEntryDetail,finishedGoodsInventory);
+                            finishedGoodsInventory.setTotalInventory(storeEntryDetail.getQuantity());//库存数量
+                            finishedGoodsInventoryMapper.insertFinishedGoodsInventory(finishedGoodsInventory);
+                            //添加入库日志
+                            FinishedGoodsInventoryLog finishedGoodsInventoryLog = new FinishedGoodsInventoryLog();
+                            BeanUtils.copyProperties(storeEntryDetail,finishedGoodsInventoryLog);
+                            finishedGoodsInventoryLog.setOutInQuantity(storeEntryDetail.getQuantity());//入库数量
+                            finishedGoodsInventoryLog.setTypeOfOperation("0");
+                            finishedGoodsInventoryLog.setWarehouseEntryNumber(warehouseEntryInformation.getWarehouseEntryNumber());
+                            WarehouseEntryInformation warehouseEntryInformation1 = warehouseEntryInformationMapper.selectWarehouseEntryInformationById(warehouseEntryInformation.getId());
+                            BeanUtils.copyProperties(warehouseEntryInformation1,finishedGoodsInventoryLog);//拷贝入库单信息
+                            finishedGoodsInventoryLog.setDocumentPreparationTime(warehouseEntryInformation1.getCreateTime());//制单时间
+                            finishedGoodsInventoryLog.setAuditor(SecurityUtils.getUsername());//审核人
+                            finishedGoodsInventoryLog.setRemark(warehouseEntryInformation1.getRemark());//审核时间
+                            finishedGoodsInventoryLogMapper.insertFinishedGoodsInventoryLog(finishedGoodsInventoryLog);
+                        }
+                    });
+                }
             }
         }
         return warehouseEntryInformationMapper.updateWarehouseEntryInformation(warehouseEntryInformation);
@@ -206,7 +224,10 @@ public class WarehouseEntryInformationServiceImpl implements IWarehouseEntryInfo
         int i = storeEntryDetailsMapper.updateStoreEntryDetailsByWarehouseEtryIdOne(storeEntryDetails);
         List<StoreEntryDetails> collect = warehouseEntryInformationvo.getStoreEntryDetails().stream().map(storeEntryDetail -> {
             storeEntryDetail.setDelFlag("0");
-            storeEntryDetails.setWarehouseEntryId(warehouseEntryInformationvo.getId());
+            storeEntryDetail.setWarehouseEntryId(warehouseEntryInformationvo.getId());
+            storeEntryDetail.setCreateById(SecurityUtils.getUserId());
+            storeEntryDetail.setCreateBy(SecurityUtils.getUsername());
+            storeEntryDetail.setCreateTime(new Date());
             return storeEntryDetail;
         }).collect(Collectors.toList());
         int i1 = storeEntryDetailsMapper.insertStoreEntryDetailsBatch(collect);

+ 141 - 0
zkqy-fujian-amichi/src/main/resources/mapper/CustomerInformationMapper.xml

@@ -0,0 +1,141 @@
+<?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.amichi.mapper.CustomerInformationMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.CustomerInformation" id="CustomerInformationResult">
+        <result property="id"    column="id"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="customerPhone"    column="customer_phone"    />
+        <result property="customerFax"    column="customer_fax"    />
+        <result property="customerAddress"    column="customer_address"    />
+        <result property="contactPerson"    column="contact_person"    />
+        <result property="deliveryAddress"    column="delivery_address"    />
+        <result property="contactNumber"    column="contact_number"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectCustomerInformationVo">
+        select id, customer_name, customer_phone, customer_fax, customer_address, contact_person, delivery_address, contact_number, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.customer_information
+    </sql>
+
+    <select id="selectCustomerInformationList" parameterType="com.zkqy.amichi.domain.CustomerInformation" resultMap="CustomerInformationResult">
+        <include refid="selectCustomerInformationVo"/>
+        <where>  
+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
+            <if test="customerFax != null  and customerFax != ''"> and customer_fax = #{customerFax}</if>
+            <if test="customerAddress != null  and customerAddress != ''"> and customer_address = #{customerAddress}</if>
+            <if test="contactPerson != null  and contactPerson != ''"> and contact_person = #{contactPerson}</if>
+            <if test="deliveryAddress != null  and deliveryAddress != ''"> and delivery_address = #{deliveryAddress}</if>
+            <if test="contactNumber != null  and contactNumber != ''"> and contact_number = #{contactNumber}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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>
+            and del_flag = 0
+        </where>
+    </select>
+    
+    <select id="selectCustomerInformationById" parameterType="Long" resultMap="CustomerInformationResult">
+        <include refid="selectCustomerInformationVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertCustomerInformation" parameterType="com.zkqy.amichi.domain.CustomerInformation" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.customer_information
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="customerName != null">customer_name,</if>
+            <if test="customerPhone != null">customer_phone,</if>
+            <if test="customerFax != null">customer_fax,</if>
+            <if test="customerAddress != null">customer_address,</if>
+            <if test="contactPerson != null">contact_person,</if>
+            <if test="deliveryAddress != null">delivery_address,</if>
+            <if test="contactNumber != null">contact_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="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="customerName != null">#{customerName},</if>
+            <if test="customerPhone != null">#{customerPhone},</if>
+            <if test="customerFax != null">#{customerFax},</if>
+            <if test="customerAddress != null">#{customerAddress},</if>
+            <if test="contactPerson != null">#{contactPerson},</if>
+            <if test="deliveryAddress != null">#{deliveryAddress},</if>
+            <if test="contactNumber != null">#{contactNumber},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateCustomerInformation" parameterType="com.zkqy.amichi.domain.CustomerInformation">
+        update {DBNAME}.customer_information
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
+            <if test="customerFax != null">customer_fax = #{customerFax},</if>
+            <if test="customerAddress != null">customer_address = #{customerAddress},</if>
+            <if test="contactPerson != null">contact_person = #{contactPerson},</if>
+            <if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
+            <if test="contactNumber != null">contact_number = #{contactNumber},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteCustomerInformationById" parameterType="Long">
+        delete from {DBNAME}.customer_information where id = #{id}
+    </delete>
+
+    <delete id="deleteCustomerInformationByIds" parameterType="String">
+        delete from {DBNAME}.customer_information where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 224 - 0
zkqy-fujian-amichi/src/main/resources/mapper/ExportproductionschedulingMapper.xml

@@ -0,0 +1,224 @@
+<?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.amichi.mapper.ExportproductionschedulingMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.Exportproductionscheduling" id="ExportproductionschedulingResult">
+        <result property="id"    column="id"    />
+        <result property="orderNo"    column="order_no"    />
+        <result property="quantity"    column="quantity"    />
+        <result property="placeanorder"    column="placeanorder"    />
+        <result property="delivergoods"    column="delivergoods"    />
+        <result property="remind"    column="remind"    />
+        <result property="plannedProductionDate"    column="planned_production_date"    />
+        <result property="welding"    column="welding"    />
+        <result property="rqgd"    column="rqgd"    />
+        <result property="threadhead"    column="threadhead"    />
+        <result property="paint"    column="paint"    />
+        <result property="balance"    column="balance"    />
+        <result property="finalassembly"    column="finalassembly"    />
+        <result property="switchas"    column="switchas"    />
+        <result property="packing"    column="packing"    />
+        <result property="demand"    column="demand"    />
+        <result property="sparea"    column="sparea"    />
+        <result property="spareb"    column="spareb"    />
+        <result property="sparec"    column="sparec"    />
+        <result property="state"    column="state"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+        <result property="type"    column="type"    />
+        <result property="materialNo" column="material_no"/>
+        <result property="planTotalWorkingHours" column="plan_total_working_hours"/>
+    </resultMap>
+
+    <sql id="selectExportproductionschedulingVo">
+        select id, order_no, quantity, placeanorder, delivergoods, remind, planned_production_date, welding, rqgd, threadhead,
+               paint, balance, finalassembly, switchas, packing, demand, sparea, spareb, sparec, state, remark, create_by_id,
+               create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key,
+               task_node_key,type,material_no,plan_total_working_hours from {DBNAME}.exportproductionscheduling
+    </sql>
+
+    <select id="selectExportproductionschedulingList" parameterType="com.zkqy.amichi.domain.Exportproductionscheduling" resultMap="ExportproductionschedulingResult">
+        <include refid="selectExportproductionschedulingVo"/>
+        <where>  
+            <if test="orderNo != null  and orderNo != ''"> and order_no = #{orderNo}</if>
+            <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
+            <if test="placeanorder != null  and placeanorder != ''"> and placeanorder = #{placeanorder}</if>
+            <if test="delivergoods != null  and delivergoods != ''"> and delivergoods = #{delivergoods}</if>
+            <if test="remind != null  and remind != ''"> and remind = #{remind}</if>
+            <if test="plannedProductionDate != null  and plannedProductionDate != ''"> and planned_production_date = #{plannedProductionDate}</if>
+            <if test="welding != null  and welding != ''"> and welding = #{welding}</if>
+            <if test="rqgd != null  and rqgd != ''"> and rqgd = #{rqgd}</if>
+            <if test="threadhead != null  and threadhead != ''"> and threadhead = #{threadhead}</if>
+            <if test="paint != null  and paint != ''"> and paint = #{paint}</if>
+            <if test="balance != null  and balance != ''"> and balance = #{balance}</if>
+            <if test="finalassembly != null  and finalassembly != ''"> and finalassembly = #{finalassembly}</if>
+            <if test="switchas != null  and switchas != ''"> and switchas = #{switchas}</if>
+            <if test="packing != null  and packing != ''"> and packing = #{packing}</if>
+            <if test="demand != null  and demand != ''"> and demand = #{demand}</if>
+            <if test="sparea != null  and sparea != ''"> and sparea = #{sparea}</if>
+            <if test="spareb != null  and spareb != ''"> and spareb = #{spareb}</if>
+            <if test="sparec != null  and sparec != ''"> and sparec = #{sparec}</if>
+            <if test="state != null  and state != ''"> and `state` = #{state}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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="delFlag != null  and delFlag != ''"> and del_flag = #{delFlag}</if>
+            <if test="type != null  and type != ''"> and `type` = #{type} </if>
+            <if test="startTime != null and endTime != null ">
+                and DATE_FORMAT(create_time,'%Y-%m-%d') BETWEEN #{startTime} AND #{endTime}
+            </if>
+            <if test="materialNo != null and materialNo != null ">
+                and `material_no` = #{materialNo}
+            </if>
+            order by  delivergoods asc,plan_total_working_hours asc,material_no desc
+        </where>
+    </select>
+    
+    <select id="selectExportproductionschedulingById" parameterType="Long" resultMap="ExportproductionschedulingResult">
+        <include refid="selectExportproductionschedulingVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertExportproductionscheduling" parameterType="com.zkqy.amichi.domain.Exportproductionscheduling" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.exportproductionscheduling
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null">order_no,</if>
+            <if test="quantity != null">quantity,</if>
+            <if test="placeanorder != null">placeanorder,</if>
+            <if test="delivergoods != null">delivergoods,</if>
+            <if test="remind != null">remind,</if>
+            <if test="plannedProductionDate != null">planned_production_date,</if>
+            <if test="welding != null">welding,</if>
+            <if test="rqgd != null">rqgd,</if>
+            <if test="threadhead != null">threadhead,</if>
+            <if test="paint != null">paint,</if>
+            <if test="balance != null">balance,</if>
+            <if test="finalassembly != null">finalassembly,</if>
+            <if test="switchas != null">switchas,</if>
+            <if test="packing != null">packing,</if>
+            <if test="demand != null">demand,</if>
+            <if test="sparea != null">sparea,</if>
+            <if test="spareb != null">spareb,</if>
+            <if test="sparec != null">sparec,</if>
+            <if test="state != null">`state`,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+            <if test="type != null">`type`,</if>
+            <if test="materialNo != null">`material_no`,</if>
+            <if test="planTotalWorkingHours != null">`plan_total_working_hours`,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderNo != null">#{orderNo},</if>
+            <if test="quantity != null">#{quantity},</if>
+            <if test="placeanorder != null">#{placeanorder},</if>
+            <if test="delivergoods != null">#{delivergoods},</if>
+            <if test="remind != null">#{remind},</if>
+            <if test="plannedProductionDate != null">#{plannedProductionDate},</if>
+            <if test="welding != null">#{welding},</if>
+            <if test="rqgd != null">#{rqgd},</if>
+            <if test="threadhead != null">#{threadhead},</if>
+            <if test="paint != null">#{paint},</if>
+            <if test="balance != null">#{balance},</if>
+            <if test="finalassembly != null">#{finalassembly},</if>
+            <if test="switchas != null">#{switchas},</if>
+            <if test="packing != null">#{packing},</if>
+            <if test="demand != null">#{demand},</if>
+            <if test="sparea != null">#{sparea},</if>
+            <if test="spareb != null">#{spareb},</if>
+            <if test="sparec != null">#{sparec},</if>
+            <if test="state != null">#{state},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            <if test="type != null">#{type},</if>
+            <if test="materialNo != null">#{materialNo},</if>
+            <if test="planTotalWorkingHours != null">#{planTotalWorkingHours},</if>
+        </trim>
+    </insert>
+
+    <update id="updateExportproductionscheduling" parameterType="com.zkqy.amichi.domain.Exportproductionscheduling">
+        update {DBNAME}.exportproductionscheduling
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="orderNo != null">order_no = #{orderNo},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="placeanorder != null">placeanorder = #{placeanorder},</if>
+            <if test="delivergoods != null">delivergoods = #{delivergoods},</if>
+            <if test="remind != null">remind = #{remind},</if>
+            <if test="plannedProductionDate != null">planned_production_date = #{plannedProductionDate},</if>
+            <if test="welding != null">welding = #{welding},</if>
+            <if test="rqgd != null">rqgd = #{rqgd},</if>
+            <if test="threadhead != null">threadhead = #{threadhead},</if>
+            <if test="paint != null">paint = #{paint},</if>
+            <if test="balance != null">balance = #{balance},</if>
+            <if test="finalassembly != null">finalassembly = #{finalassembly},</if>
+            <if test="switchas != null">switchas = #{switchas},</if>
+            <if test="packing != null">packing = #{packing},</if>
+            <if test="demand != null">demand = #{demand},</if>
+            <if test="sparea != null">sparea = #{sparea},</if>
+            <if test="spareb != null">spareb = #{spareb},</if>
+            <if test="sparec != null">sparec = #{sparec},</if>
+            <if test="state != null">`state` = #{state},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="type != null">`type` = #{type},</if>
+            <if test="materialNo != null">material_no=#{materialNo},</if>
+            <if test="planTotalWorkingHours != null">`plan_total_working_hours`=#{planTotalWorkingHours},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteExportproductionschedulingById" parameterType="Long">
+        delete from {DBNAME}.exportproductionscheduling where id = #{id}
+    </delete>
+
+    <delete id="deleteExportproductionschedulingByIds" parameterType="String">
+        delete from {DBNAME}.exportproductionscheduling where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 135 - 0
zkqy-fujian-amichi/src/main/resources/mapper/ManhourMapper.xml

@@ -0,0 +1,135 @@
+<?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.amichi.mapper.ManhourMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.Manhour" id="ManhourResult">
+        <result property="id"    column="id"    />
+        <result property="productId"    column="product_id"    />
+        <result property="productName"    column="product_name"    />
+        <result property="manhourspent"    column="manhourspent"    />
+        <result property="productModel"    column="product_model"    />
+        <result property="productSpecification"    column="product_specification"    />
+        <result property="productCode"    column="product_code"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectManhourVo">
+        select id, product_id, product_name, manhourspent, product_model, product_specification, product_code, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.manhour
+    </sql>
+
+    <select id="selectManhourList" parameterType="com.zkqy.amichi.domain.Manhour" resultMap="ManhourResult">
+        <include refid="selectManhourVo"/>
+        <where>  
+            <if test="productId != null  and productId != ''"> and product_id = #{productId}</if>
+            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
+            <if test="manhourspent != null  and manhourspent != ''"> and manhourspent = #{manhourspent}</if>
+            <if test="productModel != null  and productModel != ''"> and product_model = #{productModel}</if>
+            <if test="productSpecification != null  and productSpecification != ''"> and product_specification = #{productSpecification}</if>
+            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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>
+        </where>
+    </select>
+    
+    <select id="selectManhourById" parameterType="Long" resultMap="ManhourResult">
+        <include refid="selectManhourVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertManhour" parameterType="com.zkqy.amichi.domain.Manhour" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.manhour
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="productId != null">product_id,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="manhourspent != null">manhourspent,</if>
+            <if test="productModel != null">product_model,</if>
+            <if test="productSpecification != null">product_specification,</if>
+            <if test="productCode != null">product_code,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="productId != null">#{productId},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="manhourspent != null">#{manhourspent},</if>
+            <if test="productModel != null">#{productModel},</if>
+            <if test="productSpecification != null">#{productSpecification},</if>
+            <if test="productCode != null">#{productCode},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateManhour" parameterType="com.zkqy.amichi.domain.Manhour">
+        update {DBNAME}.manhour
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="productId != null">product_id = #{productId},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="manhourspent != null">manhourspent = #{manhourspent},</if>
+            <if test="productModel != null">product_model = #{productModel},</if>
+            <if test="productSpecification != null">product_specification = #{productSpecification},</if>
+            <if test="productCode != null">product_code = #{productCode},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteManhourById" parameterType="Long">
+        delete from {DBNAME}.manhour where id = #{id}
+    </delete>
+
+    <delete id="deleteManhourByIds" parameterType="String">
+        delete from {DBNAME}.manhour where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 88 - 2
zkqy-fujian-amichi/src/main/resources/mapper/MaterialInfoMapper.xml

@@ -26,10 +26,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="processKey"    column="process_key"    />
         <result property="taskProcessKey"    column="task_process_key"    />
         <result property="taskNodeKey"    column="task_node_key"    />
+        <result property="ckId"    column="ck_id"    />
+        <result property="mapNumber"    column="map_number"    />
+        <result property="description"    column="description"    />
+        <result property="lotNumber"    column="lot_number"    />
     </resultMap>
 
     <sql id="selectMaterialInfoVo">
-        select id, material_code, material_name, model, specification, unit, attribute, issueMethod, stockQuantity, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.materialInfo
+        select id, material_code, material_name, model, specification,
+               unit, attribute, issueMethod, stockQuantity, remark, create_by_id,
+               create_by, create_time, update_by_id, update_by, update_time, del_flag,
+               data_approval_status, process_key, task_process_key, task_node_key, ck_id, map_number, description, lot_number from {DBNAME}.materialInfo
     </sql>
 
     <select id="selectMaterialInfoList" parameterType="com.zkqy.amichi.domain.MaterialInfo" resultMap="MaterialInfoResult">
@@ -49,12 +56,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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="ckId != null and ckId!='' ">and ck_id = #{ckId}</if>
+            <if test="mapNumber != null  and mapNumber != ''"> and map_number = #{mapNumber}</if>
+            <if test="description != null  and description != ''"> and description = #{description}</if>
+            <if test="lotNumber != null  and lotNumber != ''"> and lot_number = #{lotNumber}</if>
+             and del_flag =0
         </where>
     </select>
 
     <select id="selectMaterialInfoById" parameterType="Long" resultMap="MaterialInfoResult">
         <include refid="selectMaterialInfoVo"/>
-        where id = #{id}
+        where id = #{id} and del_flag =0
     </select>
 
     <insert id="insertMaterialInfo" parameterType="com.zkqy.amichi.domain.MaterialInfo" useGeneratedKeys="true" keyProperty="id">
@@ -80,6 +92,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">process_key,</if>
             <if test="taskProcessKey != null">task_process_key,</if>
             <if test="taskNodeKey != null">task_node_key,</if>
+            <if test="ckId != null">ck_id,</if>
+            <if test="mapNumber != null">map_number,</if>
+            <if test="description != null">description,</if>
+            <if test="lotNumber != null">lot_number,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="materialCode != null and materialCode != ''">#{materialCode},</if>
@@ -102,8 +118,70 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">#{processKey},</if>
             <if test="taskProcessKey != null">#{taskProcessKey},</if>
             <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            <if test="ckId != null">#{ckId},</if>
+            <if test="mapNumber != null">#{mapNumber},</if>
+            <if test="description != null">#{description},</if>
+            <if test="lotNumber != null">#{lotNumber},</if>
          </trim>
     </insert>
+    <insert id="batchInsert" parameterType="java.util.List">
+        <!-- 使用foreach遍历list中的每一个元素 -->
+        <foreach item="item"  collection="list"  separator =";">
+            insert into {DBNAME}.materialInfo
+            <trim prefix="(" suffix=")" suffixOverrides=",">
+                <if test="item.materialCode != null and item.materialCode != ''">material_code,</if>
+                <if test="item.materialName != null and item.materialName != ''">material_name,</if>
+                <if test="item.model != null">model,</if>
+                <if test="item.specification != null">specification,</if>
+                <if test="item.unit != null and item.unit != ''">unit,</if>
+                <if test="item.attribute != null and item.attribute != ''">`attribute`,</if>
+                <if test="item.issueMethod != null">issueMethod,</if>
+                <if test="item.stockQuantity != null">stockQuantity,</if>
+                <if test="item.remark != null">remark,</if>
+                <if test="item.createById != null">create_by_id,</if>
+                <if test="item.createBy != null">create_by,</if>
+                <if test="item.createTime != null">create_time,</if>
+                <if test="item.updateById != null">update_by_id,</if>
+                <if test="item.updateBy != null">update_by,</if>
+                <if test="item.updateTime != null">update_time,</if>
+                <if test="item.delFlag != null">del_flag,</if>
+                <if test="item.dataApprovalStatus != null">data_approval_status,</if>
+                <if test="item.processKey != null">process_key,</if>
+                <if test="item.taskProcessKey != null">task_process_key,</if>
+                <if test="item.taskNodeKey != null">task_node_key,</if>
+                <if test="item.ckId != null">ck_id,</if>
+                <if test="item.mapNumber != null">map_number,</if>
+                <if test="item.description != null">description,</if>
+                <if test="item.lotNumber != null">lot_number,</if>
+            </trim>
+            <trim prefix="values (" suffix=")" suffixOverrides=",">
+                <if test="item.materialCode != null and item.materialCode != ''">#{item.materialCode},</if>
+                <if test="item.materialName != null and item.materialName != ''">#{item.materialName},</if>
+                <if test="item.model != null">#{item.model},</if>
+                <if test="item.specification != null">#{item.specification},</if>
+                <if test="item.unit != null and item.unit != ''">#{item.unit},</if>
+                <if test="item.attribute != null and item.attribute != ''">#{item.attribute},</if>
+                <if test="item.issueMethod != null">#{item.issueMethod},</if>
+                <if test="item.stockQuantity != null">#{item.stockQuantity},</if>
+                <if test="item.remark != null">#{item.remark},</if>
+                <if test="item.createById != null">#{item.createById},</if>
+                <if test="item.createBy != null">#{item.createBy},</if>
+                <if test="item.createTime != null">#{item.createTime},</if>
+                <if test="item.updateById != null">#{item.updateById},</if>
+                <if test="item.updateBy != null">#{item.updateBy},</if>
+                <if test="item.updateTime != null">#{item.updateTime},</if>
+                <if test="item.delFlag != null">#{item.delFlag},</if>
+                <if test="item.dataApprovalStatus != null">#{item.dataApprovalStatus},</if>
+                <if test="item.processKey != null">#{item.processKey},</if>
+                <if test="item.taskProcessKey != null">#{item.taskProcessKey},</if>
+                <if test="item.taskNodeKey != null">#{item.taskNodeKey},</if>
+                <if test="item.ckId != null">#{item.ckId},</if>
+                <if test="item.mapNumber != null">#{item.mapNumber},</if>
+                <if test="item.description != null">#{item.description},</if>
+                <if test="item.lotNumber != null">#{item.lotNumber},</if>
+            </trim>
+        </foreach>
+    </insert>
 
     <update id="updateMaterialInfo" parameterType="com.zkqy.amichi.domain.MaterialInfo">
         update {DBNAME}.materialInfo
@@ -128,6 +206,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">process_key = #{processKey},</if>
             <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
             <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="ckId != null">ck_id = #{ckId},</if>
+            <if test="mapNumber != null">map_number = #{mapNumber},</if>
+            <if test="description != null">description = #{description},</if>
+            <if test="lotNumber != null">lot_number = #{lotNumber},</if>
         </trim>
         where id = #{id}
     </update>
@@ -154,9 +236,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">process_key = #{processKey},</if>
             <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
             <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="ckId != null  and ckId != ''">ck_id=#{ckId}</if>
         </trim>
         where material_code = #{materialCode}
     </update>
+    <update id="batchUpdate">
+
+    </update>
 
     <delete id="deleteMaterialInfoById" parameterType="Long">
         delete from {DBNAME}.materialInfo where id = #{id}

+ 14 - 7
zkqy-fujian-amichi/src/main/resources/mapper/OperationInstructionMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zkqy.system.mapper.OperationInstructionMapper">
+<mapper namespace="com.zkqy.amichi.mapper.OperationInstructionMapper">
     
-    <resultMap type="com.zkqy.system.domain.OperationInstruction" id="OperationInstructionResult">
+    <resultMap type="com.zkqy.amichi.domain.OperationInstruction" id="OperationInstructionResult">
         <result property="id"    column="id"    />
         <result property="instructionName"    column="instruction_name"    />
         <result property="jobName"    column="job_name"    />
@@ -22,13 +22,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="processKey"    column="process_key"    />
         <result property="taskProcessKey"    column="task_process_key"    />
         <result property="taskNodeKey"    column="task_node_key"    />
+        <result property="imageSrc" column="imageSrc"></result>
     </resultMap>
 
     <sql id="selectOperationInstructionVo">
-        select id, instruction_name, job_name, component_path, routing_address, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.operation_instruction
+        select id, instruction_name, job_name, component_path, routing_address, remark, create_by_id,
+               create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status,
+               process_key, task_process_key, task_node_key,imageSrc from {DBNAME}.operation_instruction
     </sql>
 
-    <select id="selectOperationInstructionList" parameterType="com.zkqy.system.domain.OperationInstruction" resultMap="OperationInstructionResult">
+    <select id="selectOperationInstructionList" parameterType="com.zkqy.amichi.domain.OperationInstruction" resultMap="OperationInstructionResult">
         <include refid="selectOperationInstructionVo"/>
         <where>  
             <if test="instructionName != null  and instructionName != ''"> and instruction_name like concat('%', #{instructionName}, '%')</if>
@@ -41,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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="imageSrc!=null and imageSrc!=''">and imageSrc=#{imageSrc}</if>
         </where>
     </select>
     
@@ -49,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </select>
         
-    <insert id="insertOperationInstruction" parameterType="com.zkqy.system.domain.OperationInstruction" useGeneratedKeys="true" keyProperty="id">
+    <insert id="insertOperationInstruction" parameterType="com.zkqy.amichi.domain.OperationInstruction" useGeneratedKeys="true" keyProperty="id">
         insert into {DBNAME}.operation_instruction
         <trim prefix="(" suffix=")" suffixOverrides=",">
             <if test="instructionName != null">instruction_name,</if>
@@ -68,7 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">process_key,</if>
             <if test="taskProcessKey != null">task_process_key,</if>
             <if test="taskNodeKey != null">task_node_key,</if>
-         </trim>
+            <if test="imageSrc!=null and imageSrc!=''">imageSrc</if>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="instructionName != null">#{instructionName},</if>
             <if test="jobName != null">#{jobName},</if>
@@ -86,10 +91,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">#{processKey},</if>
             <if test="taskProcessKey != null">#{taskProcessKey},</if>
             <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            <if test="imageSrc!=null and imageSrc!=''">#{imageSrc}</if>
          </trim>
     </insert>
 
-    <update id="updateOperationInstruction" parameterType="com.zkqy.system.domain.OperationInstruction">
+    <update id="updateOperationInstruction" parameterType="com.zkqy.amichi.domain.OperationInstruction">
         update {DBNAME}.operation_instruction
         <trim prefix="SET" suffixOverrides=",">
             <if test="instructionName != null">instruction_name = #{instructionName},</if>
@@ -108,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="processKey != null">process_key = #{processKey},</if>
             <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
             <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="imageSrc!=null and imageSrc!=''">imageSrc=#{imageSrc}</if>
         </trim>
         where id = #{id}
     </update>

+ 169 - 0
zkqy-fujian-amichi/src/main/resources/mapper/PlanTaskDetailsMapper.xml

@@ -0,0 +1,169 @@
+<?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.amichi.mapper.PlanTaskDetailsMapper">
+    <resultMap type="com.zkqy.amichi.domain.PlanTaskDetails" id="PlanTaskDetailsResult">
+        <result property="id"    column="id"    />
+        <result property="taskId"    column="task_id"    />
+        <result property="model"    column="model"    />
+        <result property="nameplate"    column="nameplate"    />
+        <result property="capacity"    column="capacity"    />
+        <result property="interfaceDisk"    column="interface_disk"    />
+        <result property="length"    column="length"    />
+        <result property="voltage"    column="voltage"    />
+        <result property="programme"    column="programme"    />
+        <result property="quantity"    column="quantity"    />
+        <result property="sparea"    column="sparea"    />
+        <result property="spareb"    column="spareb"    />
+        <result property="sparec"    column="sparec"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+        <result property="planId"    column="plan_id"    />
+    </resultMap>
+
+    <sql id="selectPlanTaskDetailsVo">
+        select id, task_id, model, nameplate, capacity, interface_disk, length, voltage, programme, quantity, sparea, spareb, sparec, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key, plan_id from {DBNAME}.plan_task_details
+    </sql>
+
+    <select id="selectPlanTaskDetailsList" parameterType="com.zkqy.amichi.domain.PlanTaskDetails" resultMap="PlanTaskDetailsResult">
+        <include refid="selectPlanTaskDetailsVo"/>
+        <where>  
+            <if test="taskId != null  and taskId != ''"> and task_id = #{taskId}</if>
+            <if test="model != null  and model != ''"> and model = #{model}</if>
+            <if test="nameplate != null  and nameplate != ''"> and nameplate = #{nameplate}</if>
+            <if test="capacity != null  and capacity != ''"> and capacity = #{capacity}</if>
+            <if test="interfaceDisk != null  and interfaceDisk != ''"> and interface_disk = #{interfaceDisk}</if>
+            <if test="length != null  and length != ''"> and `length` = #{length}</if>
+            <if test="voltage != null  and voltage != ''"> and voltage = #{voltage}</if>
+            <if test="programme != null  and programme != ''"> and programme = #{programme}</if>
+            <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
+            <if test="sparea != null  and sparea != ''"> and sparea = #{sparea}</if>
+            <if test="spareb != null  and spareb != ''"> and spareb = #{spareb}</if>
+            <if test="sparec != null  and sparec != ''"> and sparec = #{sparec}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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="planId != null "> and plan_id = #{planId}</if>
+        </where>
+    </select>
+    
+    <select id="selectPlanTaskDetailsById" parameterType="Long" resultMap="PlanTaskDetailsResult">
+        <include refid="selectPlanTaskDetailsVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertPlanTaskDetails" parameterType="com.zkqy.amichi.domain.PlanTaskDetails" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.plan_task_details
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="taskId != null">task_id,</if>
+            <if test="model != null">model,</if>
+            <if test="nameplate != null">nameplate,</if>
+            <if test="capacity != null">capacity,</if>
+            <if test="interfaceDisk != null">interface_disk,</if>
+            <if test="length != null">`length`,</if>
+            <if test="voltage != null">voltage,</if>
+            <if test="programme != null">programme,</if>
+            <if test="quantity != null">quantity,</if>
+            <if test="sparea != null">sparea,</if>
+            <if test="spareb != null">spareb,</if>
+            <if test="sparec != null">sparec,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+            <if test="planId != null">plan_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="taskId != null">#{taskId},</if>
+            <if test="model != null">#{model},</if>
+            <if test="nameplate != null">#{nameplate},</if>
+            <if test="capacity != null">#{capacity},</if>
+            <if test="interfaceDisk != null">#{interfaceDisk},</if>
+            <if test="length != null">#{length},</if>
+            <if test="voltage != null">#{voltage},</if>
+            <if test="programme != null">#{programme},</if>
+            <if test="quantity != null">#{quantity},</if>
+            <if test="sparea != null">#{sparea},</if>
+            <if test="spareb != null">#{spareb},</if>
+            <if test="sparec != null">#{sparec},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            <if test="planId != null">#{planId},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePlanTaskDetails" parameterType="com.zkqy.amichi.domain.PlanTaskDetails">
+        update {DBNAME}.plan_task_details
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="taskId != null">task_id = #{taskId},</if>
+            <if test="model != null">model = #{model},</if>
+            <if test="nameplate != null">nameplate = #{nameplate},</if>
+            <if test="capacity != null">capacity = #{capacity},</if>
+            <if test="interfaceDisk != null">interface_disk = #{interfaceDisk},</if>
+            <if test="length != null">`length` = #{length},</if>
+            <if test="voltage != null">voltage = #{voltage},</if>
+            <if test="programme != null">programme = #{programme},</if>
+            <if test="quantity != null">quantity = #{quantity},</if>
+            <if test="sparea != null">sparea = #{sparea},</if>
+            <if test="spareb != null">spareb = #{spareb},</if>
+            <if test="sparec != null">sparec = #{sparec},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="planId != null">plan_id = #{planId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deletePlanTaskDetailsById" parameterType="Long">
+        delete from {DBNAME}.plan_task_details where id = #{id}
+    </delete>
+
+    <delete id="deletePlanTaskDetailsByIds" parameterType="String">
+        delete from {DBNAME}.plan_task_details where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 135 - 0
zkqy-fujian-amichi/src/main/resources/mapper/PlannedPurchaseLogMapper.xml

@@ -0,0 +1,135 @@
+<?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.amichi.mapper.PlannedPurchaseLogMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.PlannedPurchaseLog" id="PlannedPurchaseLogResult">
+        <result property="id"    column="id"    />
+        <result property="planNumber"    column="plan_number"    />
+        <result property="orderNumber"    column="order_number"    />
+        <result property="materialCode"    column="material_code"    />
+        <result property="materialName"    column="material_name"    />
+        <result property="quantityDemanded"    column="quantity_demanded"    />
+        <result property="quantityPurchased"    column="quantity_purchased"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectPlannedPurchaseLogVo">
+        select id, plan_number, order_number, material_code, material_name, quantity_demanded, quantity_purchased, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.planned_purchase_log
+    </sql>
+
+    <select id="selectPlannedPurchaseLogList" parameterType="com.zkqy.amichi.domain.PlannedPurchaseLog" resultMap="PlannedPurchaseLogResult">
+        <include refid="selectPlannedPurchaseLogVo"/>
+        <where>  
+            <if test="planNumber != null  and planNumber != ''"> and plan_number = #{planNumber}</if>
+            <if test="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
+            <if test="materialCode != null  and materialCode != ''"> and material_code = #{materialCode}</if>
+            <if test="materialName != null  and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
+            <if test="quantityDemanded != null  and quantityDemanded != ''"> and quantity_demanded = #{quantityDemanded}</if>
+            <if test="quantityPurchased != null  and quantityPurchased != ''"> and quantity_purchased = #{quantityPurchased}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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>
+        </where>
+    </select>
+    
+    <select id="selectPlannedPurchaseLogById" parameterType="Long" resultMap="PlannedPurchaseLogResult">
+        <include refid="selectPlannedPurchaseLogVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertPlannedPurchaseLog" parameterType="com.zkqy.amichi.domain.PlannedPurchaseLog" useGeneratedKeys="true" keyProperty="id">
+        insert into  {DBNAME}.planned_purchase_log
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planNumber != null">plan_number,</if>
+            <if test="orderNumber != null">order_number,</if>
+            <if test="materialCode != null">material_code,</if>
+            <if test="materialName != null">material_name,</if>
+            <if test="quantityDemanded != null">quantity_demanded,</if>
+            <if test="quantityPurchased != null">quantity_purchased,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="planNumber != null">#{planNumber},</if>
+            <if test="orderNumber != null">#{orderNumber},</if>
+            <if test="materialCode != null">#{materialCode},</if>
+            <if test="materialName != null">#{materialName},</if>
+            <if test="quantityDemanded != null">#{quantityDemanded},</if>
+            <if test="quantityPurchased != null">#{quantityPurchased},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updatePlannedPurchaseLog" parameterType="com.zkqy.amichi.domain.PlannedPurchaseLog">
+        update  {DBNAME}.planned_purchase_log
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planNumber != null">plan_number = #{planNumber},</if>
+            <if test="orderNumber != null">order_number = #{orderNumber},</if>
+            <if test="materialCode != null">material_code = #{materialCode},</if>
+            <if test="materialName != null">material_name = #{materialName},</if>
+            <if test="quantityDemanded != null">quantity_demanded = #{quantityDemanded},</if>
+            <if test="quantityPurchased != null">quantity_purchased = #{quantityPurchased},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deletePlannedPurchaseLogById" parameterType="Long">
+        delete from  {DBNAME}.planned_purchase_log where id = #{id}
+    </delete>
+
+    <delete id="deletePlannedPurchaseLogByIds" parameterType="String">
+        delete from  {DBNAME}.planned_purchase_log where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 12 - 1
zkqy-fujian-amichi/src/main/resources/mapper/PocurementdetailsMapper.xml

@@ -203,9 +203,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updatePocurementdetailsByIdsDelete" parameterType="String">
         update  {DBNAME}.pocurementdetails set del_flag = 1  where purchase_id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
+
         </foreach>
     </update>
+    <update id="updatePocurementdetailsPurchaseId" parameterType="com.zkqy.amichi.domain.Pocurementdetails">
+        update  {DBNAME}.pocurementdetails
+        <trim prefix="SET" suffixOverrides=",">
+            <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="approval != null">approval=#{approval},</if>
+        </trim>
+        where purchase_id = #{purchaseId}
+    </update>
 
     <delete id="deletePocurementdetailsById" parameterType="Long">
         delete from  {DBNAME}.pocurementdetails where id = #{id}

+ 155 - 0
zkqy-fujian-amichi/src/main/resources/mapper/ProductDeliverySheetDetailsMapper.xml

@@ -0,0 +1,155 @@
+<?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.amichi.mapper.ProductDeliverySheetDetailsMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.ProductDeliverySheetDetails" id="ProductDeliverySheetDetailsResult">
+        <result property="id"    column="id"    />
+        <result property="deliveryId"    column="delivery_id"    />
+        <result property="productName"    column="product_name"    />
+        <result property="modelNumber"    column="model_number"    />
+        <result property="unit"    column="unit"    />
+        <result property="quantity"    column="quantity"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectProductDeliverySheetDetailsVo">
+        select id, delivery_id, product_name, model_number, unit, quantity, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.product_delivery_sheet_details
+    </sql>
+
+    <select id="selectProductDeliverySheetDetailsList" parameterType="com.zkqy.amichi.domain.ProductDeliverySheetDetails" resultMap="ProductDeliverySheetDetailsResult">
+        <include refid="selectProductDeliverySheetDetailsVo"/>
+        <where>  
+            <if test="deliveryId != null  and deliveryId != ''"> and delivery_id = #{deliveryId}</if>
+            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
+            <if test="modelNumber != null  and modelNumber != ''"> and model_number = #{modelNumber}</if>
+            <if test="unit != null  and unit != ''"> and unit = #{unit}</if>
+            <if test="quantity != null  and quantity != ''"> and quantity = #{quantity}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+             <if test="delFlag != null "> and del_flag = #{delFlag}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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>
+        </where>
+    </select>
+    
+    <select id="selectProductDeliverySheetDetailsById" parameterType="Long" resultMap="ProductDeliverySheetDetailsResult">
+        <include refid="selectProductDeliverySheetDetailsVo"/>
+        where id = #{id}
+    </select>
+
+
+    <insert id="insertProductDeliverySheetDetails" parameterType="com.zkqy.amichi.domain.ProductDeliverySheetDetails" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.product_delivery_sheet_details
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="deliveryId != null">delivery_id,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="modelNumber != null">model_number,</if>
+            <if test="unit != null">unit,</if>
+            <if test="quantity != null">quantity,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="deliveryId != null">#{deliveryId},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="modelNumber != null">#{modelNumber},</if>
+            <if test="unit != null">#{unit},</if>
+            <if test="quantity != null">#{quantity},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateProductDeliverySheetDetails" parameterType="com.zkqy.amichi.domain.ProductDeliverySheetDetails">
+        update {DBNAME}.product_delivery_sheet_details
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deliveryId != null">delivery_id = #{deliveryId},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="modelNumber != null">model_number = #{modelNumber},</if>
+            <if test="unit != null">unit = #{unit},</if>
+            <if test="quantity != null">quantity = #{quantity},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+    <update id="updateProductDeliverySheetDetailsById">
+        update {DBNAME}.product_delivery_sheet_details
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="deliveryId != null">delivery_id = #{deliveryId},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="modelNumber != null">model_number = #{modelNumber},</if>
+            <if test="unit != null">unit = #{unit},</if>
+            <if test="quantity != null">quantity = #{quantity},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where delivery_id = #{deliveryId}
+    </update>
+
+    <delete id="deleteProductDeliverySheetDetailsById" parameterType="Long">
+        delete from {DBNAME}.product_delivery_sheet_details where id = #{id}
+    </delete>
+
+    <delete id="deleteProductDeliverySheetDetailsByIds" parameterType="String">
+        delete from {DBNAME}.product_delivery_sheet_details where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 221 - 0
zkqy-fujian-amichi/src/main/resources/mapper/ProductDeliverySheetMapper.xml

@@ -0,0 +1,221 @@
+<?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.amichi.mapper.ProductDeliverySheetMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.ProductDeliverySheet" id="ProductDeliverySheetResult">
+        <result property="id"    column="id"    />
+        <result property="customerName"    column="customer_name"    />
+        <result property="customerPhone"    column="customer_phone"    />
+        <result property="customerFax"    column="customer_fax"    />
+        <result property="customerAddress"    column="customer_address"    />
+        <result property="contactPerson"    column="contact_person"    />
+        <result property="deliveryAddress"    column="delivery_address"    />
+        <result property="contactNumber"    column="contact_number"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+        <result property="orderNumber"    column="order_number"    />
+        <result property="documentNumber"    column="document_number"    />
+        <result property="contractNumber"    column="contract_number"    />
+        <result property="documenter"    column="documenter"    />
+        <result property="auditor"    column="auditor"    />
+        <result property="signer"    column="signer"    />
+        <result property="dateOfReceipt"    column="date_of_receipt"    />
+        <result property="approvalOpinionFirst"    column="approvalOpinionFirst"    />
+    </resultMap>
+
+    <sql id="selectProductDeliverySheetVo">
+        select id, customer_name, customer_phone, customer_fax, customer_address, contact_person, delivery_address, contact_number, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key,
+               order_number,document_number,contract_number,documenter,auditor,signer,date_of_receipt,approvalOpinionFirst
+        from {DBNAME}.product_delivery_sheet
+    </sql>
+
+    <select id="selectProductDeliverySheetList" parameterType="com.zkqy.amichi.domain.ProductDeliverySheet" resultMap="ProductDeliverySheetResult">
+        <include refid="selectProductDeliverySheetVo"/>
+        <where>
+            <if test="customerName != null  and customerName != ''"> and customer_name like concat('%', #{customerName}, '%')</if>
+            <if test="customerPhone != null  and customerPhone != ''"> and customer_phone = #{customerPhone}</if>
+            <if test="customerFax != null  and customerFax != ''"> and customer_fax = #{customerFax}</if>
+            <if test="customerAddress != null  and customerAddress != ''"> and customer_address = #{customerAddress}</if>
+            <if test="contactPerson != null  and contactPerson != ''"> and contact_person = #{contactPerson}</if>
+            <if test="deliveryAddress != null  and deliveryAddress != ''"> and delivery_address = #{deliveryAddress}</if>
+            <if test="contactNumber != null  and contactNumber != ''"> and contact_number = #{contactNumber}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="delFlag != null "> and del_flag = #{delFlag}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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="orderNumber != null  and orderNumber != ''"> and order_number = #{orderNumber}</if>
+            <if test="documentNumber != null  and documentNumber != ''"> and document_number = #{documentNumber}</if>
+            <if test="contractNumber != null  and documentNumber != ''"> and contract_number = #{contractNumber}</if>
+            <if test="documenter != null  and documenter != ''"> and documenter = #{documenter}</if>
+            <if test="auditor != null  and auditor != ''"> and auditor = #{auditor}</if>
+            <if test="signer != null  and signer != ''"> and signer = #{signer}</if>
+            <if test="dateOfReceipt != null  and dateOfReceipt != ''"> and date_of_receipt = #{dateOfReceipt}</if>
+            <if test="approvalOpinionFirst != null  and approvalOpinionFirst != ''"> and approvalOpinionFirst = #{approvalOpinionFirst}</if>
+
+        </where>
+    </select>
+    
+    <select id="selectProductDeliverySheetById" parameterType="Long" resultMap="ProductDeliverySheetResult">
+        <include refid="selectProductDeliverySheetVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertProductDeliverySheet" parameterType="com.zkqy.amichi.domain.ProductDeliverySheet" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.product_delivery_sheet
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="customerName != null">customer_name,</if>
+            <if test="customerPhone != null">customer_phone,</if>
+            <if test="customerFax != null">customer_fax,</if>
+            <if test="customerAddress != null">customer_address,</if>
+            <if test="contactPerson != null">contact_person,</if>
+            <if test="deliveryAddress != null">delivery_address,</if>
+            <if test="contactNumber != null">contact_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="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+            <if test="orderNumber != null  and orderNumber != ''">order_number,</if>
+            <if test="documentNumber != null  and documentNumber != ''">document_number,</if>
+            <if test="contractNumber != null  and documentNumber != ''">contract_number,</if>
+            <if test="documenter != null  and documenter != ''">documenter,</if>
+            <if test="auditor != null  and auditor != ''">auditor,</if>
+            <if test="signer != null  and signer != ''">signer,</if>
+            <if test="dateOfReceipt != null  and dateOfReceipt != ''">date_of_receipt,</if>
+            <if test="approvalOpinionFirst != null  and approvalOpinionFirst != ''">approvalOpinionFirst,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="customerName != null">#{customerName},</if>
+            <if test="customerPhone != null">#{customerPhone},</if>
+            <if test="customerFax != null">#{customerFax},</if>
+            <if test="customerAddress != null">#{customerAddress},</if>
+            <if test="contactPerson != null">#{contactPerson},</if>
+            <if test="deliveryAddress != null">#{deliveryAddress},</if>
+            <if test="contactNumber != null">#{contactNumber},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            <if test="orderNumber != null  and orderNumber != ''">#{orderNumber},</if>
+            <if test="documentNumber != null  and documentNumber != ''">#{documentNumber},</if>
+            <if test="contractNumber != null  and documentNumber != ''">#{contractNumber},</if>
+            <if test="documenter != null  and documenter != ''">#{documenter},</if>
+            <if test="auditor != null  and auditor != ''">#{auditor},</if>
+            <if test="signer != null  and signer != ''">#{signer},</if>
+            <if test="dateOfReceipt != null  and dateOfReceipt != ''">#{dateOfReceipt},</if>
+            <if test="approvalOpinionFirst != null  and approvalOpinionFirst != ''">#{approvalOpinionFirst}</if>
+         </trim>
+    </insert>
+
+
+    <update id="updateProductDeliverySheet" parameterType="com.zkqy.amichi.domain.ProductDeliverySheet">
+        update {DBNAME}.product_delivery_sheet
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="customerPhone != null">customer_phone = #{customerPhone},</if>
+            <if test="customerFax != null">customer_fax = #{customerFax},</if>
+            <if test="customerAddress != null">customer_address = #{customerAddress},</if>
+            <if test="contactPerson != null">contact_person = #{contactPerson},</if>
+            <if test="deliveryAddress != null">delivery_address = #{deliveryAddress},</if>
+            <if test="contactNumber != null">contact_number = #{contactNumber},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="orderNumber != null  and orderNumber != ''">order_number = #{orderNumber},</if>
+            <if test="documentNumber != null  and documentNumber != ''">document_number = #{documentNumber},</if>
+            <if test="contractNumber != null  and documentNumber != ''">contract_number = #{contractNumber},</if>
+            <if test="documenter != null  and documenter != ''">documenter = #{documenter},</if>
+            <if test="auditor != null  and auditor != ''">auditor = #{auditor},</if>
+            <if test="signer != null  and signer != ''">signer = #{signer},</if>
+            <if test="dateOfReceipt != null  and dateOfReceipt != ''">date_of_receipt = #{dateOfReceipt},</if>
+            <if test="approvalOpinionFirst != null  and approvalOpinionFirst != ''">approvalOpinionFirst = #{approvalOpinionFirst},</if>
+        </trim>
+        where id = #{id}
+    </update>
+    <update id="updateProductDeliverySheetByIdIn">
+        update {DBNAME}.product_delivery_sheet
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="pds.customerName != null">customer_name = #{pds.customerName},</if>
+            <if test="pds.customerPhone != null">customer_phone = #{pds.customerPhone},</if>
+            <if test="pds.customerFax != null">customer_fax = #{pds.customerFax},</if>
+            <if test="pds.customerAddress != null">customer_address = #{pds.customerAddress},</if>
+            <if test="pds.contactPerson != null">contact_person = #{pds.contactPerson},</if>
+            <if test="pds.deliveryAddress != null">delivery_address = #{pds.deliveryAddress},</if>
+            <if test="pds.contactNumber != null">contact_number = #{pds.contactNumber},</if>
+            <if test="pds.remark != null">remark = #{pds.remark},</if>
+            <if test="pds.createById != null">create_by_id = #{pds.createById},</if>
+            <if test="pds.createBy != null">create_by = #{pds.createBy},</if>
+            <if test="pds.createTime != null">create_time = #{pds.createTime},</if>
+            <if test="pds.updateById != null">update_by_id = #{pds.updateById},</if>
+            <if test="pds.updateBy != null">update_by = #{pds.updateBy},</if>
+            <if test="pds.updateTime != null">update_time = #{pds.updateTime},</if>
+            <if test="pds.delFlag != null">del_flag = #{pds.delFlag},</if>
+            <if test="pds.dataApprovalStatus != null">data_approval_status = #{pds.dataApprovalStatus},</if>
+            <if test="pds.processKey != null">process_key = #{pds.processKey},</if>
+            <if test="pds.taskProcessKey != null">task_process_key = #{pds.taskProcessKey},</if>
+            <if test="pds.taskNodeKey != null">task_node_key = #{pds.taskNodeKey},</if>
+            <if test="orderNumber != null  and orderNumber != ''">order_number = #{orderNumber},</if>
+            <if test="documentNumber != null  and documentNumber != ''">document_number = #{documentNumber},</if>
+            <if test="contractNumber != null  and documentNumber != ''">contract_number = #{contractNumber},</if>
+            <if test="documenter != null  and documenter != ''">documenter = #{documenter},</if>
+            <if test="auditor != null  and auditor != ''">auditor = #{auditor},</if>
+            <if test="signer != null  and signer != ''">signer = #{signer},</if>
+            <if test="dateOfReceipt != null  and dateOfReceipt != ''">date_of_receipt = #{dateOfReceipt},</if>
+            <if test="approvalOpinionFirst != null  and approvalOpinionFirst != ''">approvalOpinionFirst = #{approvalOpinionFirst},</if>
+        </trim>
+        where id in
+        <foreach item="id" collection="ids" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+
+    <delete id="deleteProductDeliverySheetById" parameterType="Long">
+        delete from {DBNAME}.product_delivery_sheet where id = #{id}
+    </delete>
+
+    <delete id="deleteProductDeliverySheetByIds" parameterType="String">
+        delete from {DBNAME}.product_delivery_sheet where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 236 - 0
zkqy-fujian-amichi/src/main/resources/mapper/ProductionBomsDetailsMapper.xml

@@ -0,0 +1,236 @@
+<?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.amichi.mapper.ProductionBomsDetailsMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.ProductionBomsDetails" id="ProductionBomsDetailsResult">
+        <result property="id"    column="id"    />
+        <result property="subitemMaterialCode"    column="subitem_material_code"    />
+        <result property="subitemMaterialName"    column="subitem_material_name"    />
+        <result property="subitemDetailModel"    column="subitem_detail_model"    />
+        <result property="subitemDetailSpecifications"    column="subitem_detail_specifications"    />
+        <result property="workingProcedure"    column="working_procedure"    />
+        <result property="quantityToBeDelivered"    column="quantity_to_be_delivered"    />
+        <result property="unclaimedQuantity"    column="unclaimed_quantity"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+        <result property="productionBomId" column="production_bom_id"/>
+    </resultMap>
+
+    <sql id="selectProductionBomsDetailsVo">
+        select id, subitem_material_code, subitem_material_name, subitem_detail_model, subitem_detail_specifications, working_procedure, quantity_to_be_delivered, unclaimed_quantity, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time,
+               del_flag, data_approval_status, process_key, task_process_key, task_node_key,production_bom_id from {DBNAME}.production_boms_details
+    </sql>
+
+    <select id="selectProductionBomsDetailsList" parameterType="com.zkqy.amichi.domain.ProductionBomsDetails" resultMap="ProductionBomsDetailsResult">
+        <include refid="selectProductionBomsDetailsVo"/>
+        <where>  
+            <if test="subitemMaterialCode != null  and subitemMaterialCode != ''"> and subitem_material_code = #{subitemMaterialCode}</if>
+            <if test="subitemMaterialName != null  and subitemMaterialName != ''"> and subitem_material_name like concat('%', #{subitemMaterialName}, '%')</if>
+            <if test="subitemDetailModel != null  and subitemDetailModel != ''"> and subitem_detail_model = #{subitemDetailModel}</if>
+            <if test="subitemDetailSpecifications != null  and subitemDetailSpecifications != ''"> and subitem_detail_specifications = #{subitemDetailSpecifications}</if>
+            <if test="workingProcedure != null  and workingProcedure != ''"> and working_procedure = #{workingProcedure}</if>
+            <if test="quantityToBeDelivered != null  and quantityToBeDelivered != ''"> and quantity_to_be_delivered = #{quantityToBeDelivered}</if>
+            <if test="unclaimedQuantity != null  and unclaimedQuantity != ''"> and unclaimed_quantity = #{unclaimedQuantity}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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="productionBomId != null  and productionBomId != ''"> and production_bom_id = #{productionBomId}</if>
+            and del_flag=0
+        </where>
+    </select>
+    
+    <select id="selectProductionBomsDetailsById" parameterType="Long" resultMap="ProductionBomsDetailsResult">
+        <include refid="selectProductionBomsDetailsVo"/>
+        where id = #{id}   and del_flag=0
+    </select>
+    <select id="selectProductionBomsDetailsListAndStockInfo"
+            resultType="com.zkqy.amichi.domain.vo.ProductionBomsDetailsVo">
+        SELECT
+            pbd.id,
+            pbd.subitem_material_code,
+            pbd.subitem_material_name,
+            pbd.subitem_detail_model,
+            pbd.subitem_detail_specifications,
+            pbd.working_procedure,
+            pbd.quantity_to_be_delivered,
+            pbd.unclaimed_quantity,
+            pbd.remark,
+            pbd.create_by_id,
+            pbd.create_by,
+            pbd.create_time,
+            pbd.update_by_id,
+            pbd.update_by,
+            pbd.update_time,
+            pbd.del_flag,
+            pbd.data_approval_status,
+            pbd.process_key,
+            pbd.task_process_key,
+            pbd.task_node_key,
+            pbd.production_bom_id,
+            m.stockQuantity as stockQuantity
+        FROM
+            {DBNAME}.production_boms_details AS pbd
+                LEFT JOIN {DBNAME}.materialinfo AS m ON pbd.subitem_material_code = m.material_code
+           where pbd.subitem_material_code in
+            <foreach item="materialCode" collection="list" open="(" separator="," close=")">
+                #{materialCode}
+            </foreach>
+    </select>
+    <select id="selectProductionBomsDetailsListByInProductionBomId"
+            resultType="com.zkqy.amichi.domain.vo.ProductionBomsDetailsVo">
+        SELECT
+        pbd.id,
+        pbd.subitem_material_code,
+        pbd.subitem_material_name,
+        pbd.subitem_detail_model,
+        pbd.subitem_detail_specifications,
+        pbd.working_procedure,
+        pbd.quantity_to_be_delivered,
+        pbd.unclaimed_quantity,
+        pbd.remark,
+        pbd.create_by_id,
+        pbd.create_by,
+        pbd.create_time,
+        pbd.update_by_id,
+        pbd.update_by,
+        pbd.update_time,
+        pbd.del_flag,
+        pbd.data_approval_status,
+        pbd.process_key,
+        pbd.task_process_key,
+        pbd.task_node_key,
+        pbd.production_bom_id,
+       -- m.stockQuantity as stockQuantity
+        sum(m.stockQuantity) as stockQuantity,
+        pbs.demand_document as order_number
+        FROM
+        {DBNAME}.production_boms_details AS pbd
+        LEFT JOIN {DBNAME}.materialinfo AS m ON pbd.subitem_material_code = m.material_code
+        LEFT JOIN {DBNAME}.production_boms AS pbs ON pbs.id = pbd.production_bom_id
+        where pbd.production_bom_id in
+        <foreach item="bomId" collection="list" open="(" separator="," close=")">
+            #{bomId}
+        </foreach>
+        group by 	pbd.subitem_material_code,pbd.id,	pbd.subitem_material_name,
+        pbd.subitem_detail_model,
+        pbd.subitem_detail_specifications,
+        pbd.working_procedure,
+        pbd.quantity_to_be_delivered,
+        pbd.unclaimed_quantity,
+        pbd.remark,
+        pbd.create_by_id,
+        pbd.create_by,
+        pbd.create_time,
+        pbd.update_by_id,
+        pbd.update_by,
+        pbd.update_time,
+        pbd.del_flag,
+        pbd.data_approval_status,
+        pbd.process_key,
+        pbd.task_process_key,
+        pbd.task_node_key,
+        pbd.production_bom_id,
+        pbs.demand_document
+    </select>
+
+    <insert id="insertProductionBomsDetails" parameterType="com.zkqy.amichi.domain.ProductionBomsDetails" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.production_boms_details
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="subitemMaterialCode != null">subitem_material_code,</if>
+            <if test="subitemMaterialName != null">subitem_material_name,</if>
+            <if test="subitemDetailModel != null">subitem_detail_model,</if>
+            <if test="subitemDetailSpecifications != null">subitem_detail_specifications,</if>
+            <if test="workingProcedure != null">working_procedure,</if>
+            <if test="quantityToBeDelivered != null">quantity_to_be_delivered,</if>
+            <if test="unclaimedQuantity != null">unclaimed_quantity,</if>
+            <if test="remark != null">remark,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+            <if test="productionBomId != null  and productionBomId != ''">production_bom_id</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="subitemMaterialCode != null">#{subitemMaterialCode},</if>
+            <if test="subitemMaterialName != null">#{subitemMaterialName},</if>
+            <if test="subitemDetailModel != null">#{subitemDetailModel},</if>
+            <if test="subitemDetailSpecifications != null">#{subitemDetailSpecifications},</if>
+            <if test="workingProcedure != null">#{workingProcedure},</if>
+            <if test="quantityToBeDelivered != null">#{quantityToBeDelivered},</if>
+            <if test="unclaimedQuantity != null">#{unclaimedQuantity},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+            <if test="productionBomId != null  and productionBomId != ''">#{productionBomId}</if>
+         </trim>
+    </insert>
+
+    <update id="updateProductionBomsDetails" parameterType="com.zkqy.amichi.domain.ProductionBomsDetails">
+        update {DBNAME}.production_boms_details
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="subitemMaterialCode != null">subitem_material_code = #{subitemMaterialCode},</if>
+            <if test="subitemMaterialName != null">subitem_material_name = #{subitemMaterialName},</if>
+            <if test="subitemDetailModel != null">subitem_detail_model = #{subitemDetailModel},</if>
+            <if test="subitemDetailSpecifications != null">subitem_detail_specifications = #{subitemDetailSpecifications},</if>
+            <if test="workingProcedure != null">working_procedure = #{workingProcedure},</if>
+            <if test="quantityToBeDelivered != null">quantity_to_be_delivered = #{quantityToBeDelivered},</if>
+            <if test="unclaimedQuantity != null">unclaimed_quantity = #{unclaimedQuantity},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+            <if test="productionBomId != null  and productionBomId != ''">production_bom_id=#{productionBomId}</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteProductionBomsDetailsById" parameterType="Long">
+        delete from {DBNAME}.production_boms_details where id = #{id}
+    </delete>
+
+    <delete id="deleteProductionBomsDetailsByIds" parameterType="String">
+        delete from {DBNAME}.production_boms_details where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 151 - 0
zkqy-fujian-amichi/src/main/resources/mapper/ProductionBomsMapper.xml

@@ -0,0 +1,151 @@
+<?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.amichi.mapper.ProductionBomsMapper">
+    
+    <resultMap type="com.zkqy.amichi.domain.ProductionBoms" id="ProductionBomsResult">
+        <result property="id"    column="id"    />
+        <result property="documentNumber"    column="document_number"    />
+        <result property="demandDocument"    column="demand_document"    />
+        <result property="productCode"    column="product_code"    />
+        <result property="productName"    column="product_name"    />
+        <result property="modelNumber"    column="model_number"    />
+        <result property="specification"    column="specification"    />
+        <result property="productionOrderNumber"    column="production_order_number"    />
+        <result property="productionOrderStatus"    column="production_order_status"    />
+        <result property="documentStatus"    column="document_status"    />
+        <result property="remark"    column="remark"    />
+        <result property="createById"    column="create_by_id"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateById"    column="update_by_id"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="delFlag"    column="del_flag"    />
+        <result property="dataApprovalStatus"    column="data_approval_status"    />
+        <result property="processKey"    column="process_key"    />
+        <result property="taskProcessKey"    column="task_process_key"    />
+        <result property="taskNodeKey"    column="task_node_key"    />
+    </resultMap>
+
+    <sql id="selectProductionBomsVo">
+        select id, document_number, demand_document, product_code, product_name, model_number, specification, production_order_number, production_order_status, document_status, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, data_approval_status, process_key, task_process_key, task_node_key from {DBNAME}.production_boms
+    </sql>
+
+    <select id="selectProductionBomsList" parameterType="com.zkqy.amichi.domain.ProductionBoms" resultMap="ProductionBomsResult">
+        <include refid="selectProductionBomsVo"/>
+        <where>  
+            <if test="documentNumber != null  and documentNumber != ''"> and document_number = #{documentNumber}</if>
+            <if test="demandDocument != null  and demandDocument != ''"> and demand_document = #{demandDocument}</if>
+            <if test="productCode != null  and productCode != ''"> and product_code = #{productCode}</if>
+            <if test="productName != null  and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
+            <if test="modelNumber != null  and modelNumber != ''"> and model_number = #{modelNumber}</if>
+            <if test="specification != null  and specification != ''"> and specification = #{specification}</if>
+            <if test="productionOrderNumber != null  and productionOrderNumber != ''"> and production_order_number = #{productionOrderNumber}</if>
+            <if test="productionOrderStatus != null  and productionOrderStatus != ''"> and production_order_status = #{productionOrderStatus}</if>
+            <if test="documentStatus != null  and documentStatus != ''"> and document_status = #{documentStatus}</if>
+            <if test="createById != null "> and create_by_id = #{createById}</if>
+            <if test="updateById != null "> and update_by_id = #{updateById}</if>
+            <if test="dataApprovalStatus != null  and dataApprovalStatus != ''"> and data_approval_status = #{dataApprovalStatus}</if>
+            <if test="processKey != null  and processKey != ''"> and process_key = #{processKey}</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>
+            and del_flag=0
+        </where>
+    </select>
+    
+    <select id="selectProductionBomsById" parameterType="Long" resultMap="ProductionBomsResult">
+        <include refid="selectProductionBomsVo"/>
+        where id = #{id} and del_flag=0
+    </select>
+        
+    <insert id="insertProductionBoms" parameterType="com.zkqy.amichi.domain.ProductionBoms" useGeneratedKeys="true" keyProperty="id">
+        insert into {DBNAME}.production_boms
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="documentNumber != null">document_number,</if>
+            <if test="demandDocument != null">demand_document,</if>
+            <if test="productCode != null">product_code,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="modelNumber != null">model_number,</if>
+            <if test="specification != null">specification,</if>
+            <if test="productionOrderNumber != null">production_order_number,</if>
+            <if test="productionOrderStatus != null">production_order_status,</if>
+            <if test="documentStatus != null">document_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="createTime != null">create_time,</if>
+            <if test="updateById != null">update_by_id,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="delFlag != null">del_flag,</if>
+            <if test="dataApprovalStatus != null">data_approval_status,</if>
+            <if test="processKey != null">process_key,</if>
+            <if test="taskProcessKey != null">task_process_key,</if>
+            <if test="taskNodeKey != null">task_node_key,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="documentNumber != null">#{documentNumber},</if>
+            <if test="demandDocument != null">#{demandDocument},</if>
+            <if test="productCode != null">#{productCode},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="modelNumber != null">#{modelNumber},</if>
+            <if test="specification != null">#{specification},</if>
+            <if test="productionOrderNumber != null">#{productionOrderNumber},</if>
+            <if test="productionOrderStatus != null">#{productionOrderStatus},</if>
+            <if test="documentStatus != null">#{documentStatus},</if>
+            <if test="remark != null">#{remark},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateById != null">#{updateById},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="delFlag != null">#{delFlag},</if>
+            <if test="dataApprovalStatus != null">#{dataApprovalStatus},</if>
+            <if test="processKey != null">#{processKey},</if>
+            <if test="taskProcessKey != null">#{taskProcessKey},</if>
+            <if test="taskNodeKey != null">#{taskNodeKey},</if>
+         </trim>
+    </insert>
+
+    <update id="updateProductionBoms" parameterType="com.zkqy.amichi.domain.ProductionBoms">
+        update {DBNAME}.production_boms
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="documentNumber != null">document_number = #{documentNumber},</if>
+            <if test="demandDocument != null">demand_document = #{demandDocument},</if>
+            <if test="productCode != null">product_code = #{productCode},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="modelNumber != null">model_number = #{modelNumber},</if>
+            <if test="specification != null">specification = #{specification},</if>
+            <if test="productionOrderNumber != null">production_order_number = #{productionOrderNumber},</if>
+            <if test="productionOrderStatus != null">production_order_status = #{productionOrderStatus},</if>
+            <if test="documentStatus != null">document_status = #{documentStatus},</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="dataApprovalStatus != null">data_approval_status = #{dataApprovalStatus},</if>
+            <if test="processKey != null">process_key = #{processKey},</if>
+            <if test="taskProcessKey != null">task_process_key = #{taskProcessKey},</if>
+            <if test="taskNodeKey != null">task_node_key = #{taskNodeKey},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteProductionBomsById" parameterType="Long">
+        delete from {DBNAME}.production_boms where id = #{id}
+    </delete>
+
+    <delete id="deleteProductionBomsByIds" parameterType="String">
+        delete from {DBNAME}.production_boms where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

Some files were not shown because too many files changed in this diff