liurunyu
2024-10-08 dbe3ed318dfe013663271fd64c8b8b152005e0b6
Merge branch 'master' of http://8.140.179.55:20000/r/pms-SV
26个文件已添加
77个文件已修改
3578 ■■■■ 已修改文件
pms-parent/pms-common/pom.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-common/pom说明.txt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/pom.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaUserMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductMapper.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrAssemblyPlanMapper.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrBillOfMaterialMapper.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrOrderItemMapper.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrOrderMapper.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrProductionNodeMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrScheduleMapper.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrScheduleRelMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogPastMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoBa/BaUser.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestInspectionItems.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrAssemblyPlan.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrBillOfMaterial.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrOrder.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrOrderItem.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrSchedule.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrScheduleRel.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/DingDingUtils.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/QrCodeConstant.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/QrCodeUtil.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/application-global.yml 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaRolePrivilegeMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaSysSetMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaUserMapper.xml 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaUserRoleMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/OthFileMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltMaterialMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductFileMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductTestInspectionItemsMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductionLineMapper.xml 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrBatchNumberMapper.xml 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrBillOfMaterialMapper.xml 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrDevOpsPlanMapper.xml 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrOrderItemMapper.xml 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrOrderMapper.xml 240 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml 141 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrScheduleRelMapper.xml 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrWorkingInstructionMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkHistoryMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml 76 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeLastMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogPastMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaWipSnExMapper.xml 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/privileges-config.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/pom.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/UserCtrl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/test/java/com/dy/pmsBase/PmsWebBaseApplicationTests.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportCtrl.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/pom.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/QueryVo.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/QueryVo.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/pom.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/config/WebFilterConfiguration.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderCtrl.java 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderStatusEnum.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderSv.java 203 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/QueryVo.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessSv.java 50 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/CustomCellWriteHandler.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ExcelVo.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/QueryVo.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleCtrl.java 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleSv.java 153 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/ExcelDeviceNoVo.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/pom.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/config/AppStartupRunner.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/task/LogMoveTask.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pom.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-common/pom.xml
@@ -21,6 +21,13 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring.boot.version}</version>
            <exclusions>
                <!-- å¼•å…¥log4j2日志时需去掉默认的logback -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
pms-parent/pms-common/pom˵Ã÷.txt
@@ -1 +1 @@
pms-common的pom撑管所有pms-*的模块的pom的依赖
pms-common的pom掌管所有pms-*的模块的pom的依赖
pms-parent/pms-global/pom.xml
@@ -21,5 +21,10 @@
            <artifactId>pms-common</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.aliyun</groupId>
            <artifactId>alibaba-dingtalk-service-sdk</artifactId>
            <version>2.0.0</version>
        </dependency>
    </dependencies>
</project>
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaUserMapper.java
@@ -25,6 +25,8 @@
    BaUser login(Map<String, Object> params) ;
    List<BaUser> getUserList() ;
    Long selectSomeCount(Map<String, Object> params) ;
    List<BaUser> selectSome(Map<String, Object> params) ;
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPlt/PltProductMapper.java
@@ -23,9 +23,11 @@
    List<PltProduct> selectAll(Map<String, Object> params);
    List<PltProduct> selectByOrderId(@Param("orderId") Long orderId);
    String selectMaxCode();
    boolean exists(@Param("name") String name, @Param("id") Long id);
    boolean exists(@Param("name") String name, @Param("type") String type ,  @Param("id") Long id);
    PltProduct selectByCode(String productCode);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrAssemblyPlanMapper.java
@@ -1,5 +1,6 @@
package com.dy.pmsGlobal.daoPr;
import cn.hutool.json.JSONObject;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -38,6 +39,14 @@
    PrAssemblyPlan selectByDeviceNo(@Param("proCode") String proCode,@Param("batchNumber") String batchNumber);
    Long countByPlanIdAndNodeId(@Param("planId") Long planId,@Param("nodeId") Long nodeId);
    List<JSONObject> selectByPlanName(@Param("planName") String planName);
    PrAssemblyPlan selectByBatchId(@Param("batchId") Long batchId);
    List<JSONObject> queryPlanList();
    List<PrAssemblyPlan> selectAssyPlanList(PrAssemblyPlan params);
    List<PrAssemblyPlan> selectAssyPlanSimplify(PrAssemblyPlan params);
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrBillOfMaterialMapper.java
New file
@@ -0,0 +1,23 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrBillOfMaterial;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface PrBillOfMaterialMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrBillOfMaterial record);
    int insertSelective(PrBillOfMaterial record);
    PrBillOfMaterial selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrBillOfMaterial record);
    int updateByPrimaryKey(PrBillOfMaterial record);
    int insertMany(List<PrBillOfMaterial> records);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrOrderItemMapper.java
New file
@@ -0,0 +1,26 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPlt.PltProductParams;
import com.dy.pmsGlobal.pojoPr.PrOrderItem;
import org.apache.ibatis.annotations.Mapper;
/**
* @author User
* @description é’ˆå¯¹è¡¨ã€pr_order_item】的数据库操作Mapper
* @createDate 2024-08-19 14:41:42
* @Entity com.dy.pmsGlobal.pojoPr.PrOrderItem
*/
@Mapper
public interface PrOrderItemMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrOrderItem record);
    int insertSelective(PrOrderItem record);
    PrOrderItem selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrOrderItem record);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrOrderMapper.java
New file
@@ -0,0 +1,37 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPlt.PltProduct;
import com.dy.pmsGlobal.pojoPr.PrOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* @author User
* @description é’ˆå¯¹è¡¨ã€pr_order】的数据库操作Mapper
* @createDate 2024-08-19 14:38:52
* @Entity com.dy.pmsGlobal.pojoPr.PrOrder
*/
@Mapper
public interface PrOrderMapper {
    int deleteByPrimaryKey(Long id);
    int deleteLogicById(Long id);
    int insertSelective(PrOrder record);
    PrOrder selectByPrimaryKey(Long id);
    Long selectSomeCount(Map<String, Object> params);
    List<PrOrder> selectSome(Map<String, Object> params);
    List<PrOrder> selectAll(Map<String, Object> params);
    boolean exists(@Param("name") String name, @Param("id") Long id);
    int updateByPrimaryKeySelective(PrOrder record);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrProductionNodeMapper.java
@@ -23,6 +23,8 @@
    PrProductionNode selectByPrimaryKey(Long id);
    PrProductionNode selectNodeBySort(@Param("processId") Long processId , @Param("sort") Integer sort);
    int updateByPrimaryKeySelective(PrProductionNode record);
    List<PrProductionNode> selectByProcess(@Param("processId") Long processId);
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrScheduleMapper.java
New file
@@ -0,0 +1,29 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrSchedule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface PrScheduleMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrSchedule record);
    int insertSelective(PrSchedule record);
    PrSchedule selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrSchedule record);
    int updateByPrimaryKey(PrSchedule record);
    Long selectSomeCount(Map<String, Object> params);
    List<PrSchedule> selectSome(Map<String, Object> params);
    List<PrSchedule> selectAll(@Param("scheduleDate") String scheduleDate,@Param("userId") Long userId);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrScheduleRelMapper.java
New file
@@ -0,0 +1,25 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrScheduleRel;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface PrScheduleRelMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrScheduleRel record);
    int insertSelective(PrScheduleRel record);
    PrScheduleRel selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrScheduleRel record);
    int updateByPrimaryKey(PrScheduleRel record);
    void deleteByScheduleId(Long scheduleId);
    List<PrScheduleRel> selectByScheduleId(Long scheduleId);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoSta/StaDeviceProductionLogPastMapper.java
@@ -17,5 +17,7 @@
    StaDeviceProductionLogPast selectByPrimaryKey(Long id);
    Long countLastDayLogs();
//    void createNewTable(String newTableName);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoBa/BaUser.java
@@ -59,7 +59,7 @@
    /**
     * å¯†ç ,MD5加密
     */
    @NotEmpty(message = "密码不能为空") //不能为空也不能为null
//    @NotEmpty(message = "密码不能为空") //不能为空也不能为null
    @Length(message = "密码必须{max}位数据", min = 6, max = 6)
    @JSONField(serialize = false)
    public String password;
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductQualityInspectionItems.java
@@ -40,6 +40,9 @@
    @TableField(exist = false)
    public String proName;
    @TableField(exist = false)
    public String proType;
    /**
     * å“æ£€é¡¹ç›®
     */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductScrappingReason.java
@@ -45,6 +45,9 @@
    @TableField(exist = false)
    public String proName;
    @TableField(exist = false)
    public String proType;
    /**
     * æŽ’序(从大到小)
     */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductTestInspectionItems.java
@@ -41,6 +41,9 @@
    @TableField(exist = false)
    public String proName;
    @TableField(exist = false)
    public String proType;
    /**
     * æµ‹è¯•项目
     */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductUnqualifiedReason.java
@@ -45,6 +45,9 @@
    @TableField(exist = false)
    public String proName;
    @TableField(exist = false)
    public String proType;
    /**
     * æŽ’序(从大到小)
     */
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrAssemblyPlan.java
@@ -38,6 +38,15 @@
    public Long proId;
    /**
     * äº§å“å®žä½“编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long orderId;
    @TableField(exist = false)
    public String orderName;
    /**
     * æ‰¹æ¬¡å®žä½“编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
@@ -90,6 +99,8 @@
    @TableField(exist = false)
    public String proName;
    @TableField(exist = false)
    public String proType;
    @TableField(exist = false)
    public String batchNo;
    @TableField(exist = false)
    public String processName;
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrBillOfMaterial.java
New file
@@ -0,0 +1,45 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
/**
 * èŠ‚ç‚¹-物料清单关联表
 */
@TableName(value="pr_bill_of_material", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrBillOfMaterial implements BaseEntity {
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    /**
    * èŠ‚ç‚¹å®žä½“ç¼–å·
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long nodeId;
    /**
    * æ–‡ä»¶ç¼–号
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long fileId;
    /**
     * æ–‡ä»¶ä¸‹è½½åœ°å€
     */
    @TableField(exist = false)
    public String webUrl;
    @TableField(exist = false)
    public String orgName;
    @TableField(exist = false)
    public String extName;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrOrder.java
New file
@@ -0,0 +1,101 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import java.util.Date;
import java.util.List;
/**
*
* @TableName pr_order
*/
@TableName(value="pr_order", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrOrder implements BaseEntity {
    /**
    * ä¸»é”®
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId(value = "id", type = IdType.INPUT)
    public Long id;
    /**
    * åç§°
    */
    @NotEmpty(message = "名称不能为空")
    public String name;
    /**
    * å®¢æˆ·åç§°
    */
    public String customerName;
    /**
     * é¡¹ç›®åç§°
     */
    public String projectName;
    /**
    * è®¢å•负责人
    */
    public String director;
    /**
    * è´Ÿè´£äººæ‰‹æœºå·
    */
    public String dMobile;
    /**
    * äº¤ä»˜æ—¥æœŸ
    */
    public String deliveryDate;
    /**
     * äº¤ä»˜åœ°å€
     */
    public String deliveryAddress;
    /**
     * æ”¶è´§äºº
     */
    public String recipient;
    /**
     * æ”¶è´§äººæ‰‹æœºå·
     */
    public String rMobile;
    /**
    * çŠ¶æ€:正常(1)、暂停(0)、结束(-1)
    */
    public Integer status;
    /**
     * åˆ›å»ºäºº
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long creator;
    /**
    * åˆ›å»ºæ—¶é—´
    */
    public Date dt;
    /**
    * æ˜¯å¦åˆ é™¤ï¼Œ1是,0否
    */
    @JSONField(serialize = false)
    public Boolean deleted;
    /**
    * å¤‡æ³¨
    */
    public String remark;
    @NotNull(message = "订单项不能为空")
    public List<PrOrderItem> items;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrOrderItem.java
New file
@@ -0,0 +1,60 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.*;
/**
*
* @TableName pr_order_item
*/
@TableName(value="pr_order_item", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrOrderItem implements BaseEntity {
    /**
    * ç¼–号
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    /**
    * è®¢å•编号
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long orderId;
    /**
     * äº§å“å®žä½“编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long proId;
    @TableField(exist = false)
    public String name;
    @TableField(exist = false)
    public String proType;
    /**
    * ç”Ÿäº§æ•°é‡
    */
    public Integer number;
    /**
    * å®Œæˆæ•°é‡
    */
    public Integer completeNumber;
    @JSONField(serialize = false)
    public Boolean deleted;
    @TableField(exist = false)
    public String completeRate;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionNode.java
@@ -94,5 +94,7 @@
    @TableField(exist = false)
    public PrWorkingInstruction instruction;
    @TableField(exist = false)
    public PrBillOfMaterial bill;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java
@@ -45,6 +45,11 @@
     */
    @TableField(exist = false)
    public String proName;
    /**
     * äº§å“ç±»åž‹
     */
    @TableField(exist = false)
    public String proType;
    /**
     * åç§°
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrSchedule.java
New file
@@ -0,0 +1,62 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.*;
import java.util.Date;
import java.util.List;
/**
 * æŽ’班表
 */
@TableName(value="pr_schedule", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrSchedule implements BaseEntity {
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    /**
    * ç”¨æˆ·id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @NotNull(message="用户id不能为空")
    public Long userId;
    @TableField(exist = false)
    public String userName;
    /**
    * æŽ’班日期
    */
    @NotEmpty(message="排班日期不能为空")
    public String scheduleDate;
    /**
    * æ˜¯å¦åˆ é™¤ï¼Œ1是,0否
    */
    @JSONField(serialize = false)
    public Byte deleted;
    /**
     * åˆ›å»ºæ—¶é—´
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date dt;
    @Valid
    @NotEmpty(message = "排班内容不能为空")
    public List<PrScheduleRel> relList;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrScheduleRel.java
New file
@@ -0,0 +1,61 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import jakarta.validation.constraints.NotEmpty;
import lombok.*;
/**
 * æŽ’班子表
 */
@TableName(value="pr_schedule_rel", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrScheduleRel implements BaseEntity {
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long id;
    /**
    * æŽ’班id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long scheduleId;
    /**
    * ä»»åŠ¡è®¡åˆ’id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long planId;
    @TableField(exist = false)
    public String planName;
    /**
    * èŠ‚ç‚¹id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long nodeId;
    @TableField(exist = false)
    public String nodeName;
    /**
    * å·¥ç«™id
    */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long stationId;
    @TableField(exist = false)
    public String stationName;
    /**
    * å·¥ä½œå†…容
    */
    @NotEmpty(message="工作内容不能为空")
    public String workDetails;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaDeviceLast.java
@@ -62,6 +62,15 @@
    */
    public String nodeContent;
    /**
     * ä¸‹ä¸€ä¸ªèŠ‚ç‚¹id
     */
    public Long nextNode;
    /**
     * ä¸‹ä¸€ä¸ªèŠ‚ç‚¹ä½œä¸šå†…å®¹
     */
    public String nextNodeContent;
    /**
    * è®°å½•设备周期内容
    */
    public String deviceCycleContent;
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/DingDingUtils.java
New file
@@ -0,0 +1,84 @@
package com.dy.pmsGlobal.util;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.OapiRobotSendRequest;
import com.dingtalk.api.response.OapiRobotSendResponse;
import com.taobao.api.ApiException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.binary.Base64;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
@Slf4j
@Component
public class DingDingUtils {
    @Value("${dingtalk.robot.access-token}")
    private String custom_robot_token;
//    public static final String USER_ID= "<you need @ group user's userId>";
    @Value("${dingtalk.at-all}")
    private boolean at_all;
    @Value("${dingtalk.robot.secret}")
    private String secret;
    @Value("${dingtalk.robot.url}")
    private String url;
    public OapiRobotSendResponse send(String msg) {
        try {
            Long timestamp = System.currentTimeMillis();
            String sign = sign(timestamp, secret);
            System.out.println(sign);
            //sign字段和timestamp字段必须拼接到请求URL上,否则会出现 310000 çš„错误信息
            DingTalkClient client = new DefaultDingTalkClient(url+"?sign="+sign+"&timestamp="+timestamp);
            OapiRobotSendRequest req = new OapiRobotSendRequest();
            /**
             * å‘送文本消息
             */
            //定义文本内容
            OapiRobotSendRequest.Text text = new OapiRobotSendRequest.Text();
            text.setContent(msg);
            //定义 @ å¯¹è±¡
            OapiRobotSendRequest.At at = new OapiRobotSendRequest.At();
            if(at_all) {
                at.setIsAtAll(true);
            }
            //设置消息类型
            req.setMsgtype("text");
            req.setText(text);
            req.setAt(at);
            OapiRobotSendResponse rsp = client.execute(req, custom_robot_token);
            log.error("钉钉响应:"+rsp);
            return rsp;
        } catch (ApiException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            throw new RuntimeException(e);
        } catch (NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        } catch (InvalidKeyException e) {
            throw new RuntimeException(e);
        }
        return null;
    }
    private String sign(Long timestamp, String secret) throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException {
        String stringToSign = timestamp + "\n" + secret;
        Mac mac = Mac.getInstance("HmacSHA256");
        mac.init(new SecretKeySpec(secret.getBytes("UTF-8"), "HmacSHA256"));
        byte[] signData = mac.doFinal(stringToSign.getBytes("UTF-8"));
        String sign = URLEncoder.encode(new String(Base64.encodeBase64(signData)),"UTF-8");
        return sign;
    }
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/QrCodeConstant.java
@@ -21,6 +21,7 @@
    public static final String MarkLogout = "102007" ; //注销:生产作业人员在生产后注销工站绑定
    public static final String MarkQualified = "102008" ; //合格:设备生产过程中本工站生产合格
    public static final String MarkReset = "102009" ; //重置:前端清缓存使用
    public static final String MarkSchedule = "102010" ; //排班表:扫描出排班表
    public static final int MarkQrCodeWidth = 300 ;
    public static final int MarkQrCodeHeight = 300 ;
@@ -34,7 +35,8 @@
                {MarkWaste, "废品"},
                {MarkLogout, "注销"},
                {MarkQualified, "合格"},
                {MarkReset, "重置"}} ;
                {MarkReset, "重置"},
                {MarkSchedule, "排班表"}} ;
    }
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/QrCodeUtil.java
@@ -82,7 +82,36 @@
            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
            EasyExcel.write(response.getOutputStream(), list.get(0).getClass()).sheet(sheetName).doWrite(list);
        }catch (Exception e){
            log.error("导出产品信息异常", e);
            log.error("导出{}异常",sheetName,e);
        }
    }
    public static void downloadExcelSheets(HttpServletResponse response, String fileName, String sheetName, List<Converter> list){
        if(CollectionUtils.isEmpty(list)){
            return;
        }
        /*try(ExcelWriter excelWriter = EasyExcel.write(file).build()) {
            WriteSheet writeSheet;
            for (SheetInfoBean bean : sheetInfoList) {
                // æž„建sheet对象
                writeSheet = EasyExcel.writerSheet(bean.getSheetName()).head(bean.getHeadClass()).build();
                // å†™å‡ºsheet数据
                excelWriter.write(bean.getDataList(), writeSheet);
            }
            // å…³æµ
            excelWriter.finish();
        } catch (Exception e) {
            // do something you want
        }*/
        try{
            response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
            response.setCharacterEncoding("utf-8");
            fileName = URLEncoder.encode(fileName, "UTF-8").replaceAll("\\+", "%20");
            response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
            EasyExcel.write(response.getOutputStream(), list.get(0).getClass()).sheet(sheetName).doWrite(list);
        }catch (Exception e){
            log.error("导出{}异常",sheetName,e);
        }
    }
}
pms-parent/pms-global/src/main/resources/application-global.yml
@@ -43,7 +43,12 @@
        cache-enabled: true  #打开全局缓存开关(二级环境),默认值是true
        #default-enum-type-handler: com.dy.common.mybatis.envm.EnumCodeTypeHandler
dingtalk:
    robot:
        url: https://oapi.dingtalk.com/robot/send
        access-token: 5004482dce6b24d0e1e655b8e4376a6418cfcebce17ff792d0e68cbb63d6eb5b
        secret: SEC985ad412f35ece68bb239cad88b6fba59b19461dd8d067e80fafa1270d6ab465
    at-all: true
#不进行userToken过滤的URL,@ConfigurationProperties要求tokennofilter中所有字母都小写
tokennofilter:
    urls:
pms-parent/pms-global/src/main/resources/mapper/BaLogMapper.xml
@@ -39,19 +39,19 @@
      <if test="userId != null">
        user_id,
      </if>
      <if test="userName != null">
      <if test="userName != null and userName !=''">
        user_name,
      </if>
      <if test="content != null">
      <if test="content != null and content !=''">
        content,
      </if>
      <if test="code != null">
      <if test="code != null and code !=''">
        code,
      </if>
      <if test="msg != null">
      <if test="msg != null and msg !=''">
        msg,
      </if>
      <if test="ip != null">
      <if test="ip != null and ip !=''">
        ip,
      </if>
    </trim>
@@ -59,19 +59,19 @@
      <if test="userId != null">
        #{userId,jdbcType=BIGINT},
      </if>
      <if test="userName != null">
      <if test="userName != null and userName !=''">
        #{userName,jdbcType=VARCHAR},
      </if>
      <if test="content != null">
      <if test="content != null and content !=''">
        #{content,jdbcType=VARCHAR},
      </if>
      <if test="code != null">
      <if test="code != null and code !=''">
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="msg != null">
      <if test="msg != null and msg !=''">
        #{msg,jdbcType=VARCHAR},
      </if>
      <if test="ip != null">
      <if test="ip != null and ip !=''">
        #{ip,jdbcType=VARCHAR},
      </if>
    </trim>
@@ -82,7 +82,7 @@
    <include refid="Base_Column_List" />
    from ba_log r
    <trim prefix="where " suffixOverrides="and">
      <if test="userId != null and userId != ''">
      <if test="userId != null">
        user_id = #{userId,jdbcType=BIGINT} and
      </if>
      <if test="userName != null and userName != ''">
@@ -91,7 +91,7 @@
      <if test="content != null  and content != '' ">
        content like concat('%', #{content}, '%') and
      </if>
      <if test="dt != null and dt != '' ">
      <if test="dt != null">
        DATE_FORMAT(dt, '%Y-%m-%d') = #{dt,jdbcType=TIMESTAMP} and
      </if>
      <if test="ip != null and ip != '' ">
@@ -110,7 +110,7 @@
    select count(1)
    from ba_log r
    <trim prefix="where " suffixOverrides="and">
      <if test="userId != null and userId != ''">
      <if test="userId != null">
        user_id = #{userId,jdbcType=BIGINT} and
      </if>
      <if test="userName != null and userName != ''">
@@ -119,7 +119,7 @@
      <if test="content != null  and content != '' ">
        content like concat('%', #{content}, '%') and
      </if>
      <if test="dt != null and dt != '' ">
      <if test="dt != null">
        DATE_FORMAT(dt, '%Y-%m-%d') = #{dt,jdbcType=TIMESTAMP} and
      </if>
      <if test="ip != null and ip != '' ">
pms-parent/pms-global/src/main/resources/mapper/BaPrivilegeMapper.xml
@@ -78,16 +78,16 @@
      <if test="id != null">
        id,
      </if>
      <if test="num != null">
      <if test="num != null and num !=''">
        num,
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name`,
      </if>
      <if test="type != null">
        `type`,
      </if>
      <if test="typeName != null">
      <if test="typeName!= null and typeName !=''">
        type_name,
      </if>
    </trim>
@@ -98,13 +98,13 @@
      <if test="num != null">
        #{num},
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        #{name},
      </if>
      <if test="type != null">
      <if test="type != null and type !=''">
        #{type},
      </if>
      <if test="typeName != null">
      <if test="typeName!= null and typeName !=''">
        #{typeName},
      </if>
    </trim>
@@ -113,16 +113,16 @@
    <!--@mbg.generated-->
    update ba_privilege
    <set>
      <if test="num != null">
      <if test="num != null and num !=''">
        num = #{num},
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name` = #{name},
      </if>
      <if test="type != null">
      <if test="type != null and type !=''">
        `type` = #{type},
      </if>
      <if test="typeName != null">
      <if test="typeName!= null and typeName !=''">
        type_name = #{typeName},
      </if>
    </set>
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml
@@ -67,7 +67,7 @@
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name`,
      </if>
      <if test="disabled != null">
@@ -81,7 +81,7 @@
      <if test="id != null">
        #{id},
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        #{name},
      </if>
      <if test="disabled != null">
@@ -96,7 +96,7 @@
    <!--@mbg.generated-->
    update ba_role
    <set>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name` = #{name},
      </if>
      <if test="disabled != null">
@@ -132,10 +132,10 @@
      <if test="name != null and name != ''">
        r.name like concat('%', #{name}, '%') and
      </if>
      <if test="disabled != null and disabled != ''">
      <if test="disabled != null">
        r.disabled =#{disabled,jdbcType=BOOLEAN} and
      </if>
      <if test="dt != null and dt != ''">
      <if test="dt != null">
        DATE_FORMAT(r.dt, '%Y-%m-%d') = #{dt,jdbcType=TIMESTAMP}
      </if>
    </trim>
@@ -153,10 +153,10 @@
      <if test="name != null and name != ''">
        r.name like concat('%', #{name}, '%') and
      </if>
      <if test="disabled != null and disabled != ''">
      <if test="disabled != null">
        r.disabled =#{disabled,jdbcType=BOOLEAN} and
      </if>
      <if test="dt != null and dt != ''">
      <if test="dt != null">
        DATE_FORMAT(r.dt, '%Y-%m-%d') = #{dt,jdbcType=TIMESTAMP}
      </if>
    </trim>
pms-parent/pms-global/src/main/resources/mapper/BaRolePrivilegeMapper.xml
@@ -35,7 +35,7 @@
      <if test="roleId != null">
        role_id,
      </if>
      <if test="privilegeId != null">
      <if test="privilegeId!= null">
        privilege_id,
      </if>
    </trim>
@@ -43,7 +43,7 @@
      <if test="roleId != null">
        #{roleId},
      </if>
      <if test="privilegeId != null">
      <if test="privilegeId!= null">
        #{privilegeId},
      </if>
    </trim>
pms-parent/pms-global/src/main/resources/mapper/BaSysSetMapper.xml
@@ -30,7 +30,7 @@
      <if test="id != null">
        id,
      </if>
      <if test="sysName != null">
      <if test="sysName != null and sysName !=''">
        sys_name,
      </if>
    </trim>
@@ -38,7 +38,7 @@
      <if test="id != null">
        #{id},
      </if>
      <if test="sysName != null">
      <if test="sysName != null and sysName !=''">
        #{sysName},
      </if>
    </trim>
pms-parent/pms-global/src/main/resources/mapper/BaUserMapper.xml
@@ -84,6 +84,13 @@
    where disabled!=1 and deleted!=1 and phone=#{phone} and password=#{password}
  </select>
  <select id="getUserList" resultMap="loginResultMap" >
    select
    <include refid="Login_Column_List" />
    from ba_user
    where disabled!=1 and deleted!=1
  </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="oneResultMap">
    <!--@mbg.generated-->
    select 
@@ -105,7 +112,7 @@
      <if test="phone != null and phone !=''">
        bu.phone = #{phone,jdbcType=VARCHAR} and
      </if>
<!--      <if test="roleId != null">-->
<!--      <if test="roleId != null and roleId !=''">-->
<!--        ur.role_id=#{roleId,jdbcType=BIGINT} and-->
<!--      </if>-->
      <if test="disabled != null">
@@ -126,7 +133,7 @@
      <if test="phone != null and phone !=''">
        bu.phone = #{phone,jdbcType=VARCHAR} and
      </if>
<!--      <if test="roleId != null">-->
<!--      <if test="roleId != null and roleId !=''">-->
<!--        ur.role_id=#{roleId,jdbcType=BIGINT} and-->
<!--      </if>-->
      <if test="disabled != null">
@@ -142,7 +149,7 @@
  </select>
  <select id="selectNamesByAssistants" parameterType="java.lang.String" resultType="java.lang.String">
    SELECT GROUP_CONCAT(name) AS assistantNames FROM ba_user WHERE id IN
    <if test="assistants != null">
    <if test="assistants != null and assistants !=''">
      <foreach collection="assistants.split(',')" item="item" separator="," open="(" close=")">
        #{item,jdbcType=BIGINT}
      </foreach>
@@ -173,16 +180,16 @@
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name`,
      </if>
      <if test="phone != null">
      <if test="phone!= null and phone !=''">
        phone,
      </if>
      <if test="password != null">
      <if test="password!= null and password !=''">
        `password`,
      </if>
      <if test="supperAdmin != null">
      <if test="supperAdmin!= null">
        supper_admin,
      </if>
      <if test="disabled != null">
@@ -196,16 +203,16 @@
      <if test="id != null">
        #{id},
      </if>
      <if test="name != null">
      <if test="name != null and name !=''">
        #{name},
      </if>
      <if test="phone != null">
      <if test="phone!= null and phone !=''">
        #{phone},
      </if>
      <if test="password != null">
      <if test="password!= null and password !=''">
        #{password},
      </if>
      <if test="supperAdmin != null">
      <if test="supperAdmin!= null">
        #{supperAdmin},
      </if>
      <if test="disabled != null">
@@ -220,16 +227,16 @@
    <!--@mbg.generated-->
    update ba_user
    <set>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name` = #{name},
      </if>
      <if test="phone != null">
      <if test="phone!= null and phone !=''">
        phone = #{phone},
      </if>
      <if test="password != null">
      <if test="password!= null and password !=''">
        `password` = #{password},
      </if>
      <if test="supperAdmin != null">
      <if test="supperAdmin!= null">
        supper_admin = #{supperAdmin},
      </if>
      <if test="disabled != null">
pms-parent/pms-global/src/main/resources/mapper/BaUserRoleMapper.xml
@@ -23,7 +23,7 @@
      <if test="userId != null">
        user_id,
      </if>
      <if test="roleId != null">
      <if test="roleId != null and roleId !=''">
        role_id,
      </if>
    </trim>
@@ -31,7 +31,7 @@
      <if test="userId != null">
        #{userId},
      </if>
      <if test="roleId != null">
      <if test="roleId != null and roleId !=''">
        #{roleId},
      </if>
    </trim>
pms-parent/pms-global/src/main/resources/mapper/OthFileMapper.xml
@@ -45,19 +45,19 @@
      <if test="id != null">
        id,
      </if>
      <if test="orgName != null">
      <if test="orgName!= null and orgName !=''">
        org_name,
      </if>
      <if test="extName != null">
      <if test="extName!= null and extName !=''">
        ext_name,
      </if>
      <if test="newName != null">
      <if test="newName!= null and newName !=''">
        new_name,
      </if>
      <if test="hash != null">
      <if test="hash!= null">
        hash,
      </if>
      <if test="filePath != null">
      <if test="filePath!= null and filePath !=''">
        file_path,
      </if>
      <if test="dt != null">
@@ -68,19 +68,19 @@
      <if test="id != null">
        #{id},
      </if>
      <if test="orgName != null">
      <if test="orgName!= null and orgName !=''">
        #{orgName},
      </if>
      <if test="extName != null">
      <if test="extName!= null and extName !=''">
        #{extName},
      </if>
      <if test="newName != null">
      <if test="newName!= null and newName !=''">
        #{newName},
      </if>
      <if test="hash != null">
      <if test="hash!= null">
        #{hash},
      </if>
      <if test="filePath != null">
      <if test="filePath!= null and filePath !=''">
        #{filePath},
      </if>
      <if test="dt != null">
@@ -92,19 +92,19 @@
    <!--@mbg.generated-->
    update oth_file
    <set>
      <if test="orgName != null">
      <if test="orgName!= null and orgName !=''">
        org_name = #{orgName},
      </if>
      <if test="extName != null">
      <if test="extName!= null and extName !=''">
        ext_name = #{extName},
      </if>
      <if test="newName != null">
      <if test="newName!= null and newName !=''">
        new_name = #{newName},
      </if>
      <if test="hash != null">
      <if test="hash!= null">
        hash = #{hash},
      </if>
      <if test="filePath != null">
      <if test="filePath!= null and filePath !=''">
        file_path = #{filePath},
      </if>
      <if test="dt != null">
pms-parent/pms-global/src/main/resources/mapper/PltMaterialMapper.xml
@@ -56,22 +56,22 @@
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="name != null">name,</if>
                <if test="type != null">type,</if>
                <if test="length != null">length,</if>
                <if test="factory != null">factory,</if>
                <if test="name != null and name !=''">name,</if>
                <if test="type != null and type !=''">type,</if>
                <if test="length!= null and length !=''">length,</if>
                <if test="factory != null and factory !=''">factory,</if>
                <if test="deleted != null">deleted,</if>
                <if test="remark != null">remark,</if>
                <if test="remark != null and remark !=''">remark,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=INTEGER},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="type != null">#{type,jdbcType=VARCHAR},</if>
                <if test="length != null">#{length,jdbcType=VARCHAR},</if>
                <if test="factory != null">#{factory,jdbcType=VARCHAR},</if>
                <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
                <if test="type != null and type !=''">#{type,jdbcType=VARCHAR},</if>
                <if test="length!= null and length !=''">#{length,jdbcType=VARCHAR},</if>
                <if test="factory != null and factory !=''">#{factory,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltMaterial">
@@ -80,22 +80,22 @@
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="name != null">
                <if test="name != null and name !=''">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="type != null">
                <if test="type != null and type !=''">
                    type = #{type,jdbcType=VARCHAR},
                </if>
                <if test="length != null">
                <if test="length!= null and length !=''">
                    length = #{length,jdbcType=VARCHAR},
                </if>
                <if test="factory != null">
                <if test="factory != null and factory !=''">
                    factory = #{factory,jdbcType=VARCHAR},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
                <if test="remark != null">
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/PltProParamsMapper.xml
@@ -51,10 +51,10 @@
      <if test="proId != null">
        pro_id,
      </if>
      <if test="paramName != null">
      <if test="paramName!= null and paramName !=''">
        param_name,
      </if>
      <if test="paramValue != null">
      <if test="paramValue!= null and paramValue !=''">
        param_value,
      </if>
      <if test="deleted != null">
@@ -68,10 +68,10 @@
      <if test="proId != null">
        #{proId,jdbcType=BIGINT},
      </if>
      <if test="paramName != null">
      <if test="paramName!= null and paramName !=''">
        #{paramName,jdbcType=VARCHAR},
      </if>
      <if test="paramValue != null">
      <if test="paramValue!= null and paramValue !=''">
        #{paramValue,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
@@ -86,10 +86,10 @@
      <if test="proId != null">
        pro_id = #{proId,jdbcType=BIGINT},
      </if>
      <if test="paramName != null">
      <if test="paramName!= null and paramName !=''">
        param_name = #{paramName,jdbcType=VARCHAR},
      </if>
      <if test="paramValue != null">
      <if test="paramValue!= null and paramValue !=''">
        param_value = #{paramValue,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
pms-parent/pms-global/src/main/resources/mapper/PltProductFileMapper.xml
@@ -42,13 +42,13 @@
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="fileId != null">file_id,</if>
                <if test="fileType != null">file_type,</if>
                <if test="fileType != null and fileType !=''">file_type,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="fileId != null">#{fileId,jdbcType=BIGINT},</if>
                <if test="fileType != null">#{fileType,jdbcType=VARCHAR},</if>
                <if test="fileType != null and fileType !=''">#{fileType,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductFile">
@@ -60,7 +60,7 @@
                <if test="fileId != null">
                    file_id = #{fileId,jdbcType=BIGINT},
                </if>
                <if test="fileType != null">
                <if test="fileType != null and fileType !=''">
                    file_type = #{fileType,jdbcType=VARCHAR},
                </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml
@@ -41,6 +41,9 @@
    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
        select name proName from plt_product where id=#{proId,jdbcType=BIGINT}
    </select>
    <select id="selectProTypeById" parameterType="java.lang.Long" resultType="java.lang.String">
        select type proName from plt_product where id=#{proId,jdbcType=BIGINT}
    </select>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap2">
    <!--@mbg.generated-->
    select
@@ -56,22 +59,22 @@
        <if test="id != null">
          id,
        </if>
        <if test="code != null">
        <if test="code != null and code !=''">
          `code`,
        </if>
        <if test="name != null">
        <if test="name != null and name !=''">
          `name`,
        </if>
        <if test="type != null">
        <if test="type != null and type !=''">
          `type`,
        </if>
        <if test="image != null">
        <if test="image!= null and image !=''">
          image,
        </if>
        <if test="director != null">
        <if test="director != null and director !=''">
          director,
        </if>
        <if test="dMobile != null">
        <if test="dMobile != null and dMobile !=''">
          d_mobile,
        </if>
        <if test="deleted != null">
@@ -80,7 +83,7 @@
        <if test="dt != null">
          dt,
        </if>
        <if test="remark != null">
        <if test="remark != null and remark !=''">
          remark,
        </if>
    </trim>
@@ -88,22 +91,22 @@
        <if test="id != null">
          #{id,jdbcType=BIGINT},
        </if>
        <if test="code != null">
        <if test="code != null and code !=''">
          #{code,jdbcType=VARCHAR},
        </if>
        <if test="name != null">
        <if test="name != null and name !=''">
          #{name,jdbcType=VARCHAR},
        </if>
        <if test="type != null">
        <if test="type != null and type !=''">
          #{type,jdbcType=VARCHAR},
        </if>
        <if test="image != null">
        <if test="image!= null and image !=''">
          #{image,jdbcType=BIGINT},
        </if>
        <if test="director != null">
        <if test="director != null and director !=''">
          #{director,jdbcType=BIGINT},
        </if>
        <if test="dMobile != null">
        <if test="dMobile != null and dMobile !=''">
          #{dMobile,jdbcType=VARCHAR},
        </if>
        <if test="deleted != null">
@@ -112,7 +115,7 @@
        <if test="dt != null">
          #{dt,jdbcType=TIMESTAMP},
        </if>
        <if test="remark != null">
        <if test="remark != null and remark !=''">
          #{remark,jdbcType=VARCHAR},
        </if>
    </trim>
@@ -121,25 +124,25 @@
    <!--@mbg.generated-->
    update plt_product
    <set>
      <if test="name != null">
      <if test="name != null and name !=''">
        `name` = #{name,jdbcType=VARCHAR},
      </if>
      <if test="type != null">
      <if test="type != null and type !=''">
        `type` = #{type,jdbcType=VARCHAR},
      </if>
      <if test="image != null">
      <if test="image!= null and image !=''">
        image = #{image,jdbcType=BIGINT},
      </if>
      <if test="director != null">
      <if test="director != null and director !=''">
        director = #{director,jdbcType=BIGINT},
      </if>
      <if test="dMobile != null">
      <if test="dMobile != null and dMobile !=''">
        d_mobile = #{dMobile,jdbcType=VARCHAR},
      </if>
      <if test="dt != null">
        dt = #{dt,jdbcType=TIMESTAMP},
      </if>
      <if test="remark != null">
      <if test="remark != null and remark !=''">
        remark = #{remark,jdbcType=VARCHAR},
      </if>
    </set>
@@ -192,11 +195,26 @@
    </trim>
    order by id desc
  </select>
    <select id="selectByOrderId" resultType="com.dy.pmsGlobal.pojoPlt.PltProduct">
        SELECT
        <include refid="Join_Column_List">
            <property name="alias" value="p"/>
        </include>
        FROM
        <if test="orderId != null and orderId != ''">
            (select distinct(pro_id) as pro_id from pr_order_item WHERE deleted!=1 AND order_id = #{orderId,jdbcType=BIGINT}) poi,
        </if>
        (select * from plt_product  where  deleted!=1) p
        <if test="orderId != null and orderId != ''">
            WHERE poi.pro_id = p.id
        </if>
        order by id desc
    </select>
  <select id="selectMaxCode" resultType="java.lang.String">
    select max(code) from plt_product
  </select>
    <select id="exists" resultType="java.lang.Boolean">
        select count(1) from plt_product where name = #{name}
        select count(1) from plt_product where name = #{name} and type = #{type}
        <if test="id != null">
            and id != #{id}
        </if>
pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml
@@ -13,6 +13,8 @@
        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
        <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -39,7 +41,7 @@
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="proId != null">pro_id,</if>
            <if test="item != null">item,</if>
            <if test="item != null and item !=''">item,</if>
            <if test="sort != null">sort,</if>
            <if test="disabled != null">disabled,</if>
            <if test="deleted != null">deleted,</if>
@@ -47,7 +49,7 @@
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
            <if test="item != null">#{item,jdbcType=VARCHAR},</if>
            <if test="item != null and item !=''">#{item,jdbcType=VARCHAR},</if>
            <if test="sort != null">#{sort,jdbcType=INTEGER},</if>
            <if test="disabled != null">#{disabled,jdbcType=TINYINT},</if>
            <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
@@ -62,7 +64,7 @@
            <if test="disabled != null">
                disabled = #{disabled,jdbcType=BIGINT},
            </if>
            <if test="item != null">
            <if test="item != null and item !=''">
                item = #{item,jdbcType=VARCHAR},
            </if>
            <if test="sort != null">
@@ -84,7 +86,7 @@
            <if test="item != null  and item != ''">
                t.item like concat('%', #{item}, '%') and
            </if>
            <if test="disabled != null  and disabled != ''">
            <if test="disabled != null">
                t.disabled != 1  and
                <!--FIND_IN_SET(t.disabled, #{disabled}) and-->
            </if>
@@ -108,7 +110,7 @@
            <if test="item != null  and item != ''">
                t.item like concat('%', #{item}, '%') and
            </if>
            <if test="disabled != null  and disabled != ''">
            <if test="disabled != null">
                t.disabled != 1  and
            </if>
        </trim>
pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml
@@ -13,6 +13,8 @@
        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
        <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -43,14 +45,14 @@
        insert into plt_product_scrapping_reason
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="reason != null">reason,</if>
            <if test="reason != null and reason !=''">reason,</if>
            <if test="proId != null">pro_id,</if>
            <if test="sort != null">sort,</if>
            <if test="deleted != null">deleted,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
            <if test="reason != null and reason !=''">#{reason,jdbcType=VARCHAR},</if>
            <if test="proId != null">#{proId,jdbcType=VARCHAR},</if>
            <if test="sort != null">#{sort,jdbcType=INTEGER},</if>
            <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
@@ -59,7 +61,7 @@
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductScrappingReason">
        update plt_product_scrapping_reason
        <set>
            <if test="reason != null">
            <if test="reason != null and reason !=''">
                reason = #{reason,jdbcType=VARCHAR},
            </if>
            <if test="proId != null">
@@ -84,8 +86,14 @@
        from plt_product_scrapping_reason t
        where t.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="proId != null and proId != ''">
                t.pro_id=#{proId} and
            </if>
            <if test="reason != null  and reason != ''">
                t.reason like concat('%', #{reason}, '%') and
            </if>
            <if test="disabled != null">
                t.disabled != 1  and
            </if>
        </trim>
        order by sort desc
@@ -101,9 +109,15 @@
        from plt_product_scrapping_reason t
        where t.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="proId != null and proId != ''">
                t.pro_id=#{proId} and
            </if>
            <if test="reason != null  and reason != ''">
                t.reason like concat('%', #{reason}, '%') and
            </if>
            <if test="disabled != null">
                t.disabled != 1  and
            </if>
        </trim>
    </select>
pms-parent/pms-global/src/main/resources/mapper/PltProductTestInspectionItemsMapper.xml
@@ -13,6 +13,8 @@
            <result property="sort" column="sort" jdbcType="INTEGER"/>
            <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
            <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -32,13 +34,13 @@
        from plt_product_test_inspection_items t
        where t.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="proId != null and proId != ''">
            <if test="proId != null">
                t.pro_id=#{proId} and
            </if>
            <if test="item != null  and item != ''">
                t.item like concat('%', #{item}, '%') and
            </if>
            <if test="disabled != null  and disabled != ''">
            <if test="disabled != null">
                t.disabled != 1  and
                <!--FIND_IN_SET(t.disabled, #{disabled}) and-->
            </if>
@@ -51,13 +53,13 @@
        from plt_product_test_inspection_items t
        where t.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="proId != null and proId != ''">
            <if test="proId != null">
                t.pro_id=#{proId} and
            </if>
            <if test="item != null  and item != ''">
                t.item like concat('%', #{item}, '%') and
            </if>
            <if test="disabled != null  and disabled != ''">
            <if test="disabled != null">
                t.disabled != 1  and
            </if>
        </trim>
@@ -87,7 +89,7 @@
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="item != null">item,</if>
                <if test="item != null and item !=''">item,</if>
                <if test="deleted != null">deleted,</if>
                <if test="disabled != null">disabled,</if>
                <if test="sort != null">sort,</if>
@@ -95,7 +97,7 @@
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="item != null">#{item,jdbcType=VARCHAR},</if>
                <if test="item != null and item !=''">#{item,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="disabled != null">#{disabled,jdbcType=TINYINT},</if>
                <if test="sort != null">#{sort,jdbcType=INTEGER},</if>
@@ -107,7 +109,7 @@
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="item != null">
                <if test="item != null and item !=''">
                    item = #{item,jdbcType=VARCHAR},
                </if>
                <if test="deleted != null">
pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml
@@ -13,6 +13,8 @@
        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
        <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -30,14 +32,14 @@
        insert into plt_product_unqualified_reason
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="reason != null">reason,</if>
            <if test="reason != null and reason !=''">reason,</if>
            <if test="proId != null">pro_id,</if>
            <if test="sort != null">sort,</if>
            <if test="deleted != null">deleted,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="reason != null">#{reason,jdbcType=VARCHAR},</if>
                <if test="reason != null and reason !=''">#{reason,jdbcType=VARCHAR},</if>
                <if test="proId != null">#{proId,jdbcType=VARCHAR},</if>
                <if test="sort != null">#{sort,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
@@ -49,7 +51,7 @@
            <if test="disabled != null">
                disabled = #{disabled,jdbcType=TINYINT},
            </if>
            <if test="reason != null">
            <if test="reason != null and reason !=''">
                reason = #{reason,jdbcType=VARCHAR},
            </if>
            <if test="proId != null">
@@ -70,8 +72,14 @@
        from plt_product_unqualified_reason t
        where t.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="proId != null and proId != ''">
                t.pro_id=#{proId} and
            </if>
            <if test="reason != null  and reason != ''">
                t.reason like concat('%', #{reason}, '%') and
            </if>
            <if test="disabled != null">
                t.disabled != 1  and
            </if>
        </trim>
        order by sort desc
@@ -87,9 +95,15 @@
        from plt_product_unqualified_reason t
        where t.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="proId != null and proId != ''">
                t.pro_id=#{proId} and
            </if>
            <if test="reason != null  and reason != ''">
                t.reason like concat('%', #{reason}, '%') and
            </if>
            <if test="disabled != null">
                t.disabled != 1  and
            </if>
        </trim>
    </select>
pms-parent/pms-global/src/main/resources/mapper/PltProductionLineMapper.xml
@@ -52,46 +52,46 @@
        insert into plt_production_line
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="name != null">name,</if>
                <if test="type != null">type,</if>
                <if test="factory != null">factory,</if>
                <if test="director != null">director,</if>
                <if test="dMobile != null">d_mobile,</if>
                <if test="installTime != null">install_time,</if>
                <if test="name != null and name !=''">name,</if>
                <if test="type != null and type !=''">type,</if>
                <if test="factory != null and factory !=''">factory,</if>
                <if test="director != null and director !=''">director,</if>
                <if test="dMobile != null and dMobile !=''">d_mobile,</if>
                <if test="installTime != null and installTime !=''">install_time,</if>
                <if test="deleted != null">deleted,</if>
                <if test="remark != null">remark,</if>
                <if test="remark != null and remark !=''">remark,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="type != null">#{type,jdbcType=VARCHAR},</if>
                <if test="factory != null">#{factory,jdbcType=VARCHAR},</if>
                <if test="director != null">#{director,jdbcType=VARCHAR},</if>
                <if test="dMobile != null">#{dMobile,jdbcType=VARCHAR},</if>
                <if test="installTime != null">#{installTime,jdbcType=VARCHAR},</if>
                <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
                <if test="type != null and type !=''">#{type,jdbcType=VARCHAR},</if>
                <if test="factory != null and factory !=''">#{factory,jdbcType=VARCHAR},</if>
                <if test="director != null and director !=''">#{director,jdbcType=VARCHAR},</if>
                <if test="dMobile != null and dMobile !=''">#{dMobile,jdbcType=VARCHAR},</if>
                <if test="installTime != null and installTime !=''">#{installTime,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltProductionLine">
        update plt_production_line
        <set>
            <if test="name != null">
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR},
            </if>
            <if test="type != null">
            <if test="type != null and type !=''">
                type = #{type,jdbcType=VARCHAR},
            </if>
            <if test="factory != null">
            <if test="factory != null and factory !=''">
                factory = #{factory,jdbcType=VARCHAR},
            </if>
            <if test="director != null">
            <if test="director != null and director !=''">
                director = #{director,jdbcType=VARCHAR},
            </if>
            <if test="dMobile != null">
            <if test="dMobile != null and dMobile !=''">
                d_mobile = #{dMobile,jdbcType=VARCHAR},
            </if>
            <if test="installTime != null">
            <if test="installTime != null and installTime !=''">
                install_time = #{installTime,jdbcType=VARCHAR},
            </if>
            <if test="disabled != null">
@@ -100,7 +100,7 @@
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=TINYINT},
            </if>
            <if test="remark != null">
            <if test="remark != null and remark !=''">
                remark = #{remark,jdbcType=VARCHAR},
            </if>
        </set>
@@ -125,16 +125,16 @@
        <include refid="Base_Column_List" />
        from plt_production_line where deleted != 1
        <trim prefix="and" suffixOverrides="and">
            <if test="name != null">
            <if test="name != null and name !=''">
                name like concat('%', #{name}, '%') and
            </if>
            <if test="factory != null">
            <if test="factory != null and factory !=''">
                factory like concat('%', #{factory}, '%') and
            </if>
            <if test="director != null">
            <if test="director != null and director !=''">
                director like concat('%', #{director}, '%') and
            </if>
            <if test="dMobile != null">
            <if test="dMobile != null and dMobile !=''">
                d_mobile = #{dMobile,jdbcType=VARCHAR} and
            </if>
        </trim>
@@ -150,16 +150,16 @@
        select count(1)
        from plt_production_line where deleted != 1
        <trim prefix="and" suffixOverrides="and">
            <if test="name != null">
            <if test="name != null and name !=''">
                name like concat('%', #{name}, '%') and
            </if>
            <if test="factory != null">
            <if test="factory != null and factory !=''">
                factory like concat('%', #{factory}, '%') and
            </if>
            <if test="director != null">
            <if test="director != null and director !=''">
                director like concat('%', #{director}, '%') and
            </if>
            <if test="dMobile != null">
            <if test="dMobile != null and dMobile !=''">
                d_mobile = #{dMobile,jdbcType=VARCHAR} and
            </if>
        </trim>
pms-parent/pms-global/src/main/resources/mapper/PltStationMapper.xml
@@ -43,18 +43,18 @@
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="lineId != null">line_id,</if>
                <if test="code != null">code,</if>
                <if test="name != null">name,</if>
                <if test="remark != null">remark,</if>
                <if test="code != null and code !=''">code,</if>
                <if test="name != null and name !=''">name,</if>
                <if test="remark != null and remark !=''">remark,</if>
                <if test="disabled != null">disabled,</if>
                <if test="deleted != null">deleted,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="lineId != null">#{lineId,jdbcType=VARCHAR},</if>
                <if test="code != null">#{code,jdbcType=VARCHAR},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
                <if test="code != null and code !=''">#{code,jdbcType=VARCHAR},</if>
                <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
                <if test="disabled != null">#{disabled,jdbcType=TINYINT},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
        </trim>
@@ -62,13 +62,16 @@
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPlt.PltStation">
        update plt_station
        <set>
            <if test="code != null">
            <if test="code != null and code !=''">
                code = #{code,jdbcType=VARCHAR},
            </if>
            <if test="name != null">
            <if test="lineId != null">
                line_id = #{lineId,jdbcType=BIGINT},
            </if>
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR},
            </if>
            <if test="remark != null">
            <if test="remark != null and remark !=''">
                remark = #{remark,jdbcType=VARCHAR},
            </if>
            <if test="disabled != null">
@@ -106,7 +109,7 @@
        <include refid="Base_Column_List" />
        from plt_station where deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="id != null and id !=''">
            <if test="id != null">
                id = #{id,jdbcType=BIGINT} and
            </if>
            <if test="code != null and code !=''">
@@ -115,10 +118,10 @@
            <if test="name != null and name !=''">
                name  like concat('%', #{name}, '%') and
            </if>
            <if test="disabled != null and disabled !=''">
            <if test="disabled != null">
                disabled = #{disabled,jdbcType=TINYINT} and
            </if>
            <if test="lineId != null and lineId !=''">
            <if test="lineId != null">
                line_id = #{lineId,jdbcType=BIGINT} and
            </if>
        </trim>
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml
@@ -6,6 +6,7 @@
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="orderId" column="order_id" jdbcType="BIGINT"/>
        <result property="proId" column="pro_id" jdbcType="BIGINT"/>
        <result property="batchId" column="batch_id" jdbcType="BIGINT"/>
        <result property="processId" column="process_id" jdbcType="BIGINT"/>
@@ -22,12 +23,16 @@
        <result property="outputNumber" column="output_number" jdbcType="INTEGER"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager"/>
        <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
        <association property="creatorName" column="creator" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNameByUserId" fetchType="eager"/>
        <association property="batchNo" column="batch_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPr.PrBatchNumberMapper.selectBatchNoById" fetchType="eager"/>
        <association property="processName" column="process_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectProcessNameById" fetchType="eager"/>
        <association property="orderName" column="order_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPr.PrOrderMapper.selectOrderNameById" fetchType="eager" />
        <collection property="process" ofType="com.dy.pmsGlobal.pojoPr.PrProductionProcess"
                    select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectByPrimaryKey" fetchType="eager"
                    column="process_id"/>
@@ -35,6 +40,7 @@
    <resultMap id="PlanResultMap" type="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="orderId" column="order_id" jdbcType="BIGINT"/>
        <result property="proId" column="pro_id" jdbcType="BIGINT"/>
        <result property="batchId" column="batch_id" jdbcType="BIGINT"/>
        <result property="processId" column="process_id" jdbcType="BIGINT"/>
@@ -54,8 +60,9 @@
                    column="process_id"/>
    </resultMap>
    <sql id="Base_Column_List">
        id
        id,order_id
        ,pro_id,batch_id,
        process_id,name,number,
        status,creator,
@@ -64,6 +71,7 @@
    </sql>
    <sql id="part_Column_List" >
        ${alias}.id,
        ${alias}.order_id,
        ${alias}.pro_id,
        ${alias}.batch_id,
        ${alias}.process_id,
@@ -98,6 +106,12 @@
        from pr_assembly_plan
        where id = #{id}
    </select>
    <select id="selectByBatchId" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from pr_assembly_plan
        where batch_id = #{batchId,jdbcType=BIGINT}
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
@@ -127,16 +141,19 @@
        <include refid="Base_Column_List"/>
        from pr_assembly_plan
        <trim prefix="where" suffixOverrides="and">
            <if test="orderId != null">
                order_id = #{orderId,jdbcType=BIGINT} and
            </if>
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <if test="batchId != null">
                batch_id = #{batchId,jdbcType=BIGINT} and
            </if>
            <if test="processId != null">
            <if test="processId!= null">
                process_id = #{processId,jdbcType=BIGINT} and
            </if>
            <if test="name != null">
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR} and
            </if>
            <if test="number != null">
@@ -145,22 +162,22 @@
            <if test="status != null">
                status = #{status,jdbcType=TINYINT} and
            </if>
            <if test="creator != null">
            <if test="creator != null and creator !=''">
                creator = #{creator,jdbcType=VARCHAR} and
            </if>
            <if test="dt != null">
                dt = #{dt,jdbcType=TIMESTAMP} and
            </if>
            <if test="startDate != null">
            <if test="startDate != null and startDate !=''">
                start_date = #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null">
            <if test="endDate != null and endDate !=''">
                end_date = #{endDate,jdbcType=VARCHAR} and
            </if>
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=TINYINT} and
            </if>
            <if test="content != null">
            <if test="content != null and content !=''">
                content = #{content,jdbcType=VARCHAR} and
            </if>
        </trim>
@@ -171,16 +188,19 @@
        <include refid="Base_Column_List"/>
        from pr_assembly_plan
        <trim prefix="where" suffixOverrides="and">
            <if test="orderId != null">
                order_id = #{orderId,jdbcType=BIGINT} and
            </if>
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <if test="batchId != null">
                batch_id = #{batchId,jdbcType=BIGINT} and
            </if>
            <if test="processId != null">
            <if test="processId!= null">
                process_id = #{processId,jdbcType=BIGINT} and
            </if>
            <if test="name != null">
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR} and
            </if>
            <if test="number != null">
@@ -189,22 +209,22 @@
            <if test="status != null">
                status = #{status,jdbcType=TINYINT} and
            </if>
            <if test="creator != null">
            <if test="creator != null and creator !=''">
                creator = #{creator,jdbcType=VARCHAR} and
            </if>
            <if test="dt != null">
                dt = #{dt,jdbcType=TIMESTAMP} and
            </if>
            <if test="startDate != null">
            <if test="startDate != null and startDate !=''">
                start_date = #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null">
            <if test="endDate != null and endDate !=''">
                end_date = #{endDate,jdbcType=VARCHAR} and
            </if>
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=TINYINT} and
            </if>
            <if test="content != null">
            <if test="content != null and content !=''">
                content = #{content,jdbcType=VARCHAR} and
            </if>
        </trim>
@@ -219,12 +239,12 @@
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan"
            useGeneratedKeys="true">
        insert into pr_assembly_plan
        ( id, pro_id, batch_id
        ( id,order_id, pro_id, batch_id
        , process_id, name, number
        , status, creator
        , dt, start_date, end_date
        , deleted, content, input_number, output_number)
        values ( #{id,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT}, #{batchId,jdbcType=BIGINT}
        values ( #{id,jdbcType=BIGINT},#{orderId,jdbcType=BIGINT},  #{proId,jdbcType=BIGINT}, #{batchId,jdbcType=BIGINT}
               , #{processId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{number,jdbcType=INTEGER}
               , #{status,jdbcType=TINYINT}, #{creator,jdbcType=VARCHAR}
               , #{dt,jdbcType=TIMESTAMP}, #{startDate,jdbcType=VARCHAR}, #{endDate,jdbcType=VARCHAR}
@@ -236,52 +256,57 @@
        insert into pr_assembly_plan
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="orderId != null">order_id,</if>
            <if test="proId != null">pro_id,</if>
            <if test="batchId != null">batch_id,</if>
            <if test="processId != null">process_id,</if>
            <if test="name != null">name,</if>
            <if test="name != null and name !=''">name,</if>
            <if test="number != null">number,</if>
            <if test="status != null">status,</if>
            <if test="creator != null">creator,</if>
            <if test="creator != null and creator !=''">creator,</if>
            <if test="dt != null">dt,</if>
            <if test="startDate != null">start_date,</if>
            <if test="endDate != null">end_date,</if>
            <if test="startDate != null and startDate !=''">start_date,</if>
            <if test="endDate != null and endDate !=''">end_date,</if>
            <if test="deleted != null">deleted,</if>
            <if test="content != null">content,</if>
            <if test="inputNumber != null">input_number,</if>
            <if test="outputNumber != null">output_number,</if>
            <if test="content != null and content !=''">content,</if>
            <if test="inputNumber!= null">input_number,</if>
            <if test="outputNumber!= null">output_number,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="orderId != null">#{orderId,jdbcType=BIGINT},</if>
            <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
            <if test="batchId != null">#{batchId,jdbcType=BIGINT},</if>
            <if test="processId != null">#{processId,jdbcType=BIGINT},</if>
            <if test="name != null">#{name,jdbcType=VARCHAR},</if>
            <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
            <if test="number != null">#{number,jdbcType=INTEGER},</if>
            <if test="status != null">#{status,jdbcType=TINYINT},</if>
            <if test="creator != null">#{creator,jdbcType=VARCHAR},</if>
            <if test="creator != null and creator !=''">#{creator,jdbcType=VARCHAR},</if>
            <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
            <if test="startDate != null">#{startDate,jdbcType=VARCHAR},</if>
            <if test="endDate != null">#{endDate,jdbcType=VARCHAR},</if>
            <if test="startDate != null and startDate !=''">#{startDate,jdbcType=VARCHAR},</if>
            <if test="endDate != null and endDate !=''">#{endDate,jdbcType=VARCHAR},</if>
            <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
            <if test="content != null">#{content,jdbcType=VARCHAR},</if>
            <if test="inputNumber != null">#{inputNumber,jdbcType=INTEGER},</if>
            <if test="outputNumber != null">#{outputNumber,jdbcType=INTEGER},</if>
            <if test="content != null and content !=''">#{content,jdbcType=VARCHAR},</if>
            <if test="inputNumber!= null">#{inputNumber,jdbcType=INTEGER},</if>
            <if test="outputNumber!= null">#{outputNumber,jdbcType=INTEGER},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        update pr_assembly_plan
        <set>
            <if test="orderId != null">
                order_id = #{orderId,jdbcType=BIGINT} ,
            </if>
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT},
            </if>
            <if test="batchId != null">
                batch_id = #{batchId,jdbcType=BIGINT},
            </if>
            <if test="processId != null">
            <if test="processId!= null">
                process_id = #{processId,jdbcType=BIGINT},
            </if>
            <if test="name != null">
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR},
            </if>
            <if test="number != null">
@@ -290,28 +315,28 @@
            <if test="status != null">
                status = #{status,jdbcType=TINYINT},
            </if>
            <if test="creator != null">
            <if test="creator != null and creator !=''">
                creator = #{creator,jdbcType=VARCHAR},
            </if>
            <if test="dt != null">
                dt = #{dt,jdbcType=TIMESTAMP},
            </if>
            <if test="startDate != null">
            <if test="startDate != null and startDate !=''">
                start_date = #{startDate,jdbcType=VARCHAR},
            </if>
            <if test="endDate != null">
            <if test="endDate != null and endDate !=''">
                end_date = #{endDate,jdbcType=VARCHAR},
            </if>
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=TINYINT},
            </if>
            <if test="content != null">
            <if test="content != null and content !=''">
                content = #{content,jdbcType=VARCHAR},
            </if>
            <if test="inputNumber != null">
            <if test="inputNumber!= null">
                input_number = #{inputNumber,jdbcType=INTEGER},
            </if>
            <if test="outputNumber != null">
            <if test="outputNumber!= null">
                output_number = #{outputNumber,jdbcType=INTEGER},
            </if>
        </set>
@@ -319,7 +344,8 @@
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        update pr_assembly_plan
        set pro_id        = #{proId,jdbcType=BIGINT},
        set order_id      = #{orderId,jdbcType=BIGINT},
            pro_id        = #{proId,jdbcType=BIGINT},
            batch_id      = #{batchId,jdbcType=BIGINT},
            process_id    = #{processId,jdbcType=BIGINT},
            name          = #{name,jdbcType=VARCHAR},
@@ -337,6 +363,7 @@
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
       <!-- ä¸€æ®µæ—¶é—´å¼€å§‹çš„任务 -->
        select
        <include refid="Base_Column_List"/>
        from pr_assembly_plan
@@ -345,10 +372,10 @@
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <if test="startDate != null and startDate != '' ">
                start_date = #{startDate,jdbcType=VARCHAR} and
                start_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR}  and
            </if>
            <if test="endDate != null and endDate != ''">
                end_date = #{endDate,jdbcType=VARCHAR} and
                start_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR}  and
            </if>
        </trim>
        order by id desc
@@ -367,10 +394,10 @@
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <if test="startDate != null and startDate != '' ">
                start_date = #{startDate,jdbcType=VARCHAR} and
                start_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR}  and
            </if>
            <if test="endDate != null and endDate != ''">
                end_date = #{endDate,jdbcType=VARCHAR} and
                start_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR}  and
            </if>
        </trim>
    </select>
@@ -388,4 +415,30 @@
        set deleted = 1
        where id = #{id}
    </update>
    <select id="countByPlanIdAndNodeId" resultType="java.lang.Long">
        select count(1) from pr_assembly_plan ap
        left join pr_production_node pn on ap.process_id = pn.process_id
        where ap.id = #{planId}  and pn.id= #{nodeId}
    </select>
    <select id="selectByPlanName" resultType="cn.hutool.json.JSONObject">
        select ap.id planId,ap.name planName,ap.`status`,pn.id nodeId,pn.content from pr_assembly_plan ap
        left join pr_production_node pn on ap.process_id = pn.process_id
        where status != -1
        <if test="planName != null and planName!= ''">
            and ap.name like concat('%', #{planName}, '%')
        </if>
    </select>
    <select id="queryPlanList" resultType="cn.hutool.json.JSONObject">
        select pp.`name` as pro_name, p.`name` ,p.number, p.output_number, concat(round(((p.output_number/p.number) * 100 ),0), '%') as complete_rate ,p.end_date,
        TIMESTAMPDIFF(DAY, NOW(),p.end_date) AS days_difference
        from (SELECT * FROM pr_assembly_plan WHERE  STATUS = 1 and deleted = 0)  p
        LEFT JOIN plt_product pp
        on p.pro_id = pp.id
        ORDER BY end_date
    </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrBatchNumberMapper.xml
@@ -46,37 +46,37 @@
        insert into pr_batch_number
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="batchNumber != null">batch_number,</if>
                <if test="batchNumber!= null">batch_number,</if>
                <if test="proId != null">pro_id,</if>
                <if test="creator != null">creator,</if>
                <if test="creator != null and creator !=''">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="remark != null">remark,</if>
                <if test="remark != null and remark !=''">remark,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="batchNumber != null">#{batchNumber,jdbcType=INTEGER},</if>
                <if test="batchNumber!= null">#{batchNumber,jdbcType=INTEGER},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="creator != null">#{creator,jdbcType=VARCHAR},</if>
                <if test="creator != null and creator !=''">#{creator,jdbcType=VARCHAR},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrBatchNumber">
        update pr_batch_number
        <set>
                <if test="batchNumber != null">
                <if test="batchNumber!= null">
                    batch_number = #{batchNumber,jdbcType=INTEGER},
                </if>
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="creator != null">
                <if test="creator != null and creator !=''">
                    creator = #{creator,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="remark != null">
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
        </set>
@@ -101,19 +101,19 @@
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="batchNumber != null">
                <if test="batchNumber!= null">
                    batch_number = #{batchNumber,jdbcType=INTEGER} and
                </if>
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT} and
                </if>
                <if test="creator != null">
                <if test="creator != null and creator !=''">
                    creator = #{creator,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="remark != null">
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR} and
                </if>
        </trim>
@@ -132,19 +132,19 @@
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="batchNumber != null">
                <if test="batchNumber!= null and batchNumber !=''">
                    batch_number = #{batchNumber,jdbcType=INTEGER} and
                </if>
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT} and
                </if>
                <if test="creator != null">
                <if test="creator != null and creator !=''">
                    creator = #{creator,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="remark != null">
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR} and
                </if>
        </trim>
pms-parent/pms-global/src/main/resources/mapper/PrBillOfMaterialMapper.xml
New file
@@ -0,0 +1,92 @@
<?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.dy.pmsGlobal.daoPr.PrBillOfMaterialMapper">
  <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrBillOfMaterial">
    <!--@mbg.generated-->
    <!--@Table pr_bill_of_material-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="node_id" jdbcType="BIGINT" property="nodeId" />
    <result column="file_id" jdbcType="BIGINT" property="fileId" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, node_id, file_id
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from pr_bill_of_material
    where id = #{id,jdbcType=BIGINT}
  </select>
  <select id="selectByNodeId" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from pr_bill_of_material
    where  node_id = #{nodeId,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from pr_bill_of_material
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insertMany" parameterType="java.util.List">
    insert into pr_bill_of_material
    <trim prefix="(" suffix=")" suffixOverrides=",">
      id,node_id,file_id
    </trim>
    values
    <foreach collection="list" item="item" separator=",">
      (
      #{item.id,jdbcType=BIGINT},
      #{item.nodeId,jdbcType=BIGINT},
      #{item.fileId,jdbcType=BIGINT}
      )
    </foreach>
  </insert>
  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrBillOfMaterial" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pr_bill_of_material (node_id, file_id)
    values (#{nodeId,jdbcType=BIGINT}, #{fileId,jdbcType=BIGINT})
  </insert>
  <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrBillOfMaterial" useGeneratedKeys="true">
    <!--@mbg.generated-->
    insert into pr_bill_of_material
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="nodeId != null">
        node_id,
      </if>
      <if test="fileId != null">
        file_id,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="nodeId != null">
        #{nodeId,jdbcType=BIGINT},
      </if>
      <if test="fileId != null">
        #{fileId,jdbcType=BIGINT},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrBillOfMaterial">
    <!--@mbg.generated-->
    update pr_bill_of_material
    <set>
      <if test="nodeId != null">
        node_id = #{nodeId,jdbcType=BIGINT},
      </if>
      <if test="fileId != null">
        file_id = #{fileId,jdbcType=BIGINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrBillOfMaterial">
    <!--@mbg.generated-->
    update pr_bill_of_material
    set node_id = #{nodeId,jdbcType=BIGINT},
      file_id = #{fileId,jdbcType=BIGINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrDevOpsPlanMapper.xml
@@ -51,52 +51,52 @@
        insert into pr_dev_ops_plan
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="name != null">name,</if>
                <if test="name != null and name !=''">name,</if>
                <if test="status != null">status,</if>
                <if test="creator != null">creator,</if>
                <if test="creator != null and creator !=''">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="startDate != null">start_date,</if>
                <if test="endDate != null">end_date,</if>
                <if test="startDate != null and startDate !=''">start_date,</if>
                <if test="endDate != null and endDate !=''">end_date,</if>
                <if test="deleted != null">deleted,</if>
                <if test="content != null">content,</if>
                <if test="content != null and content !=''">content,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="creator != null">#{creator,jdbcType=VARCHAR},</if>
                <if test="creator != null and creator !=''">#{creator,jdbcType=VARCHAR},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="startDate != null">#{startDate,jdbcType=VARCHAR},</if>
                <if test="endDate != null">#{endDate,jdbcType=VARCHAR},</if>
                <if test="startDate != null and startDate !=''">#{startDate,jdbcType=VARCHAR},</if>
                <if test="endDate != null and endDate !=''">#{endDate,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="content != null">#{content,jdbcType=VARCHAR},</if>
                <if test="content != null and content !=''">#{content,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsPlan">
        update pr_dev_ops_plan
        <set>
                <if test="name != null">
                <if test="name != null and name !=''">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
                <if test="creator != null">
                <if test="creator != null and creator !=''">
                    creator = #{creator,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="startDate != null">
                <if test="startDate != null and startDate !=''">
                    start_date = #{startDate,jdbcType=VARCHAR},
                </if>
                <if test="endDate != null">
                <if test="endDate != null and endDate !=''">
                    end_date = #{endDate,jdbcType=VARCHAR},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
                <if test="content != null">
                <if test="content != null and content !=''">
                    content = #{content,jdbcType=VARCHAR},
                </if>
        </set>
@@ -121,7 +121,7 @@
        <include refid="Base_Column_List" />
        from pr_dev_ops_plan
        <trim prefix="where" suffixOverrides="and">
            <if test="name != null">
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR} and
            </if>
            <if test="status != null">
@@ -146,7 +146,7 @@
        select count(1)
        from pr_dev_ops_plan
        <trim prefix="where" suffixOverrides="and">
            <if test="name != null">
            <if test="name != null and name !=''">
                name = #{name,jdbcType=VARCHAR} and
            </if>
            <if test="status != null">
pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
@@ -45,14 +45,14 @@
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="batchId != null">batch_id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="status != null">status,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="batchId != null">#{batchId,jdbcType=BIGINT},</if>
                <if test="deviceNo != null">#{deviceNo},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
        </trim>
    </insert>
@@ -78,7 +78,7 @@
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT},
                </if>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo},
                </if>
                <if test="status != null">
@@ -111,7 +111,7 @@
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT} and
                </if>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=BIGINT} and
                </if>
                <if test="status != null">
@@ -139,7 +139,7 @@
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT} and
                </if>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=BIGINT} and
                </if>
                <if test="status != null">
pms-parent/pms-global/src/main/resources/mapper/PrOrderItemMapper.xml
New file
@@ -0,0 +1,136 @@
<?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.dy.pmsGlobal.daoPr.PrOrderItemMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrOrderItem">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="orderId" column="order_id" jdbcType="BIGINT"/>
        <result property="proId"  column="pro_id" jdbcType="BIGINT"/>
        <result property="number" column="number" jdbcType="INTEGER"/>
        <result property="completeNumber" column="complete_number" jdbcType="INTEGER"/>
        <result column="deleted" property="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler" />
        <result property="name" column="name"  jdbcType="VARCHAR"/>
        <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
        id,order_id,pro_id,number,
        complete_number, deleted
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_order_item
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectItems"  parameterType="java.lang.Long" resultMap="BaseResultMap">
        <!--算出完成率 Base_Column_List-->
        SELECT aa.*, concat(round(((complete_number/number) * 100 ),2), '%') as complete_rate  from (
        select oi.id,oi.order_id,oi.pro_id,pp.`name`,oi.number, sum(IFNULL(pap.output_number,0)) as complete_number
        from (SELECT * from  pr_order_item where order_id = #{orderId,jdbcType=BIGINT} and deleted !=1 ) oi
        LEFT JOIN pr_assembly_plan pap
        ON oi.order_id = pap.order_id AND  oi.pro_id = pap.pro_id
        LEFT JOIN plt_product pp
        ON oi.pro_id = pp.id
        GROUP BY oi.id,oi.order_id,oi.pro_id,oi.number) aa
    </select>
    <select id="selectDistinctPro"  parameterType="java.lang.Long" resultMap="BaseResultMap">
        <!--Distinct出order_id中的产品   Base_Column_List-->
        select DISTINCT(oi.order_id),oi.pro_id,pp.`name`
        from (SELECT * from  pr_order_item where order_id = #{orderId,jdbcType=BIGINT} and deleted !=1 ) oi
        LEFT JOIN plt_product pp
        ON oi.pro_id = pp.id
        GROUP BY oi.order_id,oi.pro_id
        ORDER BY oi.order_id
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_order_item
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" parameterType="com.dy.pmsGlobal.pojoPr.PrOrderItem">
        <!--@mbg.generated-->
        insert into pr_order_item ( id,order_id,pro_id,number,
        complete_number, deleted
        )
        values (#{id,jdbcType=BIGINT},#{orderId,jdbcType=BIGINT}, #{proId,jdbcType=BIGINT}, #{number,jdbcType=INTEGER},
        #{completeNumber,jdbcType=INTEGER}, #{deleted,jdbcType=TINYINT}
        )
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrOrderItem" useGeneratedKeys="true">
        insert into pr_order_item
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="orderId != null">order_id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="number != null">number,</if>
                <if test="completeNumber != null">complete_number,</if>
                <if test="deleted != null">deleted,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="orderId != null">#{orderId,jdbcType=BIGINT},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="number != null">#{number,jdbcType=INTEGER},</if>
                <if test="completeNumber != null">#{completeNumber,jdbcType=INTEGER},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrOrderItem">
        <!--@mbg.generated-->
        update pr_order_item
        <set>
                <if test="orderId != null">
                    order_id = #{orderId,jdbcType=BIGINT},
                </if>
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="number != null">
                    number = #{number,jdbcType=INTEGER},
                </if>
                <if test="completeNumber != null">
                    complete_number = #{completeNumber,jdbcType=INTEGER},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <delete id="deleteLogicById">
        update pr_order_item set deleted = 1 where id = #{id}
    </delete>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_order_item p
        where p.deleted!=1
        <trim prefix="and " suffixOverrides="and">
            <if test="orderId != null">
                p.order_id = #{orderId,jdbcType=BIGINT} and
            </if>
        </trim>
        order by id desc
        <trim prefix="limit " >
            <if test="start != null and count != null">
                #{start}, #{count}
            </if>
        </trim>
    </select>
    <select id="selectSomeCount" resultType="java.lang.Long">
        select count(1)
        from pr_order_item p
        where p.deleted!=1
        <trim prefix="and " suffixOverrides="and">
            <if test="orderId != null">
                p.order_id = #{orderId,jdbcType=BIGINT} and
            </if>
        </trim>
    </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrOrderMapper.xml
New file
@@ -0,0 +1,240 @@
<?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.dy.pmsGlobal.daoPr.PrOrderMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrOrder">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="name" column="name" jdbcType="VARCHAR"/>
            <result property="customerName" column="customer_name" jdbcType="VARCHAR"/>
            <result property="projectName" column="project_name" jdbcType="VARCHAR"/>
            <result property="director" column="director" jdbcType="VARCHAR"/>
            <result property="dMobile" column="d_mobile" jdbcType="VARCHAR"/>
            <result property="deliveryDate" column="delivery_date" jdbcType="VARCHAR"/>
            <result property="deliveryAddress" column="delivery_address" jdbcType="VARCHAR"/>
            <result property="recipient" column="recipient" jdbcType="VARCHAR"/>
            <result property="rMobile" column="r_mobile" jdbcType="VARCHAR"/>
            <result property="status" column="status" jdbcType="TINYINT"/>
            <result property="creator" column="creator" jdbcType="VARCHAR"/>
            <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
            <result column="deleted" property="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler" />
            <result property="remark" column="remark" jdbcType="VARCHAR"/>
    </resultMap>
    <resultMap id="BaseResultMap2" type="com.dy.pmsGlobal.pojoPr.PrOrder" extends="BaseResultMap">
        <collection property="items" ofType="com.dy.pmsGlobal.pojoPr.PrOrderItem" fetchType="eager" select="com.dy.pmsGlobal.daoPr.PrOrderItemMapper.selectItems" column="id" />
    </resultMap>
    <resultMap id="BaseResultMap3" type="com.dy.pmsGlobal.pojoPr.PrOrder" extends="BaseResultMap">
        <collection property="items" ofType="com.dy.pmsGlobal.pojoPr.PrOrderItem" fetchType="eager" select="com.dy.pmsGlobal.daoPr.PrOrderItemMapper.selectDistinctPro" column="id" />
    </resultMap>
    <sql id="Base_Column_List">
        id,`name`,customer_name,project_name,
        director,d_mobile,delivery_date,delivery_address,recipient,r_mobile,
        status,creator,dt,
        deleted,remark
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap2">
        select
        <include refid="Base_Column_List" />
        from pr_order
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectOrderNameById" parameterType="java.lang.Long" resultType="String">
        select name from pr_order where id=#{orderId,jdbcType=BIGINT}
    </select>
    <select id="exists" resultType="java.lang.Boolean">
        select count(1) from pr_order where name = #{name}
        <if test="id != null">
            and id != #{id}
        </if>
    </select>
    <select id="selectSome" resultMap="BaseResultMap2">
        select
        <include refid="Base_Column_List" />
        from pr_order p
        where p.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="name != null and name != ''">
                  name like concat('%', #{name}, '%') and
            </if>
            <if test="customerName != null and customerName != ''">
                 customer_name like concat('%', #{customerName}, '%') and
            </if>
            <if test="projectName != null and projectName != ''">
                 project_name like concat('%', #{projectName}, '%') and
            </if>
            <if test="director != null and director != ''">
                 director like concat('%', #{director}, '%') and
            </if>
            <if test="startDate != null and startDate != ''">
                 delivery_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null and endDate != ''">
                 delivery_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR} and
            </if>
            <if test="status != null">
                 status = #{status,jdbcType=TINYINT} and
            </if>
        </trim>
        order by id desc
        <trim prefix="limit " >
            <if test="start != null and count != null">
                #{start}, #{count}
            </if>
        </trim>
    </select>
    <select id="selectSomeCount" resultType="java.lang.Long">
        select count(1)
        from pr_order p
        where p.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="name != null and name != ''">
                 name like concat('%', #{name}, '%') and
            </if>
            <if test="customerName != null and customerName != ''">
                 customer_name like concat('%', #{customerName}, '%') and
            </if>
            <if test="projectName != null and projectName != ''">
                 project_name like concat('%', #{projectName}, '%') and
            </if>
            <if test="director != null and director != ''">
                 director like concat('%', #{director}, '%') and
            </if>
            <if test="startDate != null and startDate != ''">
                 delivery_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null and endDate != ''">
                 delivery_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR} and
            </if>
            <if test="status != null">
                 status = #{status,jdbcType=TINYINT} and
            </if>
        </trim>
    </select>
    <!--下拉菜单订单-->
    <select id="selectAll" resultType="com.dy.pmsGlobal.pojoPr.PrOrder">
        select
        <include refid="Base_Column_List" />
        from pr_order p
        where p.deleted!=1
        <trim prefix="and" suffixOverrides="and">
            <if test="name != null and name != ''">
                 name like concat('%', #{name}, '%') and
            </if>
            <if test="customerName != null and customerName != ''">
                 customer_name like concat('%', #{customerName}, '%') and
            </if>
            <if test="projectName != null and projectName != ''">
                 project_name like concat('%', #{projectName}, '%') and
            </if>
            <if test="director != null and director != ''">
                 director like concat('%', #{director}, '%') and
            </if>
            <if test="startDate != null and startDate != ''">
                 delivery_date <![CDATA[ > ]]> #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null and endDate != ''">
                 delivery_date <![CDATA[ < ]]> #{endDate,jdbcType=VARCHAR} and
            </if>
            <if test="status != null">
                 status = #{status,jdbcType=TINYINT} and
            </if>
        </trim>
        order by id desc
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_order
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_order set deleted = 1
        where id = #{id}
    </update>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrOrder" useGeneratedKeys="true">
        insert into pr_order
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="name != null and name !=''">name,</if>
                <if test="customerName!= null and customerName !=''">customer_name,</if>
                <if test="projectName!= null and projectName !=''">project_name,</if>
                <if test="director != null and director !=''">director,</if>
                <if test="dMobile != null and dMobile !=''">d_mobile,</if>
                <if test="deliveryDate!= null and deliveryDate !=''">delivery_date,</if>
                <if test="deliveryAddress!= null and deliveryAddress !=''">delivery_date,</if>
                <if test="recipient!= null and recipient !=''">recipient,</if>
                <if test="rMobile!= null and rMobile !=''">r_mobile,</if>
                <if test="status != null">status,</if>
                <if test="creator != null and creator !=''">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="deleted != null">deleted,</if>
                <if test="remark != null and remark !=''">remark,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
                <if test="customerName!= null and customerName !=''">#{customerName,jdbcType=VARCHAR},</if>
                <if test="projectName!= null and projectName !=''">#{projectName,jdbcType=VARCHAR},</if>
                <if test="director != null and director !=''">#{director,jdbcType=VARCHAR},</if>
                <if test="dMobile != null and dMobile !=''">#{dMobile,jdbcType=VARCHAR},</if>
                <if test="deliveryDate!= null and deliveryDate !=''">#{deliveryDate,jdbcType=VARCHAR},</if>
                <if test="deliveryAddress!= null and deliveryAddress !=''">#{deliveryAddress,jdbcType=VARCHAR},</if>
                <if test="recipient!= null and recipient !=''">#{recipient,jdbcType=VARCHAR},</if>
                <if test="rMobile!= null and rMobile !=''">#{rMobile,jdbcType=VARCHAR},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="creator != null and creator !=''">#{creator,jdbcType=VARCHAR},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrOrder">
        update pr_order
        <set>
                <if test="name != null and name !=''">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="customerName!= null and customerName !=''">
                    customer_name = #{customerName,jdbcType=VARCHAR},
                </if>
                <if test="projectName!= null and projectName !=''">
                    project_name = #{projectName,jdbcType=VARCHAR},
                </if>
                <if test="director != null and director !=''">
                    director = #{director,jdbcType=VARCHAR},
                </if>
                <if test="dMobile != null and dMobile !=''">
                    d_mobile = #{dMobile,jdbcType=VARCHAR},
                </if>
                <if test="deliveryDate!= null and deliveryDate !=''">
                    delivery_date = #{deliveryDate,jdbcType=VARCHAR},
                </if>
                <if test="deliveryAddress!= null and deliveryAddress !=''">
                    delivery_date = #{deliveryAddress,jdbcType=VARCHAR},
                </if>
                <if test="recipient!= null and recipient !=''">
                    recipient = #{recipient,jdbcType=VARCHAR},
                </if>
                <if test="rMobile!= null and rMobile !=''">
                    r_mobile = #{rMobile,jdbcType=VARCHAR},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
                <if test="creator != null and creator !=''">
                    creator = #{creator,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
@@ -18,6 +18,8 @@
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <association property="instruction"
            column="id" javaType="java.lang.Long" select="com.dy.pmsGlobal.daoPr.PrWorkingInstructionMapper.selectByNodeId" fetchType="eager" />
        <association property="bill"
                     column="id" javaType="java.lang.Long" select="com.dy.pmsGlobal.daoPr.PrBillOfMaterialMapper.selectByNodeId" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -37,6 +39,12 @@
        <include refid="Base_Column_List" />
        from pr_production_node
        where  id = #{id,jdbcType=BIGINT} 
    </select>
    <select id="selectNodeBySort" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_production_node
        where  process_id = #{processId,jdbcType=BIGINT} and sort = #{sort,jdbcType=INTEGER}
    </select>
    <select id="selectNameByNodeId" parameterType="java.lang.Long" resultType="String">
        select content from pr_production_node where id = #{id}
@@ -60,29 +68,29 @@
        insert into pr_production_node
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="processId != null">process_id,</if>
                <if test="processId!= null">process_id,</if>
                <if test="sort != null">sort,</if>
                <if test="content != null">content,</if>
                <if test="content != null and content !=''">content,</if>
                <if test="nodeType != null">node_type,</if>
                <if test="isStart != null">is_start,</if>
                <if test="isEnd != null">is_end,</if>
                <if test="isRecord != null">is_record,</if>
                <if test="deviceCycleContent != null">device_cycle_content,</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">device_cycle_content,</if>
                <if test="deleted != null">deleted,</if>
                <if test="remark != null">remark,</if>
                <if test="remark != null and remark !=''">remark,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="processId != null">#{processId,jdbcType=BIGINT},</if>
                <if test="isEnd != null">#{processId,jdbcType=BIGINT},</if>
                <if test="sort != null">#{sort,jdbcType=INTEGER},</if>
                <if test="content != null">#{content,jdbcType=VARCHAR},</if>
                <if test="content != null and content !=''">#{content,jdbcType=VARCHAR},</if>
                <if test="nodeType != null">#{nodeType,jdbcType=INTEGER},</if>
                <if test="isStart != null">#{isStart,jdbcType=TINYINT},</if>
                <if test="isEnd != null">#{isEnd,jdbcType=TINYINT},</if>
                <if test="isRecord != null">#{isRecord,jdbcType=TINYINT},</if>
                <if test="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
@@ -116,7 +124,7 @@
                <if test="sort != null">
                    sort = #{sort,jdbcType=INTEGER},
                </if>
                <if test="content != null">
                <if test="content != null and content !=''">
                    content = #{content,jdbcType=VARCHAR},
                </if>
                <if test="nodeType != null">
@@ -131,13 +139,13 @@
                <if test="isRecord != null">
                    is_record = #{isRecord,jdbcType=TINYINT},
                </if>
                <if test="deviceCycleContent != null">
                <if test="deviceCycleContent != null and deviceCycleContent !=''">
                    device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
                <if test="remark != null">
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
        </set>
@@ -149,7 +157,7 @@
        <include refid="Base_Column_List" />
        from pr_production_node
        <trim prefix="where" suffixOverrides="and">
            <if test="processId != null">
            <if test="processId!= null">
                process_id = #{processId,jdbcType=BIGINT} and
            </if>
        </trim>
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml
@@ -15,6 +15,8 @@
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
        <association property="proType" column="pro_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProTypeById" fetchType="eager" />
        <association property="creatorName" column="creator" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNameByUserId" fetchType="eager" />
        <association property="isQuote" column="id" javaType="java.lang.Boolean" fetchType="eager"
@@ -78,22 +80,22 @@
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="name != null">name,</if>
                <if test="creator != null">creator,</if>
                <if test="name != null and name !=''">name,</if>
                <if test="creator != null and creator !=''">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="disabled != null">disabled,</if>
                <if test="deleted != null">deleted,</if>
                <if test="remark != null">remark,</if>
                <if test="remark != null and remark !=''">remark,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="name != null">#{name,jdbcType=VARCHAR},</if>
                <if test="creator != null">#{creator,jdbcType=VARCHAR},</if>
                <if test="name != null and name !=''">#{name,jdbcType=VARCHAR},</if>
                <if test="creator != null and creator !=''">#{creator,jdbcType=VARCHAR},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="disabled != null">#{disabled,jdbcType=TINYINT},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
                <if test="remark != null and remark !=''">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionProcess">
@@ -102,10 +104,10 @@
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="name != null">
                <if test="name != null and name !=''">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="creator != null">
                <if test="creator != null and creator !=''">
                    creator = #{creator,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
@@ -117,7 +119,7 @@
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
                <if test="remark != null">
                <if test="remark != null and remark !=''">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
        </set>
@@ -132,7 +134,7 @@
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
<!--            <if test="name != null">-->
<!--            <if test="name != null and name !=''">-->
<!--                name = #{name,jdbcType=VARCHAR} and-->
<!--            </if>-->
        </trim>
@@ -151,7 +153,7 @@
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <!--            <if test="name != null">-->
            <!--            <if test="name != null and name !=''">-->
            <!--                name = #{name,jdbcType=VARCHAR} and-->
            <!--            </if>-->
        </trim>
pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml
New file
@@ -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.dy.pmsGlobal.daoPr.PrScheduleMapper">
  <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrSchedule">
    <!--@mbg.generated-->
    <!--@Table pr_schedule-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="user_id" jdbcType="BIGINT" property="userId" />
    <result column="schedule_date" jdbcType="VARCHAR" property="scheduleDate" />
    <result column="deleted" jdbcType="TINYINT" property="deleted" />
    <result column="dt" jdbcType="TIMESTAMP" property="dt" />
    <association property="userName" column="user_id" javaType="java.lang.Long"
                 select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNameByUserId" fetchType="eager"/>
    <collection column="id" ofType="com.dy.pmsGlobal.pojoPr.PrScheduleRel" property="relList"
                select="com.dy.pmsGlobal.daoPr.PrScheduleRelMapper.selectByScheduleId" fetchType="eager" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, user_id, schedule_date, deleted,dt
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from pr_schedule
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from pr_schedule
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pmsGlobal.pojoPr.PrSchedule">
    <!--@mbg.generated-->
    insert into pr_schedule (id, user_id, schedule_date,
      deleted,dt)
    values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{scheduleDate,jdbcType=VARCHAR},
      #{deleted,jdbcType=TINYINT},now())
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pmsGlobal.pojoPr.PrSchedule">
    <!--@mbg.generated-->
    insert into pr_schedule
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="userId != null">
        user_id,
      </if>
      <if test="scheduleDate != null and scheduleDate !=''">
        schedule_date,
      </if>
      <if test="deleted != null">
        deleted,
      </if>
      <if test="dt != null">
        dt,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="userId != null">
        #{userId,jdbcType=BIGINT},
      </if>
      <if test="scheduleDate != null  and scheduleDate !=''">
        #{scheduleDate,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        #{deleted,jdbcType=TINYINT},
      </if>
      <if test="dt != null and dt !=''">
        #{dt,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrSchedule">
    <!--@mbg.generated-->
    update pr_schedule
    <set>
      <if test="userId != null">
        user_id = #{userId,jdbcType=BIGINT},
      </if>
      <if test="scheduleDate != null  and scheduleDate !=''">
        schedule_date = #{scheduleDate,jdbcType=VARCHAR},
      </if>
      <if test="deleted != null">
        deleted = #{deleted,jdbcType=TINYINT},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrSchedule">
    <!--@mbg.generated-->
    update pr_schedule
    set user_id = #{userId,jdbcType=BIGINT},
      schedule_date = #{scheduleDate,jdbcType=VARCHAR},
      deleted = #{deleted,jdbcType=TINYINT}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectSomeCount" resultType="java.lang.Long">
    select count(1)
    from pr_schedule
    where deleted = 0
    <if test="userId != null">
      and user_id = #{userId,jdbcType=BIGINT}
    </if>
    <if test="scheduleDate != null  and scheduleDate !=''">
      and schedule_date = #{scheduleDate,jdbcType=VARCHAR}
    </if>
  </select>
  <select id="selectSome" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from pr_schedule
    where deleted = 0
    <if test="userId != null">
      and user_id = #{userId}
    </if>
    <if test="scheduleDate != null  and scheduleDate !=''">
      and schedule_date = #{scheduleDate}
    </if>
  </select>
  <select id="selectAll" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from pr_schedule
    where deleted = 0
    <if test="userId != null">
      and user_id = #{userId}
    </if>
    <if test="scheduleDate != null  and scheduleDate !=''">
      and schedule_date = #{scheduleDate}
    </if>
    order by schedule_date desc
  </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrScheduleRelMapper.xml
New file
@@ -0,0 +1,129 @@
<?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.dy.pmsGlobal.daoPr.PrScheduleRelMapper">
  <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    <!--@Table pr_schedule_rel-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="schedule_id" jdbcType="BIGINT" property="scheduleId" />
    <result column="plan_id" jdbcType="BIGINT" property="planId" />
    <result column="node_id" jdbcType="BIGINT" property="nodeId" />
    <result column="station_id" jdbcType="BIGINT" property="stationId" />
    <result column="work_details" jdbcType="VARCHAR" property="workDetails" />
    <association property="nodeName" column="node_id" javaType="java.lang.String"
                 select="com.dy.pmsGlobal.daoPr.PrProductionNodeMapper.selectNameByNodeId" fetchType="eager"/>
    <association property="planName" column="plan_id" javaType="java.lang.String"
                 select="com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper.selectNameByPlanId" fetchType="eager"/>
    <association property="stationName" column="station_id" javaType="java.lang.String"
                 select="com.dy.pmsGlobal.daoPlt.PltStationMapper.selectNameByStationId" fetchType="eager"/>
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, schedule_id, plan_id, node_id, station_id, work_details
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    <!--@mbg.generated-->
    select
    <include refid="Base_Column_List" />
    from pr_schedule_rel
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    <!--@mbg.generated-->
    delete from pr_schedule_rel
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    insert into pr_schedule_rel (id, schedule_id, plan_id,
      node_id, station_id, work_details
      )
    values (#{id,jdbcType=BIGINT}, #{scheduleId,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT},
      #{nodeId,jdbcType=BIGINT}, #{stationId,jdbcType=BIGINT}, #{workDetails,jdbcType=VARCHAR}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    insert into pr_schedule_rel
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="scheduleId!= null and scheduleId !=''">
        schedule_id,
      </if>
      <if test="planId != null">
        plan_id,
      </if>
      <if test="nodeId!= null">
        node_id,
      </if>
      <if test="stationId != null">
        station_id,
      </if>
      <if test="workDetails!= null and workDetails !=''">
        work_details,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="scheduleId!= null and scheduleId !=''">
        #{scheduleId,jdbcType=BIGINT},
      </if>
      <if test="planId != null">
        #{planId,jdbcType=BIGINT},
      </if>
      <if test="nodeId!= null">
        #{nodeId,jdbcType=BIGINT},
      </if>
      <if test="stationId != null">
        #{stationId,jdbcType=BIGINT},
      </if>
      <if test="workDetails!= null and workDetails !=''">
        #{workDetails,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    update pr_schedule_rel
    <set>
      <if test="scheduleId!= null and scheduleId !=''">
        schedule_id = #{scheduleId,jdbcType=BIGINT},
      </if>
      <if test="planId != null">
        plan_id = #{planId,jdbcType=BIGINT},
      </if>
      <if test="nodeId!= null">
        node_id = #{nodeId,jdbcType=BIGINT},
      </if>
      <if test="stationId != null">
        station_id = #{stationId,jdbcType=BIGINT},
      </if>
      <if test="workDetails!= null and workDetails !=''">
        work_details = #{workDetails,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrScheduleRel">
    <!--@mbg.generated-->
    update pr_schedule_rel
    set schedule_id = #{scheduleId,jdbcType=BIGINT},
      plan_id = #{planId,jdbcType=BIGINT},
      node_id = #{nodeId,jdbcType=BIGINT},
      station_id = #{stationId,jdbcType=BIGINT},
      work_details = #{workDetails,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <delete id="deleteByScheduleId">
    delete  from pr_schedule_rel where schedule_id=#{scheduleId}
  </delete>
  <select id="selectByScheduleId" resultMap="BaseResultMap">
    select * from pr_schedule_rel where schedule_id=#{scheduleId}
  </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrWorkingInstructionMapper.xml
@@ -42,12 +42,12 @@
        insert into pr_working_instruction
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="nodeId != null">node_id,</if>
                <if test="nodeId!= null">node_id,</if>
                <if test="fileId != null">file_id,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="nodeId != null">#{nodeId,jdbcType=BIGINT},</if>
                <if test="nodeId!= null">#{nodeId,jdbcType=BIGINT},</if>
                <if test="fileId != null">#{fileId,jdbcType=BIGINT},</if>
        </trim>
    </insert>
@@ -68,7 +68,7 @@
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrWorkingInstruction">
        update pr_working_instruction
        <set>
                <if test="nodeId != null">
                <if test="nodeId!= null">
                    node_id = #{nodeId,jdbcType=BIGINT},
                </if>
                <if test="fileId != null">
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkHistoryMapper.xml
@@ -60,13 +60,13 @@
                <if test="lineId != null">line_id,</if>
                <if test="stationId != null">station_id,</if>
                <if test="planId != null">plan_id,</if>
                <if test="processId != null">process_id,</if>
                <if test="nodeId != null">node_id,</if>
                <if test="processId!= null">process_id,</if>
                <if test="nodeId!= null">node_id,</if>
                <if test="dt != null">dt,</if>
                <if test="status != null">status,</if>
                <if test="startTime != null">start_time,</if>
                <if test="endTime != null">end_time,</if>
                <if test="assistants != null">assistants,</if>
                <if test="assistants != null and assistants !=''">assistants,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
@@ -75,13 +75,13 @@
                <if test="lineId != null">#{lineId,jdbcType=BIGINT},</if>
                <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if>
                <if test="planId != null">#{planId,jdbcType=BIGINT},</if>
                <if test="processId != null">#{processId,jdbcType=BIGINT},</if>
                <if test="nodeId != null">#{nodeId,jdbcType=BIGINT},</if>
                <if test="processId!= null">#{processId,jdbcType=BIGINT},</if>
                <if test="nodeId!= null">#{nodeId,jdbcType=BIGINT},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
                <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
                <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
                <if test="assistants != null and assistants !=''">#{assistants,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkHistory">
@@ -102,10 +102,10 @@
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT},
                </if>
                <if test="processId != null">
                <if test="processId!= null">
                    process_id = #{processId,jdbcType=BIGINT},
                </if>
                <if test="nodeId != null">
                <if test="nodeId!= null">
                    node_id = #{nodeId,jdbcType=BIGINT},
                </if>
                <if test="dt != null">
@@ -120,7 +120,7 @@
                <if test="endTime != null">
                    end_time = #{endTime,jdbcType=TIMESTAMP},
                </if>
                <if test="assistants != null">
                <if test="assistants != null and assistants !=''">
                    assistants = #{assistants,jdbcType=VARCHAR},
                </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml
@@ -98,7 +98,7 @@
<!--        <include refid="Base_Column_List"/>-->
<!--        from plt_station where status =1-->
<!--        <trim prefix="and" suffixOverrides="and">-->
<!--            <if test="id != null and id !=''">-->
<!--            <if test="id != null">-->
<!--                id = #{id,jdbcType=BIGINT} and-->
<!--            </if>-->
<!--            <if test="code != null and code !=''">-->
@@ -107,10 +107,10 @@
<!--            <if test="name != null and name !=''">-->
<!--                name like concat('%', #{name}, '%') and-->
<!--            </if>-->
<!--            <if test="disabled != null and disabled !=''">-->
<!--            <if test="disabled != null">-->
<!--                disabled = #{disabled,jdbcType=TINYINT} and-->
<!--            </if>-->
<!--            <if test="lineId != null and lineId !=''">-->
<!--            <if test="lineId != null">-->
<!--                line_id = #{lineId,jdbcType=BIGINT} and-->
<!--            </if>-->
<!--        </trim>-->
@@ -122,31 +122,31 @@
        <include refid="Base_Column_List"/>
        from sta_assembly_work_last
        <where>
            <if test="userId != null and userId !=''">
            <if test="userId != null">
                and user_id = #{userId,jdbcType=BIGINT}
            </if>
            <if test="lineId != null and lineId !=''">
            <if test="lineId != null">
                and line_id = #{lineId,jdbcType=BIGINT}
            </if>
            <if test="stationId != null and stationId !=''">
            <if test="stationId != null">
                and station_id = #{stationId,jdbcType=BIGINT}
            </if>
            <if test="planId != null and planId !=''">
            <if test="planId != null">
                and plan_id = #{planId,jdbcType=BIGINT}
            </if>
            <if test="processId != null and processId !=''">
            <if test="processId != null">
                and process_id = #{processId,jdbcType=BIGINT}
            </if>
            <if test="nodeId != null and nodeId !=''">
            <if test="nodeId != null">
                and node_id = #{nodeId,jdbcType=BIGINT}
            </if>
            <if test="status != null and status !=''">
            <if test="status != null">
                and status = #{status,jdbcType=TINYINT}
            </if>
            <if test="startTime != null and startTime !=''">
            <if test="startTime != null">
                and start_time = #{startTime,jdbcType=TIMESTAMP}
            </if>
            <if test="endTime != null and endTime !=''">
            <if test="endTime != null">
                and end_time = #{endTime,jdbcType=TIMESTAMP}
            </if>
            <if test="assistants != null and assistants !=''">
@@ -204,25 +204,25 @@
            <if test="endTime != null">
                and l.start_time <![CDATA[ < ]]> #{endTime}
            </if>
            <if test="userId != null and userId !=''">
            <if test="userId != null">
                and l.user_id = #{userId,jdbcType=BIGINT}
            </if>
            <if test="lineId != null and lineId !=''">
            <if test="lineId != null">
                and l.line_id = #{lineId,jdbcType=BIGINT}
            </if>
            <if test="stationId != null and stationId !=''">
            <if test="stationId != null">
                and l.station_id = #{stationId,jdbcType=BIGINT}
            </if>
            <if test="planId != null and planId !=''">
            <if test="planId != null">
                and l.plan_id = #{planId,jdbcType=BIGINT}
            </if>
            <if test="processId != null and processId !=''">
            <if test="processId != null">
                and l.process_id = #{processId,jdbcType=BIGINT}
            </if>
            <if test="nodeId != null and nodeId !=''">
            <if test="nodeId != null">
                and l.node_id = #{nodeId,jdbcType=BIGINT}
            </if>
            <if test="status != null and status !=''">
            <if test="status != null">
                and l.status = #{status,jdbcType=TINYINT}
            </if>
            <if test="assistants != null and assistants !=''">
@@ -271,25 +271,25 @@
            <if test="endTime != null">
                and l.start_time <![CDATA[ < ]]> #{endTime,jdbcType=TIMESTAMP}
            </if>
            <if test="userId != null and userId !=''">
            <if test="userId != null">
                and l.user_id = #{userId,jdbcType=BIGINT}
            </if>
            <if test="lineId != null and lineId !=''">
            <if test="lineId != null">
                and l.line_id = #{lineId,jdbcType=BIGINT}
            </if>
            <if test="stationId != null and stationId !=''">
            <if test="stationId != null">
                and l.station_id = #{stationId,jdbcType=BIGINT}
            </if>
            <if test="planId != null and planId !=''">
            <if test="planId != null">
                and l.plan_id = #{planId,jdbcType=BIGINT}
            </if>
            <if test="processId != null and processId !=''">
            <if test="processId != null">
                and l.process_id = #{processId,jdbcType=BIGINT}
            </if>
            <if test="nodeId != null and nodeId !=''">
            <if test="nodeId != null">
                and l.node_id = #{nodeId,jdbcType=BIGINT}
            </if>
            <if test="status != null and status !=''">
            <if test="status != null">
                and l.status = #{status,jdbcType=TINYINT}
            </if>
            <if test="assistants != null and assistants !=''">
@@ -359,14 +359,14 @@
            <if test="lineId != null">line_id,</if>
            <if test="stationId != null">station_id,</if>
            <if test="planId != null">plan_id,</if>
            <if test="processId != null">process_id,</if>
            <if test="nodeId != null">node_id,</if>
            <if test="workType != null">work_Type,</if>
            <if test="processId!= null">process_id,</if>
            <if test="nodeId!= null">node_id,</if>
            <if test="workType!= null">work_Type,</if>
            <if test="dt != null">dt,</if>
            <if test="status != null">status,</if>
            <if test="startTime != null">start_time,</if>
            <if test="endTime != null">end_time,</if>
            <if test="assistants != null">assistants,</if>
            <if test="assistants != null and assistants !=''">assistants,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
@@ -374,14 +374,14 @@
            <if test="lineId != null">#{lineId,jdbcType=BIGINT},</if>
            <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if>
            <if test="planId != null">#{planId,jdbcType=BIGINT},</if>
            <if test="processId != null">#{processId,jdbcType=BIGINT},</if>
            <if test="nodeId != null">#{nodeId,jdbcType=BIGINT},</if>
            <if test="workType != null">#{workType,jdbcType=TINYINT},</if>
            <if test="processId!= null">#{processId,jdbcType=BIGINT},</if>
            <if test="nodeId!= null">#{nodeId,jdbcType=BIGINT},</if>
            <if test="workType!= null">#{workType,jdbcType=TINYINT},</if>
            <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
            <if test="status != null">#{status,jdbcType=TINYINT},</if>
            <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if>
            <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if>
            <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
            <if test="assistants != null and assistants !=''">#{assistants,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast">
@@ -399,13 +399,13 @@
            <if test="planId != null">
                plan_id = #{planId,jdbcType=BIGINT},
            </if>
            <if test="processId != null">
            <if test="processId!= null">
                process_id = #{processId,jdbcType=BIGINT},
            </if>
            <if test="nodeId != null">
            <if test="nodeId!= null">
                node_id = #{nodeId,jdbcType=BIGINT},
            </if>
            <if test="workType != null">
            <if test="workType!= null">
                work_type = #{workType,jdbcType=TINYINT},
            </if>
            <if test="dt != null">
@@ -420,7 +420,7 @@
            <if test="endTime != null">
                end_time = #{endTime,jdbcType=TIMESTAMP},
            </if>
            <if test="assistants != null">
            <if test="assistants != null and assistants !=''">
                assistants = #{assistants,jdbcType=VARCHAR},
            </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLastMapper.xml
@@ -13,6 +13,8 @@
        <result property="stationId" column="station_id" jdbcType="BIGINT"/>
        <result property="currNode" column="curr_node" jdbcType="BIGINT"/>
        <result property="nodeContent" column="node_content" jdbcType="VARCHAR"/>
        <result property="nextNode" column="next_node" jdbcType="BIGINT"/>
        <result property="nextNodeContent" column="next_node_content" jdbcType="VARCHAR"/>
        <result property="deviceCycleContent" column="device_cycle_content" jdbcType="VARCHAR"/>
        <result property="status" column="status" jdbcType="TINYINT"/>
        <result property="result" column="result" jdbcType="TINYINT"/>
@@ -69,14 +71,15 @@
        insert into sta_device_last
        ( id,device_no,work_id
        ,repair_id,plan_id,station_id
        ,curr_node,node_content,device_cycle_content
        ,curr_node,node_content,next_node,next_node_content,device_cycle_content
        ,status,result
        ,error_msg,assistants
        ,updated_by,in_time,out_time
        ,memo)
        values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT}
               ,#{repairId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{stationId,jdbcType=BIGINT}
               ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{deviceCycleContent,jdbcType=VARCHAR}
               ,#{currNode,jdbcType=BIGINT},#{nodeContent,jdbcType=VARCHAR},#{nextNode,jdbcType=BIGINT},#{nextNodeContent,jdbcType=VARCHAR}
               ,#{deviceCycleContent,jdbcType=VARCHAR}
               ,#{status,jdbcType=TINYINT},#{result,jdbcType=TINYINT}
               ,#{errorMsg,jdbcType=VARCHAR},#{assistants,jdbcType=VARCHAR}
               ,#{updatedBy,jdbcType=BIGINT},#{inTime,jdbcType=TIMESTAMP},#{outTime,jdbcType=TIMESTAMP}
@@ -87,51 +90,55 @@
        insert into sta_device_last
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="deviceNo != null">device_no,</if>
            <if test="deviceNo != null and deviceNo !=''">device_no,</if>
            <if test="workId != null">work_id,</if>
            <if test="repairId != null">repair_id,</if>
            <if test="planId != null">plan_id,</if>
            <if test="stationId != null">station_id,</if>
            <if test="currNode != null">curr_node,</if>
            <if test="nodeContent != null">node_content,</if>
            <if test="deviceCycleContent != null">device_cycle_content,</if>
            <if test="nodeContent != null and nodeContent !=''">node_content,</if>
            <if test="nextNode != null">next_node,</if>
            <if test="nextNodeContent != null and nextNodeContent !=''">next_node_content,</if>
            <if test="deviceCycleContent != null and deviceCycleContent !=''">device_cycle_content,</if>
            <if test="status != null">status,</if>
            <if test="result != null">result,</if>
            <if test="errorMsg != null">error_msg,</if>
            <if test="assistants != null">assistants,</if>
            <if test="errorMsg != null and errorMsg !=''">error_msg,</if>
            <if test="assistants != null and assistants !=''">assistants,</if>
            <if test="updatedBy != null">updated_by,</if>
            <if test="inTime != null">in_time,</if>
            <if test="outTime != null">out_time,</if>
            <if test="inLineTime != null">in_line_time,</if>
            <if test="outLineTime != null">out_line_time,</if>
            <if test="memo != null">memo,</if>
            <if test="memo != null and memo !=''">memo,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id,jdbcType=BIGINT},</if>
            <if test="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
            <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
            <if test="workId != null">#{workId,jdbcType=BIGINT},</if>
            <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if>
            <if test="planId != null">#{planId,jdbcType=BIGINT},</if>
            <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if>
            <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if>
            <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if>
            <if test="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if>
            <if test="nodeContent != null and nodeContent !=''">#{nodeContent,jdbcType=VARCHAR},</if>
            <if test="nextNode != null">#{nextNode,jdbcType=BIGINT},</if>
            <if test="nextNodeContent != null and nextNodeContent !=''">#{nextNodeContent,jdbcType=VARCHAR},</if>
            <if test="deviceCycleContent != null and deviceCycleContent !=''">#{deviceCycleContent,jdbcType=VARCHAR},</if>
            <if test="status != null">#{status,jdbcType=TINYINT},</if>
            <if test="result != null">#{result,jdbcType=TINYINT},</if>
            <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if>
            <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
            <if test="errorMsg != null and errorMsg !=''">#{errorMsg,jdbcType=VARCHAR},</if>
            <if test="assistants != null and assistants !=''">#{assistants,jdbcType=VARCHAR},</if>
            <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if>
            <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if>
            <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if>
            <if test="inLineTime != null">#{inLineTime,jdbcType=TIMESTAMP},</if>
            <if test="outLineTime != null">#{outLineTime,jdbcType=TIMESTAMP},</if>
            <if test="memo != null">#{memo,jdbcType=VARCHAR},</if>
            <if test="memo != null and memo !=''">#{memo,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLast">
        update sta_device_last
        <set>
            <if test="deviceNo != null">
            <if test="deviceNo != null and deviceNo !=''">
                device_no = #{deviceNo,jdbcType=VARCHAR},
            </if>
            <if test="workId != null">
@@ -149,10 +156,16 @@
            <if test="currNode != null">
                curr_node = #{currNode,jdbcType=BIGINT},
            </if>
            <if test="nodeContent != null">
            <if test="nodeContent != null and nodeContent !=''">
                node_content = #{nodeContent,jdbcType=VARCHAR},
            </if>
            <if test="deviceCycleContent != null">
            <if test="nextNode != null">
                next_node = #{nextNode,jdbcType=BIGINT},
            </if>
            <if test="nextNodeContent != null and nextNodeContent !=''">
                next_node_content = #{nextNodeContent,jdbcType=VARCHAR},
            </if>
            <if test="deviceCycleContent != null and deviceCycleContent !=''">
                device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
            </if>
            <if test="status != null">
@@ -161,10 +174,10 @@
            <if test="result != null">
                result = #{result,jdbcType=TINYINT},
            </if>
            <if test="errorMsg != null">
            <if test="errorMsg != null and errorMsg !=''">
                error_msg = #{errorMsg,jdbcType=VARCHAR},
            </if>
            <if test="assistants != null">
            <if test="assistants != null and assistants !=''">
                assistants = #{assistants,jdbcType=VARCHAR},
            </if>
            <if test="updatedBy != null">
@@ -182,7 +195,7 @@
            <if test="outLineTime != null">
                out_line_time = #{outLineTime,jdbcType=TIMESTAMP},
            </if>
            <if test="memo != null">
            <if test="memo != null and memo !=''">
                memo = #{memo,jdbcType=VARCHAR},
            </if>
        </set>
@@ -198,6 +211,8 @@
            station_id =  #{stationId,jdbcType=BIGINT},
            curr_node =  #{currNode,jdbcType=BIGINT},
            node_content =  #{nodeContent,jdbcType=VARCHAR},
            next_node =  #{nextNode,jdbcType=BIGINT},
            next_node_content =  #{nextNodeContent,jdbcType=VARCHAR},
            device_cycle_content =  #{deviceCycleContent,jdbcType=VARCHAR},
            status =  #{status,jdbcType=TINYINT},
            result =  #{result,jdbcType=TINYINT},
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeLastMapper.xml
@@ -82,45 +82,45 @@
        insert into sta_device_life_last
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="workId != null">work_id,</if>
                <if test="repairId != null">repair_id,</if>
                <if test="planId != null">plan_id,</if>
                <if test="stationId != null">station_id,</if>
                <if test="currNode != null">curr_node,</if>
                <if test="nodeContent != null">node_content,</if>
                <if test="deviceCycleContent != null">device_cycle_content,</if>
                <if test="nodeContent != null and nodeContent !=''">node_content,</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">device_cycle_content,</if>
                <if test="status != null">status,</if>
                <if test="errorMsg != null">error_msg,</if>
                <if test="assistants != null">assistants,</if>
                <if test="errorMsg != null and errorMsg !=''">error_msg,</if>
                <if test="assistants != null and assistants !=''">assistants,</if>
                <if test="inTime != null">in_time,</if>
                <if test="outTime != null">out_time,</if>
                <if test="updatedBy != null">updated_by,</if>
                <if test="memo != null">memo,</if>
                <if test="memo != null and memo !=''">memo,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="workId != null">#{workId,jdbcType=BIGINT},</if>
                <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if>
                <if test="planId != null">#{planId,jdbcType=BIGINT},</if>
                <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if>
                <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if>
                <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="nodeContent != null and nodeContent !=''">#{nodeContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if>
                <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
                <if test="errorMsg != null and errorMsg !=''">#{errorMsg,jdbcType=VARCHAR},</if>
                <if test="assistants != null and assistants !=''">#{assistants,jdbcType=VARCHAR},</if>
                <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if>
                <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if>
                <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if>
                <if test="memo != null">#{memo,jdbcType=VARCHAR},</if>
                <if test="memo != null and memo !=''">#{memo,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLifeLast">
        update sta_device_life_last
        <set>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=VARCHAR},
                </if>
                <if test="workId != null">
@@ -138,19 +138,19 @@
                <if test="currNode != null">
                    curr_node = #{currNode,jdbcType=BIGINT},
                </if>
                <if test="nodeContent != null">
                <if test="nodeContent != null and nodeContent !=''">
                    node_content = #{nodeContent,jdbcType=VARCHAR},
                </if>
                <if test="deviceCycleContent != null">
                <if test="deviceCycleContent != null and deviceCycleContent !=''">
                    device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
                <if test="errorMsg != null">
                <if test="errorMsg != null and errorMsg !=''">
                    error_msg = #{errorMsg,jdbcType=VARCHAR},
                </if>
                <if test="assistants != null">
                <if test="assistants != null and assistants !=''">
                    assistants = #{assistants,jdbcType=VARCHAR},
                </if>
                <if test="inTime != null">
@@ -162,7 +162,7 @@
                <if test="updatedBy != null">
                    updated_by = #{updatedBy,jdbcType=BIGINT},
                </if>
                <if test="memo != null">
                <if test="memo != null and memo !=''">
                    memo = #{memo,jdbcType=VARCHAR},
                </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/StaDeviceLifeMapper.xml
@@ -85,47 +85,47 @@
        insert into sta_device_life
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="workId != null">work_id,</if>
                <if test="repairId != null">repair_id,</if>
                <if test="planId != null">plan_id,</if>
                <if test="stationId != null">station_id,</if>
                <if test="currNode != null">curr_node,</if>
                <if test="nodeContent != null">node_content,</if>
                <if test="deviceCycleContent != null">device_cycle_content,</if>
                <if test="nodeContent != null and nodeContent !=''">node_content,</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">device_cycle_content,</if>
                <if test="status != null">status,</if>
                <if test="result != null">result,</if>
                <if test="errorMsg != null">error_msg,</if>
                <if test="assistants != null">assistants,</if>
                <if test="errorMsg != null and errorMsg !=''">error_msg,</if>
                <if test="assistants != null and assistants !=''">assistants,</if>
                <if test="inTime != null">in_time,</if>
                <if test="outTime != null">out_time,</if>
                <if test="updatedBy != null">updated_by,</if>
                <if test="memo != null">memo,</if>
                <if test="memo != null and memo !=''">memo,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="workId != null">#{workId,jdbcType=BIGINT},</if>
                <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if>
                <if test="planId != null">#{planId,jdbcType=BIGINT},</if>
                <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if>
                <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if>
                <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="nodeContent != null and nodeContent !=''">#{nodeContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="result != null">#{result,jdbcType=TINYINT},</if>
                <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if>
                <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
                <if test="errorMsg != null and errorMsg !=''">#{errorMsg,jdbcType=VARCHAR},</if>
                <if test="assistants != null and assistants !=''">#{assistants,jdbcType=VARCHAR},</if>
                <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if>
                <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if>
                <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if>
                <if test="memo != null">#{memo,jdbcType=VARCHAR},</if>
                <if test="memo != null and memo !=''">#{memo,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceLife">
        update sta_device_life
        <set>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=VARCHAR},
                </if>
                <if test="workId != null">
@@ -143,10 +143,10 @@
                <if test="currNode != null">
                    curr_node = #{currNode,jdbcType=BIGINT},
                </if>
                <if test="nodeContent != null">
                <if test="nodeContent != null and nodeContent !=''">
                    node_content = #{nodeContent,jdbcType=VARCHAR},
                </if>
                <if test="deviceCycleContent != null">
                <if test="deviceCycleContent != null and deviceCycleContent !=''">
                    device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
                </if>
                <if test="status != null">
@@ -155,10 +155,10 @@
                <if test="result != null">
                    result = #{result,jdbcType=TINYINT},
                </if>
                <if test="errorMsg != null">
                <if test="errorMsg != null and errorMsg !=''">
                    error_msg = #{errorMsg,jdbcType=VARCHAR},
                </if>
                <if test="assistants != null">
                <if test="assistants != null and assistants !=''">
                    assistants = #{assistants,jdbcType=VARCHAR},
                </if>
                <if test="inTime != null">
@@ -170,7 +170,7 @@
                <if test="updatedBy != null">
                    updated_by = #{updatedBy,jdbcType=BIGINT},
                </if>
                <if test="memo != null">
                <if test="memo != null and memo !=''">
                    memo = #{memo,jdbcType=VARCHAR},
                </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogMapper.xml
@@ -124,49 +124,49 @@
        insert into sta_device_production_log
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="workId != null">work_id,</if>
                <if test="repairId != null">repair_id,</if>
                <if test="planId != null">plan_id,</if>
                <if test="stationId != null">station_id,</if>
                <if test="currNode != null">curr_node,</if>
                <if test="nodeContent != null">node_content,</if>
                <if test="deviceCycleContent != null">device_cycle_content,</if>
                <if test="nodeContent != null and nodeContent !=''">node_content,</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">device_cycle_content,</if>
                <if test="status != null">status,</if>
                <if test="result != null">result,</if>
                <if test="errorMsg != null">error_msg,</if>
                <if test="assistants != null">assistants,</if>
                <if test="errorMsg != null and errorMsg !=''">error_msg,</if>
                <if test="assistants != null and assistants !=''">assistants,</if>
                <if test="inTime != null">in_time,</if>
                <if test="outTime != null">out_time,</if>
                <if test="updatedBy != null">updated_by,</if>
                <if test="memo != null">memo,</if>
                <if test="memo != null and memo !=''">memo,</if>
                <if test="number != null">number,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="workId != null">#{workId,jdbcType=BIGINT},</if>
                <if test="repairId != null">#{repairId,jdbcType=BIGINT},</if>
                <if test="planId != null">#{planId,jdbcType=BIGINT},</if>
                <if test="stationId != null">#{stationId,jdbcType=BIGINT},</if>
                <if test="currNode != null">#{currNode,jdbcType=BIGINT},</if>
                <if test="nodeContent != null">#{nodeContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="nodeContent != null and nodeContent !=''">#{nodeContent,jdbcType=VARCHAR},</if>
                <if test="deviceCycleContent != null and deviceCycleContent !=''">#{deviceCycleContent,jdbcType=VARCHAR},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="result != null">#{result,jdbcType=TINYINT},</if>
                <if test="errorMsg != null">#{errorMsg,jdbcType=VARCHAR},</if>
                <if test="assistants != null">#{assistants,jdbcType=VARCHAR},</if>
                <if test="errorMsg != null and errorMsg !=''">#{errorMsg,jdbcType=VARCHAR},</if>
                <if test="assistants != null and assistants !=''">#{assistants,jdbcType=VARCHAR},</if>
                <if test="inTime != null">#{inTime,jdbcType=TIMESTAMP},</if>
                <if test="outTime != null">#{outTime,jdbcType=TIMESTAMP},</if>
                <if test="updatedBy != null">#{updatedBy,jdbcType=BIGINT},</if>
                <if test="memo != null">#{memo,jdbcType=VARCHAR},</if>
                <if test="memo != null and memo !=''">#{memo,jdbcType=VARCHAR},</if>
                <if test="number != null">#{number,jdbcType=INTEGER},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog">
        update sta_device_production_log
        <set>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=VARCHAR},
                </if>
                <if test="workId != null">
@@ -184,10 +184,10 @@
                <if test="currNode != null">
                    curr_node = #{currNode,jdbcType=BIGINT},
                </if>
                <if test="nodeContent != null">
                <if test="nodeContent != null and nodeContent !=''">
                    node_content = #{nodeContent,jdbcType=VARCHAR},
                </if>
                <if test="deviceCycleContent != null">
                <if test="deviceCycleContent != null and deviceCycleContent !=''">
                    device_cycle_content = #{deviceCycleContent,jdbcType=VARCHAR},
                </if>
                <if test="status != null">
@@ -196,10 +196,10 @@
                <if test="result != null">
                    result = #{result,jdbcType=TINYINT},
                </if>
                <if test="errorMsg != null">
                <if test="errorMsg != null and errorMsg !=''">
                    error_msg = #{errorMsg,jdbcType=VARCHAR},
                </if>
                <if test="assistants != null">
                <if test="assistants != null and assistants !=''">
                    assistants = #{assistants,jdbcType=VARCHAR},
                </if>
                <if test="inTime != null">
@@ -211,7 +211,7 @@
                <if test="updatedBy != null">
                    updated_by = #{updatedBy,jdbcType=BIGINT},
                </if>
                <if test="memo != null">
                <if test="memo != null and memo !=''">
                    memo = #{memo,jdbcType=VARCHAR},
                </if>
                <if test="number != null">
pms-parent/pms-global/src/main/resources/mapper/StaDeviceProductionLogPastMapper.xml
@@ -51,4 +51,8 @@
    <delete id="deleteFromLogTable">
        DELETE FROM sta_device_production_log WHERE DATE(out_time) != CURDATE();
    </delete>
    <select id="countLastDayLogs" resultType="_long">
        SELECT COUNT(1) FROM sta_device_production_log WHERE DATE(out_time) != CURDATE();
    </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml
@@ -49,27 +49,27 @@
        insert into sta_repair_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="workId != null">work_id,</if>
                <if test="fromNode != null">from_node,</if>
                <if test="repairReason != null">repair_reason,</if>
                <if test="repairReason != null and repairReason !=''">repair_reason,</if>
                <if test="repairBy != null">repair_by,</if>
                <if test="repairTime != null">repair_time,</if>
                <if test="repairTime != null and repairTime !=''">repair_time,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="workId != null">#{workId,jdbcType=BIGINT},</if>
                <if test="fromNode != null">#{fromNode,jdbcType=BIGINT},</if>
                <if test="repairReason != null">#{repairReason,jdbcType=VARCHAR},</if>
                <if test="repairReason != null and repairReason !=''">#{repairReason,jdbcType=VARCHAR},</if>
                <if test="repairBy != null">#{repairBy,jdbcType=BIGINT},</if>
                <if test="repairTime != null">#{repairTime,jdbcType=TIMESTAMP},</if>
                <if test="repairTime != null and repairTime !=''">#{repairTime,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo">
        update sta_repair_info
        <set>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=VARCHAR},
                </if>
                <if test="workId != null">
@@ -78,13 +78,13 @@
                <if test="fromNode != null">
                    from_node = #{fromNode,jdbcType=BIGINT},
                </if>
                <if test="repairReason != null">
                <if test="repairReason != null and repairReason !=''">
                    repair_reason = #{repairReason,jdbcType=VARCHAR},
                </if>
                <if test="repairBy != null">
                    repair_by = #{repairBy,jdbcType=BIGINT},
                </if>
                <if test="repairTime != null">
                <if test="repairTime != null and repairTime !=''">
                    repair_time = #{repairTime,jdbcType=TIMESTAMP},
                </if>
        </set>
pms-parent/pms-global/src/main/resources/mapper/StaWipSnExMapper.xml
@@ -50,19 +50,19 @@
        insert into sta_wip_sn_ex
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="deviceNo != null">device_no,</if>
                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
                <if test="productId != null">product_id,</if>
                <if test="productName != null">product_name,</if>
                <if test="productNo != null">product_no,</if>
                <if test="createTime != null">create_time,</if>
                <if test="productName != null and productName !=''">product_name,</if>
                <if test="productNo!= null and productNo !=''">product_no,</if>
                <if test="createTime != null and createTime !=''">create_time,</if>
                <if test="createBy != null">create_by,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="deviceNo != null">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
                <if test="productId != null">#{productId,jdbcType=BIGINT},</if>
                <if test="productName != null">#{productName,jdbcType=VARCHAR},</if>
                <if test="productNo != null">#{productNo,jdbcType=VARCHAR},</if>
                <if test="productName != null and productName !=''">#{productName,jdbcType=VARCHAR},</if>
                <if test="productNo!= null and productNo !=''">#{productNo,jdbcType=VARCHAR},</if>
                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
                <if test="createBy != null">#{createBy,jdbcType=BIGINT},</if>
        </trim>
@@ -70,16 +70,16 @@
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaWipSnEx">
        update sta_wip_sn_ex
        <set>
                <if test="deviceNo != null">
                <if test="deviceNo != null and deviceNo !=''">
                    device_no = #{deviceNo,jdbcType=VARCHAR},
                </if>
                <if test="productId != null">
                    product_id = #{productId,jdbcType=BIGINT},
                </if>
                <if test="productName != null">
                <if test="productName != null and productName !=''">
                    product_name = #{productName,jdbcType=VARCHAR},
                </if>
                <if test="productNo != null">
                <if test="productNo!= null and productNo !=''">
                    product_no = #{productNo,jdbcType=VARCHAR},
                </if>
                <if test="createTime != null">
pms-parent/pms-global/src/main/resources/privileges-config.xml
@@ -23,6 +23,10 @@
        <privilege num="10200003" name="流程管理" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200004" name="运维计划查询" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200005" name="运维计划管理" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200006" name="订单查询" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200007" name="订单管理" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200008" name="排班查询" type="1020" typeName="生产管理"></privilege>
        <privilege num="10200009" name="排班管理" type="1020" typeName="生产管理"></privilege>
        <!-- å¹³å°ä¿¡æ¯ -->
        <privilege num="10300000" name="产品查询" type="1030" typeName="平台信息"></privilege>
pms-parent/pms-web-base/pom.xml
@@ -33,6 +33,13 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <!-- å¼•å…¥log4j2日志时需去掉默认的logback -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
@@ -49,15 +56,6 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <!--log4j-bom是个pom,没有具体的jar包, springboot需要它 -->
        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-bom -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-bom</artifactId>
            <version>${log4j-bom}</version>
            <!-- è¿™ä¸ªæ²¡æœ‰jar包,只有pom文件,所以要加上下面设置 -->
            <type>pom</type>
        </dependency>
        <!-- lombok -->
        <dependency>
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/user/UserCtrl.java
@@ -95,6 +95,7 @@
        po.supperAdmin = Constant.no.byteValue() ;
//            po.disabled = false ;//默认不禁用
        po.deleted = false;//默认不删除
        po.supperAdmin = 0;//默认不是管理员
        if (!StringUtils.isNullOrEmpty(po.password)) {
                /*
                å¦‚果前端进行了base64加密
pms-parent/pms-web-base/src/test/java/com/dy/pmsBase/PmsWebBaseApplicationTests.java
@@ -1,13 +1,22 @@
package com.dy.pmsBase;
import com.dingtalk.api.response.OapiRobotSendResponse;
import com.dy.pmsGlobal.util.DingDingUtils;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class PmsWebBaseApplicationTests {
    private DingDingUtils dingDingUtils;
    @Autowired
    public void setDingDingUtils(DingDingUtils dingDingUtils) {
        this.dingDingUtils = dingDingUtils;
    }
    @Test
    void contextLoads() {
        OapiRobotSendResponse rsp = dingDingUtils.send("各位,这是一条测试消息");
        System.out.println(rsp.getErrcode());
    }
}
pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportCtrl.java
@@ -1,5 +1,6 @@
package com.dy.pmsOther.screen;
import cn.hutool.json.JSONObject;
import com.dy.common.aop.SsoPowerAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
@@ -44,7 +45,13 @@
        List<StaDeviceProductionLog> log = sv.queryDeviceLog(startTime,endTime);
        return BaseResponseUtils.buildSuccess(log);
    }
}
    /**
     * ä»»åŠ¡çœ‹æ¿  æŸ¥è¯¢åœ¨äº§ä»»åŠ¡çœ‹æ¿
     * */
    @GetMapping(path="queryPlanList")
    @Log("查询在产任务看板")
    public BaseResponse<List<JSONObject>> queryPlanList(){
        List<JSONObject> list = sv.queryPlanList();
        return BaseResponseUtils.buildSuccess(list);
    }
}
pms-parent/pms-web-other/src/main/java/com/dy/pmsOther/screen/ScreenReportSv.java
@@ -1,7 +1,10 @@
package com.dy.pmsOther.screen;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper;
import com.dy.pmsGlobal.daoSta.*;
import com.dy.pmsGlobal.pojoSta.*;
import lombok.extern.slf4j.Slf4j;
@@ -18,6 +21,8 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@Slf4j
@Service
@@ -27,6 +32,7 @@
    private StaWipSnExMapper wipSnExDao;
    private StaDeviceProductionLogMapper deviceProductionLogDao;
    private StaRepairInfoMapper repairInfoDao;
    private PrAssemblyPlanMapper assemblyPlanDao;
    @Autowired
    public void setDeviceLastDao(StaDeviceLastMapper deviceLastDao) {
        this.deviceLastDao = deviceLastDao;
@@ -45,6 +51,11 @@
    @Autowired
    public void setDeviceProductionLogDao(StaDeviceProductionLogMapper deviceProductionLogDao) {
        this.deviceProductionLogDao = deviceProductionLogDao;
    }
    @Autowired
    public void setAssemblyPlanDao(PrAssemblyPlanMapper assemblyPlanDao) {
        this.assemblyPlanDao = assemblyPlanDao;
    }
    @Autowired
@@ -99,5 +110,32 @@
        return date;
    }
    public List<JSONObject> queryPlanList() {
        List<JSONObject> list = assemblyPlanDao.queryPlanList();
        Map<String, JSONObject> map = new ConcurrentHashMap<>(); // ä½¿ç”¨å¹¶å‘安全的Map
        for(JSONObject item:list){
            String planId = String.valueOf(item.getObj("planId"));
            JSONObject innerObject = new JSONObject()
                    .set("nodeId", String.valueOf(item.getObj("nodeId")))
                    .set("content", item.getObj("content"));
            if(map.containsKey(planId)){
                JSONArray array = (JSONArray)map.get(planId).get("nodes");
                array.add(innerObject);
            }else{
                JSONArray array = new JSONArray();
                array.add(innerObject);
                JSONObject outObject= new JSONObject()
                        .set("planId", planId)
                        .set("planName", item.getObj("planName"))
                        .set("nodes", array);
                map.put(planId,outObject);
            }
        }
        return map.values().stream().collect(Collectors.toList());
    }
}
pms-parent/pms-web-platform/pom.xml
@@ -33,6 +33,13 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <!-- å¼•å…¥log4j2日志时需去掉默认的logback -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
@@ -49,15 +56,6 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <!--log4j-bom是个pom,没有具体的jar包, springboot需要它 -->
        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-bom -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-bom</artifactId>
            <version>${log4j-bom}</version>
            <!-- è¿™ä¸ªæ²¡æœ‰jar包,只有pom文件,所以要加上下面设置 -->
            <type>pom</type>
        </dependency>
        <!-- lombok -->
        <dependency>
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proSR/QueryVo.java
@@ -12,7 +12,8 @@
public class QueryVo extends QueryConditionVo {
    public String reason;
    /**
     * äº§å“åç§°
     * äº§å“ID
     */
    public String proName;
    public Long proId;
}
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/proUR/QueryVo.java
@@ -14,5 +14,5 @@
    /**
     * äº§å“åç§°
     */
    public String proName;
    public String proId;
}
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductCtrl.java
@@ -131,6 +131,17 @@
        QueryVo vo = new QueryVo();
        return BaseResponseUtils.buildSuccess(proSv.selectAll(vo));
    }
    /**
     * å¯æ ¹æ®orderId查询产品
     * @return
     */
    @GetMapping(path="getProduct")
    @SsoPowerAop(power = "10300000")
    @Log("可根据orderId查询产品")
    public BaseResponse<List<PltProduct>> getProduct(Long orderId){
        return BaseResponseUtils.buildSuccess(proSv.getProduct(orderId));
    }
    @PostMapping(path="export")
    @SsoPowerAop(power = "10300001")
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java
@@ -76,9 +76,9 @@
    @Transactional
    public int save(PltProduct p) {
        //判断产品不能重名
        if (dao.exists(p.name, p.id)) {
            throw new RuntimeException("产品名称重复");
        //判断产品 åç§°å’Œåž‹å· ä¸èƒ½é‡å
        if (dao.exists(p.name.trim(), p.type.trim() ,p.id)) {
            throw new RuntimeException("已经存在相同的产品名称&型号");
        }
        int flag=0;
        do {
@@ -114,8 +114,8 @@
    @Transactional
    public int update(PltProduct p) {
        if (dao.exists(p.name, p.id)) {
            throw new RuntimeException("产品名称重复");
        if (dao.exists(p.name.trim(), p.type.trim(),p.id)) {
            throw new RuntimeException("已经存在相同的产品名称&型号");
        }
        int count = dao.updateByPrimaryKeySelective(p);
        //删除旧数据,重新插入
@@ -248,7 +248,9 @@
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        return dao.selectAll(params);
    }
    public List<PltProduct> getProduct(Long orderId) {
        return dao.selectByOrderId(orderId);
    }
//    public void downloadDoc(HttpServletResponse response) {
//        PltProduct pro=dao.selectByPrimaryKey(Long.valueOf(1));
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationCtrl.java
@@ -1,5 +1,6 @@
package com.dy.pmsPlatform.station;
import cn.hutool.json.JSONArray;
import com.alibaba.excel.converters.Converter;
import com.alibaba.fastjson2.JSON;
import com.dy.common.aop.SsoPowerAop;
@@ -117,6 +118,18 @@
        return BaseResponseUtils.buildSuccess(list);
    }
    /**
     * æŸ¥è¯¢æ‰€æœ‰å·¥ç«™
     * @return
     */
    @GetMapping(path="all")
    @SsoPowerAop(power = "10300006")
    @Log("查询所有工站")
    public BaseResponse<JSONArray> all(){
        JSONArray array = sv.selectAllIdAndName() ;
        return BaseResponseUtils.buildSuccess(array);
    }
    @PostMapping(path="disabled")
    @SsoPowerAop(power = "10300007")
    @Log("禁用或启用工站")
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java
@@ -1,5 +1,7 @@
package com.dy.pmsPlatform.station;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.alibaba.excel.util.StringUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.daoPlt.PltProductionLineMapper;
@@ -149,5 +151,14 @@
    public List<PltStation> selectAll() {
        return dao.selectAll();
    }
    public JSONArray selectAllIdAndName() {
        List<PltStation> list = dao.selectAll();
        JSONArray child = new JSONArray();
        list.forEach(item->{
            child.add(new JSONObject().set("id", String.valueOf(item.getId())).set("name", item.getName()));
        });
        return child;
    }
}
pms-parent/pms-web-product/pom.xml
@@ -32,6 +32,13 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <!-- å¼•å…¥log4j2日志时需去掉默认的logback -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
@@ -48,15 +55,6 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <!--log4j-bom是个pom,没有具体的jar包, springboot需要它 -->
        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-bom -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-bom</artifactId>
            <version>${log4j-bom}</version>
            <!-- è¿™ä¸ªæ²¡æœ‰jar包,只有pom文件,所以要加上下面设置 -->
            <type>pom</type>
        </dependency>
        <!-- lombok -->
        <dependency>
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/config/WebFilterConfiguration.java
@@ -31,7 +31,15 @@
            filterRegistrationBean.setOrder(order_DevStageFilter);//执行次序
        }else{
            filterRegistrationBean.setFilter(new UserTokenFilter());
            filterRegistrationBean.addUrlPatterns("/*");//配置过滤规则
            filterRegistrationBean.addUrlPatterns("/process/*","/order/*","/assembly/*",
                    "/devOps/*","/workStation/*","/assembly/*",
                    "/schedule/save",
                    "/schedule/update",
                    "/schedule/selectPlan",
                    "/schedule/one",
                    "/schedule/some",
                    "/schedule/export",
                    "/schedule/getUserList");//配置过滤规则
            filterRegistrationBean.setName("UserTokenFilter");//设置过滤器名称
            filterRegistrationBean.setOrder(order_UserTokenFilter);//执行次序
        }
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderCtrl.java
New file
@@ -0,0 +1,134 @@
package com.dy.pmsProduct.order;
import com.dy.common.aop.SsoPowerAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
import com.dy.pmsGlobal.pojoPlt.PltProduct;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrOrder;
import com.dy.pmsProduct.order.QueryVo;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * è®¢å•管理
 */
@Slf4j
@RestController
@RequestMapping(path = "order")
public class OrderCtrl {
    private OrderSv sv;
    @Autowired
    public void setAssemblySv(OrderSv orderSv) {
        this.sv = orderSv;
    }
    @PostMapping(path = "save")
    @SsoPowerAop(power = "10200007")
    @Log("保存订单信息")
    public BaseResponse<Boolean> save(@RequestBody @Valid PrOrder order) {
        int count = sv.save(order);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * æ›´æ–°
     *
     * @param order
     * @return
     */
    @PostMapping(path = "update")
    @SsoPowerAop(power = "10200007")
    @Log("修改订单信息")
    public BaseResponse<Boolean> update(@RequestBody @Valid PrOrder order) {
        int count = sv.update(order);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * åˆ é™¤è®¢å•信息
     *
     * @param id
     * @return
     */
    @GetMapping(path = "delete")
    @SsoPowerAop(power = "10200007")
    @Log("删除订单信息")
    public BaseResponse<Boolean> delete(String id) {
        int count = sv.delete(Long.parseLong(id));
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * æ ¹æ®ID查询
     *
     * @return
     */
    @GetMapping(path = "one")
    @SsoPowerAop(power = "10200006")
    @Log("根据ID查询订单信息")
    public BaseResponse<PrOrder> one(String id) {
        PrOrder plan = sv.selectById(id);
        return BaseResponseUtils.buildSuccess(plan);
    }
    /**
     * åˆ†é¡µæŸ¥è¯¢
     *
     * @param vo
     * @return
     */
    @PostMapping(path = "some")
    @SsoPowerAop(power = "10200006")
    @Log("分页查询订单信息")
    public BaseResponse<QueryResultVo<List<PrOrder>>> some(@RequestBody QueryVo vo) {
        QueryResultVo<List<PrOrder>> list = sv.selectSome(vo);
        return BaseResponseUtils.buildSuccess(list);
    }
    /**
     * æŸ¥è¯¢æ‰€æœ‰è®¢å•
     *
     * @return
     */
    @GetMapping(path = "all")
    @SsoPowerAop(power = "10200006")
    @Log("查询所有产品")
    public BaseResponse<List<PrOrder>> all() {
        QueryVo vo = new QueryVo();
        return BaseResponseUtils.buildSuccess(sv.selectAll(vo));
    }
    @PostMapping(path = "updateStatus")
    @SsoPowerAop(power = "10200007")
    @Log("更新订单状态")
    public BaseResponse<Boolean> updateStatus(@RequestBody PrOrder order) {
        int count = sv.updateStatus(order);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderStatusEnum.java
New file
@@ -0,0 +1,23 @@
package com.dy.pmsProduct.order;
public enum OrderStatusEnum {
    //枚举, çŠ¶æ€:正常(1) æš‚停(0) ç»“束(-1)
    NORMAL(1,"正常"),
    PAUSE(0,"暂停"),
    END(-1,"结束");
    private int code;
    private String name;
    OrderStatusEnum(int code, String name) {
        this.code = code;
        this.name = name;
    }
    public int getCode() {
        return code;
    }
    public String getName() {
        return name;
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/OrderSv.java
New file
@@ -0,0 +1,203 @@
package com.dy.pmsProduct.order;
import com.dy.common.webFilter.UserTokenContext;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.daoPr.*;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoPr.*;
import com.dy.pmsGlobal.util.UserUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
public class OrderSv {
    private PrOrderMapper orderDao;
    private PrOrderItemMapper orderItemDao;
    private UserUtil userUtil;
    @Autowired
    public void setOrderDao(PrOrderMapper orderDao) {
        this.orderDao = orderDao;
    }
    @Autowired
    public void setOrderItemDao(PrOrderItemMapper orderItemDao) {
        this.orderItemDao = orderItemDao;
    }
    @Autowired
    public void setUserUtil(UserUtil userUtil) {
        this.userUtil = userUtil;
    }
    @Transactional
    public int save(PrOrder p) {
        p.id = null;
        //判断产品不能重名
        if (orderDao.exists(p.name, p.id)) {
            throw new RuntimeException("订单名称不能重复");
        }
        extractedCheck(p);
        p.deleted = false;
        BaUser loginUser = userUtil.getUser(UserTokenContext.get());
        if (loginUser != null) {
            p.creator = loginUser.id;
        }
        int count = orderDao.insertSelective(p);
        saveOrderItems(p);
        return count;
    }
    @Transactional
    public int update(PrOrder p) {
        if (orderDao.exists(p.name, p.id)) {
            throw new RuntimeException("订单名称不能重复");
        }
        extractedCheck(p);
        int count = orderDao.updateByPrimaryKeySelective(p);
        if (count > 0) {
            saveOrderItems(p);
        }
        return count;
    }
    private void saveOrderItems(PrOrder p) {
        p.items.forEach(param -> {
            param.orderId = p.id;
            if (param.id != null) {
                orderItemDao.updateByPrimaryKeySelective(param);
            } else {
                param.deleted = false;
                orderItemDao.insert(param);
            }
        });
    }
    /**
     * é€»è¾‘删除实体
     *
     * @param id å®žä½“ID
     * @return å½±å“è®°å½•数量
     */
    @Transactional
    public int delete(Long id) {
        return orderDao.deleteLogicById(id);
    }
    public PrOrder selectById(String proId) {
        PrOrder pro = orderDao.selectByPrimaryKey(Long.valueOf(proId));
        changeRate(pro);
        return pro;
    }
    /**
     * èŽ·å–è®¢å•åˆ—è¡¨
     */
    public QueryResultVo<List<PrOrder>> selectSome(QueryVo queryVo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        //查询符合条件的记录总数
        Long itemTotal = orderDao.selectSomeCount(params);
        QueryResultVo<List<PrOrder>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr);
        //计算分页等信息
        rsVo.calculateAndSet(itemTotal, params);
        List<PrOrder> orderList = orderDao.selectSome(params);
        for (PrOrder prOrder : orderList) {
            changeRate(prOrder);
        }
        //查询符合条件的记录
        rsVo.obj = orderList;
        return rsVo;
    }
    private void changeRate(PrOrder prOrder) {
        if (prOrder != null && prOrder.items != null) {
            List<PrOrderItem> items = prOrder.items;
            for (int i = 1; i < items.size(); i++) {
                for (int j = i - 1; j >= 0; j--) {
                    //拿着i依次跟上一个比较,如果产品相同,则上一个记录complete_number - number å¦‚æžœ > 0 åˆ†ç»™i ,如果 < 0 åˆ™å°† complete_number ç½®ä¸º0
                    if (items.get(j).getProId().intValue() == items.get(i).getProId().intValue()) {
                        int remainNumber = items.get(j).getCompleteNumber() - items.get(j).getNumber();
                        if (remainNumber > 0) {
                            items.get(j).setCompleteNumber(items.get(j).getNumber());
                            items.get(j).setCompleteRate("100.00%");
                            items.get(i).setCompleteNumber(remainNumber);
                            BigDecimal remainBig = new BigDecimal(remainNumber * 100);
                            BigDecimal iNumberBig = new BigDecimal(items.get(i).getNumber());
                            BigDecimal result = remainBig.divide(iNumberBig, 2, RoundingMode.HALF_UP);
                            items.get(i).setCompleteRate(result.toString() + "%");
                        } else {
                            items.get(i).setCompleteNumber(0);
                            items.get(i).setCompleteRate("0.00%");
                        }
                        break;
                    }
                }
            }
        }
    }
    public List<PrOrder> selectAll(QueryVo queryVo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        List<PrOrder> orderList = orderDao.selectAll(params);
        for (PrOrder prOrder : orderList) {
            changeRate(prOrder);
        }
        return orderList;
    }
    /**
     * åªæ›´æ–°çŠ¶æ€,不更新其他字段
     *
     * @param order æ›´æ–°çŠ¶æ€  å¦‚果有在执行中的任务,不让暂停
     * @return
     */
    @Transactional
    public int updateStatus(PrOrder order) {
        if (order.status == OrderStatusEnum.NORMAL.getCode()) {
            PrOrder prOrder = orderDao.selectByPrimaryKey(order.id);
            prOrder.status = order.status;
            extractedCheck(prOrder);
        }
        PrOrder param = new PrOrder();
        param.id = order.id;
        param.status = order.status;
        return orderDao.updateByPrimaryKeySelective(param);
    }
    //如果交期小于当前时间,不允许设置为正常
    private void extractedCheck(PrOrder order) {
        if (order.status == OrderStatusEnum.NORMAL.getCode()) {
            String deliveryDateStr = order.getDeliveryDate();
            LocalDate endDate = LocalDate.parse(deliveryDateStr, DateTimeFormatter.ISO_LOCAL_DATE);
            LocalDate nextDay = endDate.plusDays(1);
            LocalDate today = LocalDate.now(); // èŽ·å–å½“å‰æ—¥æœŸ
            if (nextDay.isBefore(today)) {
                throw new RuntimeException("交付日期必须大于等于当前日期,请修改交付日期");
            }
        }
        //如果有在生产的任务不能设置为暂停 æˆ– ç»“束
 /*
        PrProductionProcess process = processDao.selectByPrimaryKey(order.processId);
        if(process == null || !process.proId.equals(order.proId)){
            throw new RuntimeException("产品与生产流程不匹配");
        }
        //开始日期要小于结束日期
        if(order.startDate.compareTo(order.endDate) > 0){
            throw new RuntimeException("开始日期不能大于结束日期");
        }*/
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/order/QueryVo.java
New file
@@ -0,0 +1,20 @@
package com.dy.pmsProduct.order;
import com.dy.common.webUtil.QueryConditionVo;
import lombok.*;
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class QueryVo extends QueryConditionVo {
    public String name;
    public String customerName;
    public String projectName;
    public String director;
    public String startDate;
    public String endDate;
    public Integer status;
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/process/ProcessSv.java
@@ -3,18 +3,12 @@
import com.dy.common.webFilter.UserTokenContext;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.daoOth.OthFileMapper;
import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper;
import com.dy.pmsGlobal.daoPr.PrProductionNodeMapper;
import com.dy.pmsGlobal.daoPr.PrProductionProcessMapper;
import com.dy.pmsGlobal.daoPr.PrWorkingInstructionMapper;
import com.dy.pmsGlobal.daoPr.*;
import com.dy.pmsGlobal.dyFile.FileOperate;
import com.dy.pmsGlobal.dyFile.FileRestVo;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoOth.OthFile;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrProductionNode;
import com.dy.pmsGlobal.pojoPr.PrProductionProcess;
import com.dy.pmsGlobal.pojoPr.PrWorkingInstruction;
import com.dy.pmsGlobal.pojoPr.*;
import com.dy.pmsGlobal.util.UserUtil;
import com.dy.pmsProduct.taskPlan.PlanStatusEnum;
import lombok.extern.slf4j.Slf4j;
@@ -39,6 +33,7 @@
    private PrProductionProcessMapper processDao;
    private PrProductionNodeMapper nodeDao;
    private PrWorkingInstructionMapper workDao;
    private PrBillOfMaterialMapper billDao;
    private UserUtil userUtil;
    private FileOperate fileOperate;
    private OthFileMapper othFileMapper;
@@ -78,6 +73,10 @@
    @Autowired
    public void setOthFileMapper(OthFileMapper othFileMapper) {
        this.othFileMapper = othFileMapper;
    }
    @Autowired
    public void setBillDao(PrBillOfMaterialMapper billDao) {
        this.billDao = billDao;
    }
    @Transactional
@@ -164,7 +163,7 @@
            }
        });
        if (startCount.get() != 1 || endCount.get() != 1) {
            throw new RuntimeException("节点开始和结束节点有且只能有一个");
            throw new RuntimeException("开始节点和结束节点有且只能有一个");
        }
    }
@@ -203,6 +202,17 @@
        if (CollectionUtils.isNotEmpty(workList)) {
            workDao.insertMany(workList);
        }
        List<PrBillOfMaterial> billList = process.nodes.stream().map(node -> {
            if (node.bill != null) {
                node.bill.nodeId = node.id;
                return node.bill;
            }
            return null;
        }).filter(bill -> bill != null).toList();
        if (CollectionUtils.isNotEmpty(billList)) {
            billDao.insertMany(billList);
        }
    }
    public int delete(Long id) {
@@ -215,6 +225,9 @@
            process.nodes.forEach(node -> {
                if (node.instruction != null) {
                    addUrl(node.instruction);
                }
                if (node.bill != null) {
                    addBillUrl(node.bill);
                }
            });
        }
@@ -238,6 +251,9 @@
                if (node.instruction != null) {
                    addUrl(node.instruction);
                }
                if (node.bill != null) {
                    addBillUrl(node.bill);
                }
            });
        });
        return rsVo;
@@ -256,8 +272,22 @@
            return;
        }
        FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
        ins.webUrl = fileRestVo.fileSysRestUrl + fileRestVo.fileWebDownloadPath + ins.fileId;
        ins.webUrl = fileRestVo.fileWebDownloadPath + ins.fileId;
        ins.orgName = file.orgName;
        ins.extName = file.extName;
    }
    private void addBillUrl(PrBillOfMaterial bill) {
        if (bill == null || bill.fileId == null) {
            return;
        }
        OthFile file = othFileMapper.selectByPrimaryKey(bill.fileId);
        if (file == null) {
            return;
        }
        FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
        bill.webUrl = fileRestVo.fileWebDownloadPath + bill.fileId;
        bill.orgName = file.orgName;
        bill.extName = file.extName;
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/CustomCellWriteHandler.java
New file
@@ -0,0 +1,82 @@
package com.dy.pmsProduct.schedule;
import com.alibaba.excel.util.BooleanUtils;
import com.alibaba.excel.write.handler.CellWriteHandler;
import com.alibaba.excel.write.handler.context.CellWriteHandlerContext;
import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.util.CellRangeAddress;
import org.springframework.stereotype.Component;
import java.util.List;
/**
 * è‡ªå®šä¹‰æ‹¦æˆªå™¨ã€‚
 * æ ¹æ®æŽ’班,设置横跨几行
 */
@Slf4j
@Component
public class CustomCellWriteHandler implements CellWriteHandler {
    // è®¾ç½®åˆå¹¶ç›¸åŒåç§°çš„单元列
    private int[] mergeColumnIndex = {1,2,3};
    // ä»Žå“ªè¡Œå¼€å§‹åˆå¹¶
    private int mergeRowIndex = 3;
    @Override
    public void afterCellDispose(CellWriteHandlerContext context) {
        Cell cell = context.getCell();
        //当前行
        int curRowIndex = cell.getRowIndex();
        //当前列
        int curColIndex = cell.getColumnIndex();
        WriteSheetHolder writeSheetHolder = context.getWriteSheetHolder();
        if (curRowIndex >= mergeRowIndex) {
            for (int i = 0; i < mergeColumnIndex.length; i++) {
                if (curColIndex == mergeColumnIndex[i]) {
                    mergeWithPrevRow(writeSheetHolder, cell, curRowIndex, curColIndex);
                    break;
                }
            }
        }
    }
    /**
     * å½“前单元格向上合并
     *
     * @param writeSheetHolder
     * @param cell             å½“前单元格
     * @param curRowIndex      å½“前行
     * @param curColIndex      å½“前列
     */
    private void mergeWithPrevRow(WriteSheetHolder writeSheetHolder, Cell cell, int curRowIndex, int curColIndex) {
        Object curId = cell.getSheet().getRow(curRowIndex).getCell(0).getStringCellValue();
        Object preId = cell.getSheet().getRow(curRowIndex-1).getCell(0).getStringCellValue();
        // æ¯”较当前行的id值与上一行是否相同,相同合并当前单元格与上一行
        if (curId.equals(preId)) {
            Sheet sheet = writeSheetHolder.getSheet();
            List<CellRangeAddress> mergeRegions = sheet.getMergedRegions();
            boolean isMerged = false;
            for (int i = 0; i < mergeRegions.size() && !isMerged; i++) {
                CellRangeAddress cellRangeAddr = mergeRegions.get(i);
                // è‹¥ä¸Šä¸€ä¸ªå•元格已经被合并,则先移出原有的合并单元,再重新添加合并单元
                if (cellRangeAddr.isInRange(curRowIndex - 1, curColIndex)) {
                    sheet.removeMergedRegion(i);
                    cellRangeAddr.setLastRow(curRowIndex);
                    sheet.addMergedRegion(cellRangeAddr);
                    isMerged = true;
                }
            }
            // è‹¥ä¸Šä¸€ä¸ªå•元格未被合并,则新增合并单元
            if (!isMerged) {
                CellRangeAddress cellRangeAddress = new CellRangeAddress(curRowIndex - 1, curRowIndex, curColIndex, curColIndex);
                sheet.addMergedRegion(cellRangeAddress);
            }
        }
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ExcelVo.java
New file
@@ -0,0 +1,61 @@
package com.dy.pmsProduct.schedule;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
import java.util.Date;
//参考:  https://easyexcel.opensource.alibaba.com/docs/current/quickstart/write
@Data
@HeadRowHeight(40) //设置标题高度
@HeadFontStyle(fontName="宋体", fontHeightInPoints = 16)
@HeadStyle(wrapped = BooleanEnum.TRUE, shrinkToFit = BooleanEnum.TRUE,
        horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
        leftBorderColor = 8, rightBorderColor = 8, topBorderColor = 8, bottomBorderColor = 8) //IndexedColors.BLACK
@ContentRowHeight(30) //设置内容高度
@ContentFontStyle(fontName="宋体", fontHeightInPoints = 11)
@ContentStyle(wrapped = BooleanEnum.TRUE, shrinkToFit = BooleanEnum.TRUE,
        horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
        leftBorderColor = 8, rightBorderColor = 8, topBorderColor = 8, bottomBorderColor = 8) //IndexedColors.BLACK
@ColumnWidth(16) //设置列宽
public class ExcelVo implements Converter<byte[]> {
    @ColumnWidth(0)//设置列宽为0,不显示
    @ExcelProperty("ID")
    public String id ;
    @ColumnWidth(15)
    @ExcelProperty("用户名")
    public String userName ;
    @ColumnWidth(20)
    @ExcelProperty("排班日期")
    public String scheduleDate ;
    @ColumnWidth(28)
    @ExcelProperty("创建时间")
    public Date dt ;
    @ColumnWidth(40)
    @ExcelProperty({"排班内容","任务计划"})
    public String planName ;
    @ColumnWidth(40)
    @ExcelProperty({"排班内容","节点"})
    public String nodeName ;
    @ColumnWidth(40)
    @ExcelProperty({"排班内容","工站"})
    public String stationName ;
    @ColumnWidth(40)
    @ExcelProperty({"排班内容","工作内容"})
    public String workDetails ;
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/QueryVo.java
New file
@@ -0,0 +1,17 @@
package com.dy.pmsProduct.schedule;
import com.dy.common.webUtil.QueryConditionVo;
import lombok.*;
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class QueryVo extends QueryConditionVo {
    public String planName;
    public String scheduleDate;
    public Long userId;
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleCtrl.java
New file
@@ -0,0 +1,161 @@
package com.dy.pmsProduct.schedule;
import cn.hutool.json.JSONObject;
import com.alibaba.excel.EasyExcel;
import com.dy.common.aop.SsoPowerAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoPr.PrSchedule;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/**
 * æŽ’班
 */
@Slf4j
@RestController
@RequestMapping(path="schedule")
public class ScheduleCtrl {
    private String fileName = "排班信息" ;
    private String sheetName = "排班信息" ;
    private ScheduleSv sv;
    @Autowired
    public void setScheduleSv(ScheduleSv scheduleSv) {
        this.sv = scheduleSv;
    }
    @PostMapping(path="save")
    @SsoPowerAop(power = "10200009")
    @Log("保存排班")
    public BaseResponse<Boolean> save(@RequestBody @Valid PrSchedule schedule){
        int count = sv.save(schedule);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * æ›´æ–°
     * @param schedule
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "10200009")
    @Log("更新排班")
    public BaseResponse<Boolean> update(@RequestBody @Valid PrSchedule schedule){
        int count = sv.update(schedule);
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * æŸ¥è¯¢ä»»åŠ¡è®¡åˆ’åˆ—è¡¨
     * @param vo
     * @return
     */
    @PostMapping(path="selectPlan")
    @SsoPowerAop(power = "10200008")
    @Log("查询任务计划列表")
    public BaseResponse<List<JSONObject>> selectPlan(@RequestBody QueryVo vo){
        List<JSONObject> array = sv.selectPlan(vo) ;
        return BaseResponseUtils.buildSuccess(array);
    }
    /**
     * æ ¹æ®ID查询
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "10200008")
    @Log("根据ID查询排班")
    public BaseResponse<PrSchedule> one(Long id){
        PrSchedule schedule=sv.selectById(id);
        return BaseResponseUtils.buildSuccess(schedule);
    }
    /**
     * åˆ†é¡µæŸ¥è¯¢
     * @param vo
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "10200008")
    @Log("分页查询排班")
    public BaseResponse<QueryResultVo<List<PrSchedule>>> some(@RequestBody QueryVo vo){
        QueryResultVo<List<PrSchedule>> list = sv.selectSome(vo) ;
        return BaseResponseUtils.buildSuccess(list);
    }
    /**
     * æ ¹æ®ID查询
     * @return
     */
    @GetMapping(path="getUserList")
    @SsoPowerAop(power = "10200008")
    @Log("查询系统中操作人员信息")
    public BaseResponse<List<BaUser>> getUserList(){
        List<BaUser> userList = sv.selectById();
        return BaseResponseUtils.buildSuccess(userList);
    }
    @PostMapping(path="export")
    @SsoPowerAop(power = "10200009")
    @Log("导出排班")
    public void exportSchedule(@RequestBody QueryVo queryVo, HttpServletResponse response) throws IOException {
        List<ExcelVo> list = new ArrayList<>();
        List<PrSchedule> schList = sv.selectAll(queryVo);
        if (CollectionUtils.isNotEmpty(schList)) {
            schList.forEach(sch -> {
                if (CollectionUtils.isNotEmpty(sch.relList)) {
                    sch.relList.forEach(rel -> {
                        ExcelVo vo = new ExcelVo();
                        vo.id = sch.id.toString();
                        vo.userName = sch.userName;
                        vo.scheduleDate = sch.scheduleDate;
                        vo.dt = sch.dt;
                        vo.planName = rel.planName;
                        vo.nodeName = rel.nodeName;
                        vo.stationName = rel.stationName;
                        vo.workDetails = rel.workDetails;
                        list.add(vo);
                    });
                }
            });
        }
        response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
        response.setCharacterEncoding("utf-8");
        fileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8).replaceAll("\\+", "%20");
        response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
        EasyExcel.write(response.getOutputStream(), list.get(0).getClass()).sheet(sheetName)
                .registerWriteHandler(new CustomCellWriteHandler()).doWrite(list);
    }
    /**
     * æŸ¥è¯¢æ‰€æœ‰,触屏端使用不验证token
     * @param queryVo
     * @return
     */
    @PostMapping(path="selectAll")
    public BaseResponse<List<PrSchedule>> selectAll(@RequestBody QueryVo queryVo) {
        return BaseResponseUtils.buildSuccess(sv.selectAll(queryVo));
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/schedule/ScheduleSv.java
New file
@@ -0,0 +1,153 @@
package com.dy.pmsProduct.schedule;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.daoBa.BaUserMapper;
import com.dy.pmsGlobal.daoPlt.PltStationMapper;
import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper;
import com.dy.pmsGlobal.daoPr.PrScheduleMapper;
import com.dy.pmsGlobal.daoPr.PrScheduleRelMapper;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoPlt.PltStation;
import com.dy.pmsGlobal.pojoPr.PrSchedule;
import com.dy.pmsGlobal.pojoPr.PrScheduleRel;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@Slf4j
@Service
public class ScheduleSv {
    private PrScheduleMapper scheduleDao;
    private PrScheduleRelMapper scheduleRelDao;
    private PrAssemblyPlanMapper assemblyPlanDao;
    private PltStationMapper stationDao;
    private BaUserMapper baUserDao;
    @Autowired
    public void setStationDao(PltStationMapper stationDao) {
        this.stationDao = stationDao;
    }
    @Autowired
    public void setScheduleRelDao(PrScheduleRelMapper scheduleRelDao) {
        this.scheduleRelDao = scheduleRelDao;
    }
    @Autowired
    public void setAssemblyPlanDao(PrAssemblyPlanMapper assemblyPlanDao) {
        this.assemblyPlanDao = assemblyPlanDao;
    }
    @Autowired
    public void setScheduleDao(PrScheduleMapper scheduleDao) {
        this.scheduleDao = scheduleDao;
    }
    @Autowired
    private void setBaUserMapper(BaUserMapper baUserDao) {
        this.baUserDao = baUserDao;
    }
    @Transactional
    public int save(PrSchedule schedule) {
        int count = scheduleDao.insertSelective(schedule);
        saveRel(schedule);
        return count;
    }
    @Transactional
    public int update(PrSchedule schedule) {
        scheduleRelDao.deleteByScheduleId(schedule.id);
        saveRel(schedule);
        return scheduleDao.updateByPrimaryKeySelective(schedule);
    }
    private void saveRel(PrSchedule schedule) {
        schedule.relList.forEach(rel -> validateRelData(rel, schedule));
        schedule.relList.forEach(rel -> scheduleRelDao.insertSelective(rel));
    }
    private void validateRelData(PrScheduleRel rel, PrSchedule schedule) {
        validatePlan(rel);
        validateStation(rel);
        rel.scheduleId = schedule.id;
    }
    private void validatePlan(PrScheduleRel rel) {
        if (rel.planId != null && rel.nodeId != null) {
            long countPlan = assemblyPlanDao.countByPlanIdAndNodeId(rel.planId, rel.nodeId);
            if (countPlan == 0) {
                log.error("排班数据不匹配, planId:{}, nodeId:{}", rel.planId, rel.nodeId);
                throw new RuntimeException("排班数据不匹配, planId:" + rel.planId + ", nodeId:" + rel.nodeId);
            }
        }
    }
    private void validateStation(PrScheduleRel rel) {
        if (rel.stationId != null) {
            Optional<PltStation> stationOpt = Optional.ofNullable(stationDao.selectByPrimaryKey(rel.stationId));
            stationOpt.orElseThrow(() -> {
                log.error("工站信息不存在, stationId:{}", rel.stationId);
                return new RuntimeException("工站信息不存在, stationId:" + rel.stationId);
            });
        }
    }
    public PrSchedule selectById(Long id) {
        return scheduleDao.selectByPrimaryKey(id);
    }
    public List<BaUser> selectById() {
        List<BaUser> userList = baUserDao.getUserList();
        return userList;
    }
    public QueryResultVo<List<PrSchedule>> selectSome(QueryVo vo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(vo);
        //查询符合条件的记录总数
        Long itemTotal = scheduleDao.selectSomeCount(params);
        QueryResultVo<List<PrSchedule>> rsVo = new QueryResultVo<>(vo.pageSize, vo.pageCurr);
        //计算分页等信息
        rsVo.calculateAndSet(itemTotal, params);
        //查询符合条件的记录
        rsVo.obj = scheduleDao.selectSome(params);
        return rsVo;
    }
    public List<JSONObject> selectPlan(QueryVo vo) {
        List<JSONObject> list = assemblyPlanDao.selectByPlanName(vo.planName);
        Map<String, JSONObject> map = new ConcurrentHashMap<>(); // ä½¿ç”¨å¹¶å‘安全的Map
        for(JSONObject item:list){
            String planId = String.valueOf(item.getObj("planId"));
            JSONObject innerObject = new JSONObject()
                    .set("nodeId", String.valueOf(item.getObj("nodeId")))
                    .set("content", item.getObj("content"));
            if(map.containsKey(planId)){
                JSONArray array = (JSONArray)map.get(planId).get("nodes");
                array.add(innerObject);
            }else{
                JSONArray array = new JSONArray();
                array.add(innerObject);
                JSONObject outObject= new JSONObject()
                        .set("planId", planId)
                        .set("planName", item.getObj("planName"))
                        .set("nodes", array);
                map.put(planId,outObject);
            }
        }
        return map.values().stream().collect(Collectors.toList());
    }
    public List<PrSchedule> selectAll(QueryVo queryVo) {
        return scheduleDao.selectAll(queryVo.scheduleDate, queryVo.userId);
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java
@@ -129,7 +129,7 @@
    @GetMapping(path="exportDevice")
    @SsoPowerAop(power = "10200001")
    @Log("导出设备号")
    @Log("导出设备号及二维码")
    public void exportDevice(Long batchId, HttpServletResponse response){
        Date start = new Date() ;
        List<Converter> list = new ArrayList<>();
@@ -146,8 +146,29 @@
            }
            list.add(vo);
        });
        log.info("导出设备号耗时:"+(new Date().getTime()-start.getTime())+"ms");
        log.info("导出设备号及二维码耗时:"+(new Date().getTime()-start.getTime())+"ms");
        QrCodeUtil.downloadExcel(response, fileName,sheetName,list);
        log.info("导出设备号及二维码耗时:"+(new Date().getTime()-start.getTime())+"ms");
    }
    @GetMapping(path="exportDeviceNo")
    @SsoPowerAop(power = "10200001")
    @Log("导出设备号")
    public void exportDeviceNo(Long batchId, HttpServletResponse response){
        Date start = new Date() ;
        List<Converter> list = new ArrayList<>();
        List<PrDevice> deviceList = sv.selectDeviceByBatchId(batchId) ;
        // ä½¿ç”¨å¹¶è¡Œæµæé«˜æ€§èƒ½
        deviceList.parallelStream().forEach(device -> {
            ExcelDeviceNoVo vo = new ExcelDeviceNoVo();
            vo.deviceNo = device.deviceNo;
            list.add(vo);
        });
        //根据batchid找到任务名称
        PrAssemblyPlan plan = sv.selectByBatchId(batchId);
        String fileNameStr = plan.name +"-"+ fileName;
        log.info("导出设备号耗时:"+(new Date().getTime()-start.getTime())+"ms");
        QrCodeUtil.downloadExcel(response, fileNameStr,sheetName,list);
        log.info("导出设备号耗时:"+(new Date().getTime()-start.getTime())+"ms");
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java
@@ -268,6 +268,9 @@
        return deviceDao.selectByBatchId(batchId);
    }
    public PrAssemblyPlan selectByBatchId(Long batchId){
        return assemblyDao.selectByBatchId(batchId);
    }
    /**
     * åªæ›´æ–°çŠ¶æ€,不更新其他字段
     * @param plan
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/ExcelDeviceNoVo.java
New file
@@ -0,0 +1,25 @@
package com.dy.pmsProduct.taskPlan;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.*;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import lombok.Data;
//参考:  https://easyexcel.opensource.alibaba.com/docs/current/quickstart/write
@Data
@HeadRowHeight(40) //设置标题高度
@HeadFontStyle(fontName="宋体", fontHeightInPoints = 16)
@HeadStyle(wrapped = BooleanEnum.TRUE, shrinkToFit = BooleanEnum.TRUE,
        horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER,
        borderLeft = BorderStyleEnum.THIN, borderRight = BorderStyleEnum.THIN, borderTop = BorderStyleEnum.THIN, borderBottom = BorderStyleEnum.THIN,
        leftBorderColor = 8, rightBorderColor = 8, topBorderColor = 8, bottomBorderColor = 8) //IndexedColors.BLACK
@ColumnWidth(16) //设置列宽
public class ExcelDeviceNoVo implements Converter<byte[]> {
    @ColumnWidth(40)
    @ExcelProperty("设备号")
    public String deviceNo ;
}
pms-parent/pms-web-station/pom.xml
@@ -38,6 +38,13 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <!-- å¼•å…¥log4j2日志时需去掉默认的logback -->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
@@ -54,15 +61,6 @@
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <!--log4j-bom是个pom,没有具体的jar包, springboot需要它 -->
        <!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-bom -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-bom</artifactId>
            <version>${log4j-bom}</version>
            <!-- è¿™ä¸ªæ²¡æœ‰jar包,只有pom文件,所以要加上下面设置 -->
            <type>pom</type>
        </dependency>
        <!-- lombok -->
        <dependency>
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepSv.java
@@ -246,6 +246,9 @@
        } else {
            PrProductionNode node = nodeDao.selectByPrimaryKey(workLast.nodeId);
            record.nodeContent = node.content;
            PrProductionNode nextNode = nodeDao.selectNodeBySort(node.getProcessId() , (node.getSort() + 1));
            record.nextNodeContent = nextNode.content;
            record.nextNode = nextNode.id;
            if (node.isRecord) {
                record.deviceCycleContent = node.deviceCycleContent;
            }
@@ -477,7 +480,7 @@
                return;
            }
            FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
            doc.webUrl = fileRestVo.fileSysRestUrl + fileRestVo.fileWebDownloadPath + doc.fileId;
            doc.webUrl = fileRestVo.fileWebDownloadPath + doc.fileId;
            doc.orgName = file.orgName;
            doc.extName = file.extName;
        });
@@ -519,7 +522,7 @@
            return;
        }
        FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash);
        ins.webUrl = fileRestVo.fileSysRestUrl + fileRestVo.fileWebDownloadPath + ins.fileId;
        ins.webUrl = fileRestVo.fileWebDownloadPath + ins.fileId;
        ins.orgName = file.orgName;
        ins.extName = file.extName;
    }
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/config/AppStartupRunner.java
@@ -1,15 +1,32 @@
package com.dy.pmsStation.config;
import com.dy.common.schedulerTask.SchedulerTaskSupport;
import com.dy.pmsGlobal.daoSta.StaDeviceProductionLogPastMapper;
import com.dy.pmsStation.task.LogMoveTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class AppStartupRunner implements CommandLineRunner {
    private StaDeviceProductionLogPastMapper pastMapper;
    @Autowired
    public void setPastMapper(StaDeviceProductionLogPastMapper pastMapper) {
        this.pastMapper = pastMapper;
    }
    @Override
    public void run(String... args) throws Exception {
        //服务启动时检查上次任务是否已执行
        Long count = pastMapper.countLastDayLogs();
        log.info("未移动记录数量:"+count);
        if(count >0){
            new LogMoveTask().execute(null);
        }
        SchedulerTaskSupport.addDailyJob("logMoveTask", "station", LogMoveTask.class,
                null, 0, 5);
    }
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/task/LogMoveTask.java
@@ -6,11 +6,9 @@
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
@Slf4j
@Component
public class LogMoveTask extends TaskJob {
    @Override
@@ -18,8 +16,11 @@
    public void execute(JobExecutionContext ctx) throws JobExecutionException {
        log.info("生产日志移动任务开始");
        StaDeviceProductionLogPastMapper pastMapper = SpringContextUtil.getBean(StaDeviceProductionLogPastMapper.class);
        pastMapper.insertIntoPastLogs();
        pastMapper.deleteFromLogTable();
        Long count = pastMapper.countLastDayLogs();
        if(count>0){
            pastMapper.insertIntoPastLogs();
            pastMapper.deleteFromLogTable();
        }
        log.info("生产日志移动任务结束");
    }
}
pms-parent/pom.xml
@@ -235,6 +235,14 @@
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!--钉钉消息推送-->
            <dependency>
                <groupId>com.aliyun</groupId>
                <artifactId>alibaba-dingtalk-service-sdk</artifactId>
                <version>2.0.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- vo po转换 -->
            <dependency>
                <groupId>org.mapstruct</groupId>