liuxm
2024-06-03 f5156a92b4f64b496336e6465ff9e76ba6d9c756
组装生产任务计划
27个文件已添加
10个文件已修改
2504 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrAssemblyPlanMapper.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrBatchNumberMapper.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrDevOpsPlanMapper.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrDevOpsTaskClaimInfoMapper.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrEquipLifeCycleMapper.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrEquipMapper.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrProductionTaskClaimInfoMapper.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrAssemblyPlan.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrBatchNumber.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrDevOpsPlan.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrDevOpsTaskClaimInfo.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrEquip.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrEquipLifeCycle.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionTaskClaimInfo.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/QrCodeUtil.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaUserMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrBatchNumberMapper.xml 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrDevOpsPlanMapper.xml 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrDevOpsTaskClaimInfoMapper.xml 138 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrEquipLifeCycleMapper.xml 125 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrEquipMapper.xml 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionTaskClaimInfoMapper.xml 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java 187 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/ExcelVo.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/PlanStatusEnum.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/QueryVo.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrAssemblyPlanMapper.java
New file
@@ -0,0 +1,36 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_assembly_plan(组装生产任务计划)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrAssemblyPlan
*/
@Mapper
public interface PrAssemblyPlanMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrAssemblyPlan record);
    int insertSelective(PrAssemblyPlan record);
    PrAssemblyPlan selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrAssemblyPlan record);
    int updateByPrimaryKey(PrAssemblyPlan record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrAssemblyPlan> selectSome(Map<String,Object> params);
    int deleteLogicById(Long id);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrBatchNumberMapper.java
New file
@@ -0,0 +1,33 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrBatchNumber;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_batch_number(产品批次表)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrBatchNumber
*/
@Mapper
public interface PrBatchNumberMapper {
    int deleteByPrimaryKey(Long id);
    int insertSelective(PrBatchNumber record);
    PrBatchNumber selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrBatchNumber record);
    int updateByPrimaryKey(PrBatchNumber record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrBatchNumber> selectSome(Map<String,Object> params);
    String selectMaxCode(String currentDayStr);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrDevOpsPlanMapper.java
New file
@@ -0,0 +1,36 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrDevOpsPlan;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_dev_ops_plan(安装运维任务计划)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrDevOpsPlan
*/
@Mapper
public interface PrDevOpsPlanMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrDevOpsPlan record);
    int insertSelective(PrDevOpsPlan record);
    PrDevOpsPlan selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrDevOpsPlan record);
    int updateByPrimaryKey(PrDevOpsPlan record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrDevOpsPlan> selectSome(Map<String,Object> params);
    int deleteLogicById(Long id);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrDevOpsTaskClaimInfoMapper.java
New file
@@ -0,0 +1,36 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_dev_ops_task_claim_info(安装运维任务认领表)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo
*/
@Mapper
public interface PrDevOpsTaskClaimInfoMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrDevOpsTaskClaimInfo record);
    int insertSelective(PrDevOpsTaskClaimInfo record);
    PrDevOpsTaskClaimInfo selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrDevOpsTaskClaimInfo record);
    int updateByPrimaryKey(PrDevOpsTaskClaimInfo record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrDevOpsTaskClaimInfo> selectSome(Map<String,Object> params);
    int deleteLogicById(Long id);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrEquipLifeCycleMapper.java
New file
@@ -0,0 +1,36 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_equip_life_cycle(设备生命周期表)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle
*/
@Mapper
public interface PrEquipLifeCycleMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrEquipLifeCycle record);
    int insertSelective(PrEquipLifeCycle record);
    PrEquipLifeCycle selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrEquipLifeCycle record);
    int updateByPrimaryKey(PrEquipLifeCycle record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrEquipLifeCycle> selectSome(Map<String,Object> params);
    int deleteLogicById(Long id);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrEquipMapper.java
New file
@@ -0,0 +1,40 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrEquip;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_equip(设备表)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrEquip
*/
@Mapper
public interface PrEquipMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrEquip record);
    int insertSelective(PrEquip record);
    PrEquip selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrEquip record);
    int updateByPrimaryKey(PrEquip record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrEquip> selectSome(Map<String,Object> params);
    int insertBatch(List<PrEquip> list);
    List<PrEquip> selectByBatchId(Long batchId);
    void deleteByBatchId(Long batchId);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoPr/PrProductionTaskClaimInfoMapper.java
New file
@@ -0,0 +1,36 @@
package com.dy.pmsGlobal.daoPr;
import com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* @author 小明
* @description 针对表【pr_production_task_claim_info(生产线生产任务认领表)】的数据库操作Mapper
* @createDate 2024-05-29 15:53:10
* @Entity com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo
*/
@Mapper
public interface PrProductionTaskClaimInfoMapper {
    int deleteByPrimaryKey(Long id);
    int insert(PrProductionTaskClaimInfo record);
    int insertSelective(PrProductionTaskClaimInfo record);
    PrProductionTaskClaimInfo selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(PrProductionTaskClaimInfo record);
    int updateByPrimaryKey(PrProductionTaskClaimInfo record);
    Long selectSomeCount(Map<String,Object> params);
    List<PrProductionTaskClaimInfo> selectSome(Map<String,Object> params);
    int deleteLogicById(Long id);
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrAssemblyPlan.java
New file
@@ -0,0 +1,109 @@
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.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;
/**
 * 组装生产任务计划
 * @TableName pr_assembly_plan
 */
@TableName(value="pr_assembly_plan", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrAssemblyPlan implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 产品实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @NotNull(message = "产品实体编号不能为空")
    public Long proId;
    /**
     * 批次实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long batchId;
    /**
     * 生产流程实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @NotNull(message = "生产流程实体编号不能为空")
    public Long processId;
    /**
     * 名称
     */
    @NotEmpty(message = "名称不能为空")
    public String name;
    /**
     * 生产数量
     */
    @NotNull(message = "生产数量不能为空")
    public Integer number;
    /**
     * 状态:正常(1)、暂停(0)、结束(-1)
     */
    public Integer status;
    /**
     * 创建人
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long creator;
    @TableField(exist = false)
    public String creatorName;
    @TableField(exist = false)
    public String proName;
    @TableField(exist = false)
    public String batchNo;
    /**
     * 创建时间
     */
    public Date dt;
    /**
     * 开始日期
     */
    @NotEmpty(message = "开始日期不能为空")
    public String startDate;
    /**
     * 结束日期
     */
    public String endDate;
    /**
     * 是否删除,1是,0否
     */
    @JSONField(serialize = false)
    public Boolean deleted;
    /**
     * 作业内容
     */
    @NotEmpty(message = "作业内容不能为空")
    public String content;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrBatchNumber.java
New file
@@ -0,0 +1,57 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
import java.util.Date;
/**
 * 产品批次表
 * @TableName pr_batch_number
 */
@TableName(value="pr_batch_number", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrBatchNumber implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 批次号
     */
    public String batchNumber;
    /**
     * 产品实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long proId;
    /**
     * 创建人
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long creator;
    /**
     * 创建时间
     */
    public Date dt;
    /**
     * 备注
     */
    public String remark;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrDevOpsPlan.java
New file
@@ -0,0 +1,75 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
import java.util.Date;
/**
 * 安装运维任务计划
 * @TableName pr_dev_ops_plan
 */
@TableName(value="pr_dev_ops_plan", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrDevOpsPlan implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 名称
     */
    public String name;
    /**
     * 点位数量
     */
    public Integer num;
    /**
     * 状态:正常(1)、暂停(0)、结束(-1)
     */
    public Integer status;
    /**
     * 创建人
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public String creator;
    /**
     * 创建时间
     */
    public Date dt;
    /**
     * 开始日期
     */
    public String startDate;
    /**
     * 结束日期
     */
    public String endDate;
    /**
     * 是否删除,1是,0否
     */
    public Boolean deleted;
    /**
     * 作业内容
     */
    public String content;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrDevOpsTaskClaimInfo.java
New file
@@ -0,0 +1,51 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
import java.util.Date;
/**
 * 安装运维任务认领表
 * @TableName pr_dev_ops_task_claim_info
 */
@TableName(value="pr_dev_ops_task_claim_info", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrDevOpsTaskClaimInfo implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 用户实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long userId;
    /**
     * 安装运维任务实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long planId;
    /**
     * 任务认领时间
     */
    public Date dt;
    /**
     * 状态:正常(1)、结束(0)
     */
    public Integer status;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrEquip.java
New file
@@ -0,0 +1,53 @@
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.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
/**
 * 设备表
 * @TableName pr_equip
 */
@TableName(value="pr_equip", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrEquip implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 产品实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long proId;
    /**
     * 批次实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long batchId;
    /**
     * 设备码
     */
    public String equipNo;
    @TableField(exist = false)
    public String qrCode;
    /**
     * 状态:正在生产(0),生产结束(1)
     */
    public Integer status;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrEquipLifeCycle.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.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
import java.util.Date;
/**
 * 设备生命周期表
 * @TableName pr_equip_life_cycle
 */
@TableName(value="pr_equip_life_cycle", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrEquipLifeCycle implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 设备实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long equipId;
    /**
     * 记录设备周期内容
     */
    public String equipCycleContent;
    /**
     * 创建时间
     */
    public Date dt;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionProcess.java
@@ -76,5 +76,9 @@
    @TableField(exist = false)
    public List<PrProductionNode> nodes;
    /**
     * 是否被引用
     */
    public boolean isQuote;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPr/PrProductionTaskClaimInfo.java
New file
@@ -0,0 +1,75 @@
package com.dy.pmsGlobal.pojoPr;
import com.alibaba.fastjson2.annotation.JSONField;
import com.alibaba.fastjson2.writer.ObjectWriterImplToString;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dy.common.po.BaseEntity;
import lombok.*;
import java.util.Date;
/**
 * 生产线生产任务认领表
 * @TableName pr_production_task_claim_info
 */
@TableName(value="pr_production_task_claim_info", autoResultMap = true)
@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class PrProductionTaskClaimInfo implements BaseEntity {
    /**
     *
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    @TableId
    public Long id;
    /**
     * 用户实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long userId;
    /**
     * 生产线实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long lineId;
    /**
     * 工站实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long stationId;
    /**
     * 组装生产任务实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long planId;
    /**
     * 生产流程实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long processId;
    /**
     * 生产流程节点实体编号
     */
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long nodeId;
    /**
     * 任务认领时间
     */
    public Date dt;
    /**
     * 状态:正常(1)、结束(0)
     */
    public Integer status;
}
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/util/QrCodeUtil.java
@@ -1,5 +1,6 @@
package com.dy.pmsGlobal.util;
import cn.hutool.core.codec.Base64;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.converters.Converter;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
@@ -45,6 +46,18 @@
        return QrCodeGenerator.bufferedImageToByteArray(qrCodeImage, "JPEG");
    }
    public static String genQrCodeString(String code){
        try {
            byte[] codes = QrCodeUtil.genQrCode(code);
            return "data:image/jpeg;base64," + Base64.encode(codes);
        } catch (IOException e) {
            e.printStackTrace();
        } catch (WriterException e) {
            e.printStackTrace();
        }
        return "";
    }
    public static void downloadExcel(HttpServletResponse response, String fileName, String sheetName, List<Converter> list){
        if(CollectionUtils.isEmpty(list)){
            return;
@@ -55,7 +68,6 @@
            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);
            EasyExcel.write(response.getOutputStream(), Converter.class).sheet(sheetName).doWrite(list);
        }catch (Exception e){
            log.error("导出产品信息异常", e);
        }
pms-parent/pms-global/src/main/resources/mapper/BaUserMapper.xml
@@ -47,6 +47,9 @@
    id, name, phone, supper_admin
  </sql>
  <select id="selectNameByUserId" parameterType="java.lang.Long" resultType="java.lang.String">
    select name from ba_user where id=#{id}
  </select>
  <select id="selectCount" resultType="java.lang.Long">
    select
      count(*)
pms-parent/pms-global/src/main/resources/mapper/PltProductMapper.xml
@@ -38,6 +38,9 @@
    where pro_id = #{proId,jdbcType=BIGINT}
  </select>
    <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="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap2">
    <!--@mbg.generated-->
    select
pms-parent/pms-global/src/main/resources/mapper/PltProductQualityInspectionItemsMapper.xml
@@ -12,7 +12,7 @@
        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="selectProNameById" fetchType="eager" />
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -27,9 +27,6 @@
        ${alias}.disabled,
        ${alias}.deleted
    </sql>
    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
        select name proName from plt_product where id=#{id}
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
pms-parent/pms-global/src/main/resources/mapper/PltProductScrappingReasonMapper.xml
@@ -12,7 +12,7 @@
        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="selectProNameById" fetchType="eager" />
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -27,9 +27,6 @@
        ${alias}.deleted,
        ${alias}.disabled
    </sql>
    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
        select name proName from plt_product where id=#{id}
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
pms-parent/pms-global/src/main/resources/mapper/PltProductUnqualifiedReasonMapper.xml
@@ -12,16 +12,13 @@
        <result column="disabled" property="disabled" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <result property="deleted" column="deleted" typeHandler="com.dy.common.mybatis.BooleanTypeHandler"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="selectProNameById" fetchType="eager" />
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
        id,pro_id,reason,disabled,
        deleted,pro_id,sort
    </sql>
    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
        select name proName from plt_product where id=#{id}
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml
New file
@@ -0,0 +1,197 @@
<?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.PrAssemblyPlanMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        <id property="id" column="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"/>
        <result property="name" column="name" jdbcType="VARCHAR"/>
        <result property="number" column="number" jdbcType="INTEGER"/>
        <result property="status" column="status" jdbcType="TINYINT"/>
        <result property="creator" column="creator" jdbcType="VARCHAR"/>
        <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
        <result property="startDate" column="start_date" jdbcType="VARCHAR"/>
        <result property="endDate" column="end_date" jdbcType="VARCHAR"/>
        <result property="deleted" column="deleted" jdbcType="TINYINT"/>
        <result property="content" column="content" jdbcType="VARCHAR"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
            select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" 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" />
    </resultMap>
    <sql id="Base_Column_List">
        id,pro_id,batch_id,
        process_id,name,number,
        status,creator,
        dt,start_date,end_date,
        deleted,content
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_assembly_plan
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_assembly_plan
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <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
        ,process_id,name,number
        ,status,creator
        ,dt,start_date,end_date
        ,deleted,content)
        values (#{id,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}
        ,#{deleted,jdbcType=TINYINT},#{content,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan" useGeneratedKeys="true">
        insert into pr_assembly_plan
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">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="number != null">number,</if>
                <if test="status != null">status,</if>
                <if test="creator != null">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="startDate != null">start_date,</if>
                <if test="endDate != null">end_date,</if>
                <if test="deleted != null">deleted,</if>
                <if test="content != null">content,</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="processId != null">#{processId,jdbcType=BIGINT},</if>
                <if test="name != null">#{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="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="startDate != null">#{startDate,jdbcType=VARCHAR},</if>
                <if test="endDate != null">#{endDate,jdbcType=VARCHAR},</if>
                <if test="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="content != null">#{content,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        update pr_assembly_plan
        <set>
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT},
            </if>
            <if test="batchId != null">
                batch_id = #{batchId,jdbcType=BIGINT},
            </if>
            <if test="processId != null">
                process_id = #{processId,jdbcType=BIGINT},
            </if>
            <if test="name != null">
                name = #{name,jdbcType=VARCHAR},
            </if>
            <if test="number != null">
                number = #{number,jdbcType=INTEGER},
            </if>
            <if test="status != null">
                status = #{status,jdbcType=TINYINT},
            </if>
            <if test="creator != null">
                creator = #{creator,jdbcType=VARCHAR},
            </if>
            <if test="dt != null">
                dt = #{dt,jdbcType=TIMESTAMP},
            </if>
            <if test="startDate != null">
                start_date = #{startDate,jdbcType=VARCHAR},
            </if>
            <if test="endDate != null">
                end_date = #{endDate,jdbcType=VARCHAR},
            </if>
            <if test="deleted != null">
                deleted = #{deleted,jdbcType=TINYINT},
            </if>
            <if test="content != null">
                content = #{content,jdbcType=VARCHAR},
            </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrAssemblyPlan">
        update pr_assembly_plan
        set
            pro_id =  #{proId,jdbcType=BIGINT},
            batch_id =  #{batchId,jdbcType=BIGINT},
            process_id =  #{processId,jdbcType=BIGINT},
            name =  #{name,jdbcType=VARCHAR},
            number =  #{number,jdbcType=INTEGER},
            status =  #{status,jdbcType=TINYINT},
            creator =  #{creator,jdbcType=VARCHAR},
            dt =  #{dt,jdbcType=TIMESTAMP},
            start_date =  #{startDate,jdbcType=VARCHAR},
            end_date =  #{endDate,jdbcType=VARCHAR},
            deleted =  #{deleted,jdbcType=TINYINT},
            content =  #{content,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_assembly_plan
        <trim prefix="where" suffixOverrides="and">
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <if test="startDate != null and startDate != '' ">
                start_date = #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null and endDate != ''">
                end_date = #{endDate,jdbcType=VARCHAR} 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_assembly_plan
        <trim prefix="where" suffixOverrides="and">
            <if test="proId != null">
                pro_id = #{proId,jdbcType=BIGINT} and
            </if>
            <if test="startDate != null and startDate != '' ">
                start_date = #{startDate,jdbcType=VARCHAR} and
            </if>
            <if test="endDate != null and endDate != ''">
                end_date = #{endDate,jdbcType=VARCHAR} and
            </if>
        </trim>
    </select>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_assembly_plan set deleted = 1
        where id = #{id}
    </update>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrBatchNumberMapper.xml
New file
@@ -0,0 +1,156 @@
<?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.PrBatchNumberMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrBatchNumber">
        <id property="id" column="id" jdbcType="BIGINT"/>
        <result property="batchNumber" column="batch_number" jdbcType="VARCHAR"/>
        <result property="proId" column="pro_id" jdbcType="BIGINT"/>
        <result property="creator" column="creator" jdbcType="VARCHAR"/>
        <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,batch_number,pro_id,
        creator,dt,remark
    </sql>
    <select id="selectBatchNoById" parameterType="java.lang.Long" resultType="java.lang.String">
        select batch_number
        from pr_batch_number
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_batch_number
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_batch_number
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrBatchNumber" useGeneratedKeys="true">
        insert into pr_batch_number
        ( id,batch_number,pro_id
        ,creator,dt,remark
        )
        values (#{id,jdbcType=BIGINT},#{batchNumber,jdbcType=INTEGER},#{proId,jdbcType=BIGINT}
        ,#{creator,jdbcType=VARCHAR},#{dt,jdbcType=TIMESTAMP},#{remark,jdbcType=VARCHAR}
        )
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrBatchNumber" useGeneratedKeys="true">
        insert into pr_batch_number
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="batchNumber != null">batch_number,</if>
                <if test="proId != null">pro_id,</if>
                <if test="creator != null">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="remark != null">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="proId != null">#{proId,jdbcType=BIGINT},</if>
                <if test="creator != null">#{creator,jdbcType=VARCHAR},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrBatchNumber">
        update pr_batch_number
        <set>
                <if test="batchNumber != null">
                    batch_number = #{batchNumber,jdbcType=INTEGER},
                </if>
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="creator != null">
                    creator = #{creator,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="remark != null">
                    remark = #{remark,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrBatchNumber">
        update pr_batch_number
        set
            batch_number =  #{batchNumber,jdbcType=INTEGER},
            pro_id =  #{proId,jdbcType=BIGINT},
            creator =  #{creator,jdbcType=VARCHAR},
            dt =  #{dt,jdbcType=TIMESTAMP},
            remark =  #{remark,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_batch_number
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <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">
                    creator = #{creator,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="remark != null">
                    remark = #{remark,jdbcType=VARCHAR} 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_batch_number
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <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">
                    creator = #{creator,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="remark != null">
                    remark = #{remark,jdbcType=VARCHAR} and
                </if>
        </trim>
    </select>
    <select id="selectMaxCode" resultType="java.lang.String">
        -- 查询以特定代码开头的最大批次号
        select max(batch_number) from pr_batch_number where batch_number REGEXP CONCAT('^(', #{currentDayStr}, ')')
    </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrDevOpsPlanMapper.xml
New file
@@ -0,0 +1,209 @@
<?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.PrDevOpsPlanMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrDevOpsPlan">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="name" column="name" jdbcType="VARCHAR"/>
            <result property="num" column="num" jdbcType="INTEGER"/>
            <result property="status" column="status" jdbcType="TINYINT"/>
            <result property="creator" column="creator" jdbcType="VARCHAR"/>
            <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
            <result property="startDate" column="start_date" jdbcType="VARCHAR"/>
            <result property="endDate" column="end_date" jdbcType="VARCHAR"/>
            <result property="deleted" column="deleted" jdbcType="TINYINT"/>
            <result property="content" column="content" jdbcType="VARCHAR"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,name,num,
        status,creator,dt,
        start_date,end_date,deleted,
        content
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_dev_ops_plan
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_dev_ops_plan
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsPlan" useGeneratedKeys="true">
        insert into pr_dev_ops_plan
        ( id,name,num
        ,status,creator,dt
        ,start_date,end_date,deleted
        ,content)
        values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{num,jdbcType=INTEGER}
        ,#{status,jdbcType=TINYINT},#{creator,jdbcType=VARCHAR},#{dt,jdbcType=TIMESTAMP}
        ,#{startDate,jdbcType=VARCHAR},#{endDate,jdbcType=VARCHAR},#{deleted,jdbcType=TINYINT}
        ,#{content,jdbcType=VARCHAR})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsPlan" useGeneratedKeys="true">
        insert into pr_dev_ops_plan
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="name != null">name,</if>
                <if test="num != null">num,</if>
                <if test="status != null">status,</if>
                <if test="creator != null">creator,</if>
                <if test="dt != null">dt,</if>
                <if test="startDate != null">start_date,</if>
                <if test="endDate != null">end_date,</if>
                <if test="deleted != null">deleted,</if>
                <if test="content != null">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="num != null">#{num,jdbcType=INTEGER},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
                <if test="creator != null">#{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="deleted != null">#{deleted,jdbcType=TINYINT},</if>
                <if test="content != null">#{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">
                    name = #{name,jdbcType=VARCHAR},
                </if>
                <if test="num != null">
                    num = #{num,jdbcType=INTEGER},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
                <if test="creator != null">
                    creator = #{creator,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="startDate != null">
                    start_date = #{startDate,jdbcType=VARCHAR},
                </if>
                <if test="endDate != null">
                    end_date = #{endDate,jdbcType=VARCHAR},
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT},
                </if>
                <if test="content != null">
                    content = #{content,jdbcType=VARCHAR},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsPlan">
        update pr_dev_ops_plan
        set
            name =  #{name,jdbcType=VARCHAR},
            num =  #{num,jdbcType=INTEGER},
            status =  #{status,jdbcType=TINYINT},
            creator =  #{creator,jdbcType=VARCHAR},
            dt =  #{dt,jdbcType=TIMESTAMP},
            start_date =  #{startDate,jdbcType=VARCHAR},
            end_date =  #{endDate,jdbcType=VARCHAR},
            deleted =  #{deleted,jdbcType=TINYINT},
            content =  #{content,jdbcType=VARCHAR}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_dev_ops_plan
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="name != null">
                    name = #{name,jdbcType=VARCHAR} and
                </if>
                <if test="num != null">
                    num = #{num,jdbcType=INTEGER} and
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
                <if test="creator != null">
                    creator = #{creator,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="startDate != null">
                    start_date = #{startDate,jdbcType=VARCHAR} and
                </if>
                <if test="endDate != null">
                    end_date = #{endDate,jdbcType=VARCHAR} and
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT} and
                </if>
                <if test="content != null">
                    content = #{content,jdbcType=VARCHAR} 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_dev_ops_plan
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="name != null">
                    name = #{name,jdbcType=VARCHAR} and
                </if>
                <if test="num != null">
                    num = #{num,jdbcType=INTEGER} and
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
                <if test="creator != null">
                    creator = #{creator,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="startDate != null">
                    start_date = #{startDate,jdbcType=VARCHAR} and
                </if>
                <if test="endDate != null">
                    end_date = #{endDate,jdbcType=VARCHAR} and
                </if>
                <if test="deleted != null">
                    deleted = #{deleted,jdbcType=TINYINT} and
                </if>
                <if test="content != null">
                    content = #{content,jdbcType=VARCHAR} and
                </if>
        </trim>
    </select>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_dev_ops_plan set deleted = 1
        where id = #{id}
    </update>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrDevOpsTaskClaimInfoMapper.xml
New file
@@ -0,0 +1,138 @@
<?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.PrDevOpsTaskClaimInfoMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="userId" column="user_id" jdbcType="BIGINT"/>
            <result property="planId" column="plan_id" jdbcType="BIGINT"/>
            <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
            <result property="status" column="status" jdbcType="TINYINT"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,user_id,plan_id,
        dt,status
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_dev_ops_task_claim_info
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_dev_ops_task_claim_info
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo" useGeneratedKeys="true">
        insert into pr_dev_ops_task_claim_info
        ( id,user_id,plan_id
        ,dt,status)
        values (#{id,jdbcType=BIGINT},#{userId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT}
        ,#{dt,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo" useGeneratedKeys="true">
        insert into pr_dev_ops_task_claim_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="userId != null">user_id,</if>
                <if test="planId != null">plan_id,</if>
                <if test="dt != null">dt,</if>
                <if test="status != null">status,</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="planId != null">#{planId,jdbcType=BIGINT},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo">
        update pr_dev_ops_task_claim_info
        <set>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT},
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrDevOpsTaskClaimInfo">
        update pr_dev_ops_task_claim_info
        set
            user_id =  #{userId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            dt =  #{dt,jdbcType=TIMESTAMP},
            status =  #{status,jdbcType=TINYINT}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_dev_ops_task_claim_info
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT} and
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} 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_dev_ops_task_claim_info
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT} and
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
        </trim>
    </select>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_dev_ops_task_claim_info set deleted = 1
        where id = #{id}
    </update>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrEquipLifeCycleMapper.xml
New file
@@ -0,0 +1,125 @@
<?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.PrEquipLifeCycleMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="equipId" column="equip_id" jdbcType="BIGINT"/>
            <result property="equipCycleContent" column="equip_cycle_content" jdbcType="VARCHAR"/>
            <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,equip_id,equip_cycle_content,
        dt
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_equip_life_cycle
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_equip_life_cycle
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle" useGeneratedKeys="true">
        insert into pr_equip_life_cycle
        ( id,equip_id,equip_cycle_content
        ,dt)
        values (#{id,jdbcType=BIGINT},#{equipId,jdbcType=BIGINT},#{equipCycleContent,jdbcType=VARCHAR}
        ,#{dt,jdbcType=TIMESTAMP})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle" useGeneratedKeys="true">
        insert into pr_equip_life_cycle
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="equipId != null">equip_id,</if>
                <if test="equipCycleContent != null">equip_cycle_content,</if>
                <if test="dt != null">dt,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                <if test="id != null">#{id,jdbcType=BIGINT},</if>
                <if test="equipId != null">#{equipId,jdbcType=BIGINT},</if>
                <if test="equipCycleContent != null">#{equipCycleContent,jdbcType=VARCHAR},</if>
                <if test="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle">
        update pr_equip_life_cycle
        <set>
                <if test="equipId != null">
                    equip_id = #{equipId,jdbcType=BIGINT},
                </if>
                <if test="equipCycleContent != null">
                    equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrEquipLifeCycle">
        update pr_equip_life_cycle
        set
            equip_id =  #{equipId,jdbcType=BIGINT},
            equip_cycle_content =  #{equipCycleContent,jdbcType=VARCHAR},
            dt =  #{dt,jdbcType=TIMESTAMP}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_equip_life_cycle
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="equipId != null">
                    equip_id = #{equipId,jdbcType=BIGINT} and
                </if>
                <if test="equipCycleContent != null">
                    equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} 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_equip_life_cycle
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="equipId != null">
                    equip_id = #{equipId,jdbcType=BIGINT} and
                </if>
                <if test="equipCycleContent != null">
                    equip_cycle_content = #{equipCycleContent,jdbcType=VARCHAR} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
        </trim>
    </select>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_equip_life_cycle set deleted = 1
        where id = #{id}
    </update>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrEquipMapper.xml
New file
@@ -0,0 +1,156 @@
<?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.PrEquipMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrEquip">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="proId" column="pro_id" jdbcType="BIGINT"/>
            <result property="batchId" column="batch_id" jdbcType="BIGINT"/>
            <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/>
            <result property="status" column="status" jdbcType="TINYINT"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,pro_id,batch_id,
        equip_no,status
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_equip
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_equip
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <delete id="deleteByBatchId">
        delete from pr_equip
        where  batch_id = #{batchId,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrEquip" useGeneratedKeys="true">
        insert into pr_equip
        ( id,pro_id,batch_id
        ,equip_no,status)
        values (#{id,jdbcType=BIGINT},#{proId,jdbcType=BIGINT},#{batchId,jdbcType=BIGINT}
        ,#{equipNo,jdbcType=BIGINT},#{status,jdbcType=TINYINT})
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrEquip" useGeneratedKeys="true">
        insert into pr_equip
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="proId != null">pro_id,</if>
                <if test="batchId != null">batch_id,</if>
                <if test="equipNo != null">equip_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="equipNo != null">#{equipNo,jdbcType=BIGINT},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
        </trim>
    </insert>
    <insert id="insertBatch" parameterType="java.util.List">
        insert into pr_equip
        ( id,pro_id,batch_id,equip_no,status) values
        <foreach collection="list" item="item" separator=",">
            (
             #{item.id,jdbcType=BIGINT},
             #{item.proId,jdbcType=BIGINT},
             #{item.batchId,jdbcType=BIGINT},
             #{item.equipNo,jdbcType=BIGINT},
             #{item.status,jdbcType=TINYINT}
            )
        </foreach>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrEquip">
        update pr_equip
        <set>
                <if test="proId != null">
                    pro_id = #{proId,jdbcType=BIGINT},
                </if>
                <if test="batchId != null">
                    batch_id = #{batchId,jdbcType=BIGINT},
                </if>
                <if test="equipNo != null">
                    equip_no = #{equipNo,jdbcType=BIGINT},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrEquip">
        update pr_equip
        set
            pro_id =  #{proId,jdbcType=BIGINT},
            batch_id =  #{batchId,jdbcType=BIGINT},
            equip_no =  #{equipNo,jdbcType=BIGINT},
            status =  #{status,jdbcType=TINYINT}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_equip
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,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="equipNo != null">
                    equip_no = #{equipNo,jdbcType=BIGINT} 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_equip
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,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="equipNo != null">
                    equip_no = #{equipNo,jdbcType=BIGINT} and
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
        </trim>
    </select>
    <select id="selectByBatchId" resultType="com.dy.pmsGlobal.pojoPr.PrEquip">
        select
        <include refid="Base_Column_List" />
        from pr_equip
        where batch_id = #{batchId,jdbcType=BIGINT}
    </select>
</mapper>
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml
@@ -16,7 +16,7 @@
        <result property="deleted" column="deleted" jdbcType="TINYINT"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <association property="instruction"
            column="id" javaType="java.lang.Long" select="selectProNameById" fetchType="eager" />
            column="id" javaType="java.lang.Long" select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
@@ -26,11 +26,11 @@
        remark
    </sql>
    <select id="selectProNameById" resultMap="com.dy.pmsGlobal.daoPr.PrWorkingInstructionMapper.BaseResultMap">
        select *
        from pr_working_instruction
        where node_id = #{id,jdbcType=BIGINT}
    </select>
<!--    <select id="selectProNameById" resultMap="com.dy.pmsGlobal.daoPr.PrWorkingInstructionMapper.BaseResultMap">-->
<!--        select *-->
<!--        from pr_working_instruction-->
<!--        where node_id = #{id,jdbcType=BIGINT}-->
<!--    </select>-->
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml
@@ -14,9 +14,9 @@
        <result property="deleted" column="deleted" jdbcType="TINYINT"/>
        <result property="remark" column="remark" jdbcType="VARCHAR"/>
        <association property="proName" column="pro_id" javaType="java.lang.Long"
                     select="selectProNameById" fetchType="eager" />
                     select="com.dy.pmsGlobal.daoPlt.PltProductMapper.selectProNameById" fetchType="eager" />
        <association property="creatorName" column="creator" javaType="java.lang.Long"
                     select="selectNameByUserId" fetchType="eager" />
                     select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNameByUserId" fetchType="eager" />
        <collection property="nodes" ofType="com.dy.pmsGlobal.pojoPr.PrProductionNode"
                      select="selectByProcess" fetchType="eager" column="id" />
    </resultMap>
@@ -27,12 +27,8 @@
        deleted,remark
    </sql>
    <select id="selectProNameById" parameterType="java.lang.Long" resultType="java.lang.String">
        select name proName from plt_product where id=#{creator}
    </select>
    <select id="selectNameByUserId" parameterType="java.lang.Long" resultType="java.lang.String">
        select name from ba_user where id=#{id}
    </select>
    <select id="selectByProcess" resultMap="com.dy.pmsGlobal.daoPr.PrProductionNodeMapper.BaseResultMap">
        select *
        from pr_production_node
pms-parent/pms-global/src/main/resources/mapper/PrProductionTaskClaimInfoMapper.xml
New file
@@ -0,0 +1,195 @@
<?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.PrProductionTaskClaimInfoMapper">
    <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo">
            <id property="id" column="id" jdbcType="BIGINT"/>
            <result property="userId" column="user_id" jdbcType="BIGINT"/>
            <result property="lineId" column="line_id" jdbcType="BIGINT"/>
            <result property="stationId" column="station_id" jdbcType="BIGINT"/>
            <result property="planId" column="plan_id" jdbcType="BIGINT"/>
            <result property="processId" column="process_id" jdbcType="BIGINT"/>
            <result property="nodeId" column="node_id" jdbcType="BIGINT"/>
            <result property="dt" column="dt" jdbcType="TIMESTAMP"/>
            <result property="status" column="status" jdbcType="TINYINT"/>
    </resultMap>
    <sql id="Base_Column_List">
        id,user_id,line_id,
        station_id,plan_id,process_id,
        node_id,dt,status
    </sql>
    <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_production_task_claim_info
        where  id = #{id,jdbcType=BIGINT}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_production_task_claim_info
        where  id = #{id,jdbcType=BIGINT}
    </delete>
    <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo" useGeneratedKeys="true">
        insert into pr_production_task_claim_info
        ( id,user_id,line_id
        ,station_id,plan_id,process_id
        ,node_id,dt,status
        )
        values (#{id,jdbcType=BIGINT},#{userId,jdbcType=BIGINT},#{lineId,jdbcType=BIGINT}
        ,#{stationId,jdbcType=BIGINT},#{planId,jdbcType=BIGINT},#{processId,jdbcType=BIGINT}
        ,#{nodeId,jdbcType=BIGINT},#{dt,jdbcType=TIMESTAMP},#{status,jdbcType=TINYINT}
        )
    </insert>
    <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo" useGeneratedKeys="true">
        insert into pr_production_task_claim_info
        <trim prefix="(" suffix=")" suffixOverrides=",">
                <if test="id != null">id,</if>
                <if test="userId != null">user_id,</if>
                <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="dt != null">dt,</if>
                <if test="status != null">status,</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="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="dt != null">#{dt,jdbcType=TIMESTAMP},</if>
                <if test="status != null">#{status,jdbcType=TINYINT},</if>
        </trim>
    </insert>
    <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo">
        update pr_production_task_claim_info
        <set>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT},
                </if>
                <if test="lineId != null">
                    line_id = #{lineId,jdbcType=BIGINT},
                </if>
                <if test="stationId != null">
                    station_id = #{stationId,jdbcType=BIGINT},
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT},
                </if>
                <if test="processId != null">
                    process_id = #{processId,jdbcType=BIGINT},
                </if>
                <if test="nodeId != null">
                    node_id = #{nodeId,jdbcType=BIGINT},
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP},
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT},
                </if>
        </set>
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoPr.PrProductionTaskClaimInfo">
        update pr_production_task_claim_info
        set
            user_id =  #{userId,jdbcType=BIGINT},
            line_id =  #{lineId,jdbcType=BIGINT},
            station_id =  #{stationId,jdbcType=BIGINT},
            plan_id =  #{planId,jdbcType=BIGINT},
            process_id =  #{processId,jdbcType=BIGINT},
            node_id =  #{nodeId,jdbcType=BIGINT},
            dt =  #{dt,jdbcType=TIMESTAMP},
            status =  #{status,jdbcType=TINYINT}
        where   id = #{id,jdbcType=BIGINT}
    </update>
    <select id="selectSome" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from pr_production_task_claim_info
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT} and
                </if>
                <if test="lineId != null">
                    line_id = #{lineId,jdbcType=BIGINT} and
                </if>
                <if test="stationId != null">
                    station_id = #{stationId,jdbcType=BIGINT} and
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT} and
                </if>
                <if test="processId != null">
                    process_id = #{processId,jdbcType=BIGINT} and
                </if>
                <if test="nodeId != null">
                    node_id = #{nodeId,jdbcType=BIGINT} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} 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_production_task_claim_info
        <trim prefix="where" suffixOverrides="and">
                <if test="id != null">
                    id = #{id,jdbcType=BIGINT} and
                </if>
                <if test="userId != null">
                    user_id = #{userId,jdbcType=BIGINT} and
                </if>
                <if test="lineId != null">
                    line_id = #{lineId,jdbcType=BIGINT} and
                </if>
                <if test="stationId != null">
                    station_id = #{stationId,jdbcType=BIGINT} and
                </if>
                <if test="planId != null">
                    plan_id = #{planId,jdbcType=BIGINT} and
                </if>
                <if test="processId != null">
                    process_id = #{processId,jdbcType=BIGINT} and
                </if>
                <if test="nodeId != null">
                    node_id = #{nodeId,jdbcType=BIGINT} and
                </if>
                <if test="dt != null">
                    dt = #{dt,jdbcType=TIMESTAMP} and
                </if>
                <if test="status != null">
                    status = #{status,jdbcType=TINYINT} and
                </if>
        </trim>
    </select>
    <update id="deleteLogicById" parameterType="java.lang.Long">
        update pr_production_task_claim_info set deleted = 1
        where id = #{id}
    </update>
</mapper>
pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/station/StationSv.java
@@ -80,14 +80,7 @@
        //查询符合条件的记录
        rsVo.obj = this.dao.selectSome(params) ;
        rsVo.obj.parallelStream().forEach(item->{
            try {
                byte[] codes = QrCodeUtil.genQrCode(stationPrefix+item.id);
                item.qrCode = "data:image/jpeg;base64," + Base64.encode(codes);
            } catch (IOException e) {
                e.printStackTrace();
            } catch (WriterException e) {
                e.printStackTrace();
            }
            item.qrCode = QrCodeUtil.genQrCodeString(stationPrefix+item.id);
        });
        return rsVo ;
    }
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblyPlanCtrl.java
New file
@@ -0,0 +1,187 @@
package com.dy.pmsProduct.taskPlan;
import com.alibaba.excel.converters.Converter;
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.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrEquip;
import com.dy.pmsGlobal.util.QrCodeUtil;
import com.google.zxing.WriterException;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.Valid;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
/**
 * 组装任务计划
 */
@Slf4j
@RestController
@RequestMapping(path="assembly")
public class AssemblyPlanCtrl {
    private static final String fileName = "设备号信息" ;
    private static final String sheetName = "设备号信息" ;
    private AssemblySv sv;
    @Autowired
    public void setAssemblySv(AssemblySv assemblySv) {
        this.sv = assemblySv;
    }
    @PostMapping(path="save")
    @SsoPowerAop(power = "-1")
    @Log("保存组装任务计划")
    public BaseResponse<Boolean> save(@RequestBody @Valid PrAssemblyPlan plan, BindingResult bindingResult){
        if (bindingResult != null && bindingResult.hasErrors()) {
            return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
        }
        int count;
        try {
            count = sv.save(plan);
        }catch (Exception e){
            log.error("保存组装任务计划异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * 更新
     * @param plan
     * @param bindingResult
     * @return
     */
    @PostMapping(path="update")
    @SsoPowerAop(power = "-1")
    @Log("更新组装任务计划")
    public BaseResponse<Boolean> update(@RequestBody @Valid PrAssemblyPlan plan, BindingResult bindingResult){
        int count;
        try {
            if (bindingResult != null && bindingResult.hasErrors()) {
                return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
            }
            count = sv.update(plan);
        }catch (Exception e){
            log.error("更新组装任务计划异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
        if (count <= 0) {
            return BaseResponseUtils.buildFail("数据库存储失败");
        } else {
            return BaseResponseUtils.buildSuccess(true);
        }
    }
    /**
     * 根据ID查询
     * @return
     */
    @GetMapping(path="one")
    @SsoPowerAop(power = "-1")
    @Log("根据ID查询组装任务计划")
    public BaseResponse<PrAssemblyPlan> one(Long id){
        try{
            PrAssemblyPlan plan=sv.selectById(id);
            return BaseResponseUtils.buildSuccess(plan);
        }catch (Exception e){
            log.error("根据ID查询组装任务计划异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 分页查询
     * @param vo
     * @return
     */
    @PostMapping(path="some")
    @SsoPowerAop(power = "-1")
    @Log("分页查询组装任务计划")
    public BaseResponse<QueryResultVo<List<PrAssemblyPlan>>> some(@RequestBody QueryVo vo){
        try {
            QueryResultVo<List<PrAssemblyPlan>> list = sv.selectSome(vo) ;
            return BaseResponseUtils.buildSuccess(list);
        }catch (Exception e){
            log.error("分页查询组装任务计划异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 增加设备号
     */
    @PostMapping(path="addEquip")
    @SsoPowerAop(power = "-1")
    @Log("增加设备号")
    public BaseResponse<Boolean> addEquip(@RequestBody QueryVo vo){
        if(vo.addNum == null || vo.addNum <= 0 || vo.planId == null){
            return BaseResponseUtils.buildFail("参数错误");
        }
        try {
            int count = sv.addEquip(vo.planId,vo.addNum);
            if (count <= 0) {
                return BaseResponseUtils.buildFail("数据库存储失败");
            } else {
                return BaseResponseUtils.buildSuccess(true);
            }
        }catch (Exception e){
            log.error("增加设备号异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    @PostMapping(path="someEquip")
    @SsoPowerAop(power = "-1")
    @Log("查询设备号")
    public BaseResponse<QueryResultVo<List<PrEquip>>> someEquip(@RequestBody QueryVo queryVo){
        try {
            QueryResultVo<List<PrEquip>> list = sv.selectSomeEquip(queryVo) ;
            return BaseResponseUtils.buildSuccess(list);
        }catch (Exception e){
            log.error("分页查询组装任务计划异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    @GetMapping(path="exportEquip")
    @SsoPowerAop(power = "-1")
    @Log("导出设备号")
    public void exportEquip(Long batchId, HttpServletResponse response){
        Date start = new Date() ;
        try{
            List<Converter> list = new ArrayList<>();
            List<PrEquip> equipList = sv.selectEquipByBatchId(batchId) ;
            // 使用并行流提高性能
            equipList.parallelStream().forEach(equip -> {
                ExcelVo vo = new ExcelVo();
                vo.equipNo = equip.equipNo;
                try {
                    vo.qrCode = QrCodeUtil.genQrCode(vo.equipNo);
                } catch (IOException | WriterException e) {
                    e.printStackTrace();
                }
                list.add(vo);
            });
            log.info("导出设备号耗时:"+(new Date().getTime()-start.getTime())+"ms");
            QrCodeUtil.downloadExcel(response, fileName,sheetName,list);
            log.info("导出设备号耗时:"+(new Date().getTime()-start.getTime())+"ms");
        }catch (Exception e){
            log.error("导出设备号异常", e);
        }
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/AssemblySv.java
New file
@@ -0,0 +1,227 @@
package com.dy.pmsProduct.taskPlan;
import cn.hutool.core.date.DateUtil;
import com.alibaba.excel.util.StringUtils;
import com.dy.common.webFilter.UserTokenContext;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.daoPlt.PltProductMapper;
import com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper;
import com.dy.pmsGlobal.daoPr.PrBatchNumberMapper;
import com.dy.pmsGlobal.daoPr.PrEquipMapper;
import com.dy.pmsGlobal.pojoBa.BaUser;
import com.dy.pmsGlobal.pojoPlt.PltProduct;
import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan;
import com.dy.pmsGlobal.pojoPr.PrBatchNumber;
import com.dy.pmsGlobal.pojoPr.PrEquip;
import com.dy.pmsGlobal.util.QrCodeUtil;
import com.dy.pmsGlobal.util.UserUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
public class AssemblySv {
    private static final int BATCH_SIZE = 100; // 批量处理大小
    private static final String CODE_FORMAT = "%03d";
    private static final String CODE_FORMAT_7 = "%07d";
    private static final String TYPE_CODE_EQUIP = "110";
    private PrAssemblyPlanMapper assemblyDao;
    private UserUtil userUtil;
    private PrBatchNumberMapper batchDao;
    private PrEquipMapper equipDao;
    private PltProductMapper productDao;
    private SqlSessionFactory sqlSessionFactory;
    @Autowired
    public void setAssemblyDao(PrAssemblyPlanMapper assemblyDao) {
        this.assemblyDao = assemblyDao;
    }
    @Autowired
    public void setBatchDao(PrBatchNumberMapper batchDao) {
        this.batchDao = batchDao;
    }
    @Autowired
    public void setUserUtil(UserUtil userUtil){
        this.userUtil = userUtil;
    }
    @Autowired
    public void setEquipDao(PrEquipMapper equipDao) {
        this.equipDao = equipDao;
    }
    @Autowired
    public void setProductDao(PltProductMapper productDao) {
        this.productDao = productDao;
    }
    @Autowired
    public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) {
        this.sqlSessionFactory = sqlSessionFactory;
    }
    @Transactional
    public int save(PrAssemblyPlan plan){
        PrBatchNumber batch = new PrBatchNumber();
        batch.batchNumber = getNextCode();
        batch.proId = plan.proId;
        batch.remark = plan.content;
        BaUser loginUser = userUtil.getUser(UserTokenContext.get());
        if(loginUser!=null){
            batch.creator = loginUser.id;
            plan.creator = loginUser.id;
        }
        batchDao.insertSelective(batch);
        insertEquip(plan.proId,batch.id,batch.batchNumber,plan.number,1);
        plan.batchId = batch.id;
        plan.status =PlanStatusEnum.NORMAL.getCode();
        plan.deleted = false;
        return assemblyDao.insertSelective(plan);
    }
    public int update(PrAssemblyPlan plan){
        PrAssemblyPlan origPlan = assemblyDao.selectByPrimaryKey(plan.id);
        PrBatchNumber batch = batchDao.selectByPrimaryKey(origPlan.batchId);
        //产品改变则更新全部已生成设备号
        if(origPlan.proId != plan.proId){
            equipDao.deleteByBatchId(origPlan.batchId);
            insertEquip(plan.proId,origPlan.batchId,batch.batchNumber,plan.number,1);
        }else if(origPlan.number < plan.number){
            //数量增加则新增设备号
            insertEquip(plan.proId,origPlan.batchId,batch.batchNumber,plan.number,origPlan.number+1);
        }
        return assemblyDao.updateByPrimaryKeySelective(plan);
    }
    public int addEquip(Long planId,int num){
        PrAssemblyPlan plan = assemblyDao.selectByPrimaryKey(planId);
        PrBatchNumber batch = batchDao.selectByPrimaryKey(plan.batchId);
        int count =insertEquip(plan.proId,plan.batchId,batch.batchNumber,num + plan.number,plan.number+1);
        plan.number = plan.number + num;
        assemblyDao.updateByPrimaryKeySelective(plan);
        return count;
    }
    /**
     * 批量插入  设备数据
     * @param proId 产品id
     * @param batchId 批次id
     * @param batchCode 批次号
     * @param number 数量
     * @return 插入数量
     */
    private int insertEquip(Long proId,Long batchId,String batchCode,Integer number,int startIndex){
        log.info("批量插入设备");
        PltProduct product = productDao.selectByPrimaryKey(proId);
        List<PrEquip> list = new java.util.ArrayList<>();
        for(int i= startIndex ;i<= number;i++){
            PrEquip equip = new PrEquip();
            equip.proId = proId;
            equip.batchId = batchId;
            equip.equipNo = getEquipNo(product.code,batchCode,i);
            equip.status = 0;
            list.add(equip);
        }
        return insertBatchEquip(list);
    }
    public int insertBatchEquip(List<PrEquip> list) {
        int count = 0;
        for (int i = 0; i < list.size(); i += BATCH_SIZE) {
            List<PrEquip> subList = list.subList(i, Math.min(i + BATCH_SIZE, list.size()));
            // 调用MyBatis插入这批数据
            count += equipDao.insertBatch(subList);
        }
        return count;
    }
    public String getNextCode(){
        log.info("获取批次编号");
        String currentDay = getCurrentDay();
        String maxCode = batchDao.selectMaxCode(currentDay);
        if (StringUtils.isBlank(maxCode)) {
            return currentDay + String.format(CODE_FORMAT, 1);
        } else {
            int nextCode = Integer.parseInt(maxCode.replace(currentDay, "")) + 1;
            // 检查溢出
            if (nextCode > 999) {
                throw new RuntimeException("批次编号溢出");
            }
            return currentDay + String.format(CODE_FORMAT, nextCode);
        }
    }
    private static String getEquipNo(String proCode,String batchCode,int index){
        String equipNo = TYPE_CODE_EQUIP + proCode + batchCode +
                String.format(CODE_FORMAT_7, index);
        return equipNo;
    }
    public static void main(String[] args) {
        List<PrEquip> list = new java.util.ArrayList<>();
        for(int i= 1 ;i<= 10000;i++){
            PrEquip equip = new PrEquip();
            equip.proId = 2024052310512000003l;
            equip.batchId = 2024053017154400004l;
            equip.equipNo = getEquipNo("002","2024001",i);
            equip.status = 0;
            list.add(equip);
        }
        list.forEach(equip->{
            System.out.println(equip.equipNo);
        });
    }
    /**
     * 获取当前日期
     * @return yyMMdd
     */
    private String getCurrentDay(){
        return DateUtil.format(new Date(), "yyMMdd");
    }
    public PrAssemblyPlan selectById(Long id){
        return assemblyDao.selectByPrimaryKey(id);
    }
    public QueryResultVo<List<PrAssemblyPlan>> selectSome(QueryVo queryVo){
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        //查询符合条件的记录总数
        Long itemTotal = assemblyDao.selectSomeCount(params);
        QueryResultVo<List<PrAssemblyPlan>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr) ;
        //计算分页等信息
        rsVo.calculateAndSet(itemTotal, params);
        //查询符合条件的记录
        rsVo.obj = assemblyDao.selectSome(params);
        return rsVo ;
    }
    public QueryResultVo<List<PrEquip>> selectSomeEquip(QueryVo queryVo) {
        Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo);
        //查询符合条件的记录总数
        Long itemTotal = assemblyDao.selectSomeCount(params);
        QueryResultVo<List<PrEquip>> rsVo = new QueryResultVo<>(queryVo.pageSize, queryVo.pageCurr) ;
        //计算分页等信息
        rsVo.calculateAndSet(itemTotal, params);
        //查询符合条件的记录
        rsVo.obj = equipDao.selectSome(params);
        rsVo.obj.forEach(equip->{
            equip.qrCode = QrCodeUtil.genQrCodeString(equip.equipNo);
        });
        return rsVo ;
    }
    public List<PrEquip> selectEquipByBatchId(Long batchId) {
        return equipDao.selectByBatchId(batchId);
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/DevOpsPlanCtrl.java
New file
@@ -0,0 +1,14 @@
package com.dy.pmsProduct.taskPlan;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
 * 安装运维任务计划
 */
@Slf4j
@RestController
@RequestMapping(path="devOps")
public class DevOpsPlanCtrl {
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/ExcelVo.java
New file
@@ -0,0 +1,71 @@
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.converters.WriteConverterContext;
import com.alibaba.excel.enums.BooleanEnum;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.enums.poi.BorderStyleEnum;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.data.ImageData;
import com.alibaba.excel.metadata.data.WriteCellData;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
//参考:  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(220) //设置内容高度
@ContentFontStyle(fontName="宋体", fontHeightInPoints = 14)
@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(40)
    @ExcelProperty("设备号")
    public String equipNo ;
    @ColumnWidth(40)   //设置列宽(可以修饰类,也可以修饰具体属性)
    @ExcelProperty(value = "设备二维码", converter = ExcelVo.class)
    public byte[] qrCode ;
    public WriteCellData<?> convertToExcelData(byte[] value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        WriteCellData cellData = new WriteCellData()  ;
        if(value != null && value.length >0){
            List<ImageData> list = new ArrayList<>();
            ImageData imd = new ImageData();
            imd.setImage(value);
            imd.setImageType(ImageData.ImageType.PICTURE_TYPE_PICT);
            imd.setLeft(10);
            imd.setTop(10);
            imd.setRight(10);
            imd.setBottom(10);
            list.add(imd) ;
            cellData.setImageDataList(list);
            cellData.setType(CellDataTypeEnum.EMPTY);
        }else{
            cellData.setStringValue("");
            cellData.setType(CellDataTypeEnum.STRING);
        }
        return cellData;
    }
    public WriteCellData<?> convertToExcelData(WriteConverterContext<byte[]> context) throws Exception {
        return this.convertToExcelData(context.getValue(), context.getContentProperty(), context.getWriteContext().currentWriteHolder().globalConfiguration());
    }
}
pms-parent/pms-web-product/src/main/java/com/dy/pmsProduct/taskPlan/PlanStatusEnum.java
New file
@@ -0,0 +1,20 @@
package com.dy.pmsProduct.taskPlan;
public enum PlanStatusEnum {
    //枚举 ,状态:正常(1)、暂停(0)、结束(-1)
    NORMAL(1,"正常"),
    PAUSE(0,"暂停"),
    END(-1,"结束");
    private int code;
    private String name;
    PlanStatusEnum(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/taskPlan/QueryVo.java
New file
@@ -0,0 +1,19 @@
package com.dy.pmsProduct.taskPlan;
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 startDate;
    public String endDate;
    public Long proId;
//    public Long batchId;
    public Long planId;
    public Integer addNum;
}