Fancy
2024-06-25 bd2de27a5d0dbc8938856ba2cc9fd33a0dd170d7
Station check
8个文件已修改
67 ■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaAssemblyWorkLast.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PltProductionLineMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionNodeMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoSta/StaAssemblyWorkLast.java
@@ -44,6 +44,9 @@
    @NotNull(message="[生产线实体编号]不能为空")
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long lineId;
    @TableField(exist = false)
    public String lineName;
    /**
    * 工站实体编号
    */
@@ -60,18 +63,28 @@
    @NotNull(message="[组装生产任务实体编号]不能为空")
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long planId;
    @TableField(exist = false)
    public String planName;
    /**
    * 生产流程实体编号
    */
    @NotNull(message="[生产流程实体编号]不能为空")
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long processId;
    @TableField(exist = false)
    public String processName;
    /**
    * 生产流程节点实体编号
    */
    @NotNull(message="[生产流程节点实体编号]不能为空")
    @JSONField(serializeUsing= ObjectWriterImplToString.class)
    public Long nodeId;
    @TableField(exist = false)
    public String nodeName;
    /**
    * 任务认领时间
    */
pms-parent/pms-global/src/main/resources/mapper/PltProductionLineMapper.xml
@@ -30,7 +30,9 @@
        from plt_production_line
        where  id = #{id,jdbcType=BIGINT} 
    </select>
    <select id="selectNameByLineId" parameterType="java.lang.Long" resultType="String">
        select name from plt_production_line where id = #{id}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from plt_production_line
        where  id = #{id,jdbcType=BIGINT} 
pms-parent/pms-global/src/main/resources/mapper/PrAssemblyPlanMapper.xml
@@ -51,6 +51,9 @@
            and process_id = #{id}
        </if>
    </select>
    <select id="selectNameByPlanId" parameterType="java.lang.Long" resultType="String">
        select name from pr_assembly_plan 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/PrProductionNodeMapper.xml
@@ -38,7 +38,9 @@
        from pr_production_node
        where  id = #{id,jdbcType=BIGINT} 
    </select>
    <select id="selectNameByNodeId" parameterType="java.lang.Long" resultType="String">
        select content from pr_production_node where id = #{id}
    </select>
    <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
        delete from pr_production_node
        where  id = #{id,jdbcType=BIGINT} 
pms-parent/pms-global/src/main/resources/mapper/PrProductionProcessMapper.xml
@@ -21,7 +21,6 @@
                     select="com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper.processIsQuote" />
        <association property="planNames" column="id" javaType="java.lang.String" fetchType="eager"
                     select="com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper.selectPlanNamesByProcessId"  />
        <collection property="nodes" ofType="com.dy.pmsGlobal.pojoPr.PrProductionNode"
                      select="selectByProcess" fetchType="eager" column="id" />
    </resultMap>
@@ -31,7 +30,6 @@
        creator,dt,disabled,
        deleted,remark
    </sql>
    <select id="selectProcessNameById" resultType="java.lang.String">
        select  name
pms-parent/pms-global/src/main/resources/mapper/StaAssemblyWorkLastMapper.xml
@@ -21,6 +21,14 @@
                     select="com.dy.pmsGlobal.daoBa.BaUserMapper.selectNameByUserId" fetchType="eager" />
            <association property="stationName" column="station_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltStationMapper.selectNameByStationId" fetchType="eager" />
            <association property="planName" column="plan_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPr.PrAssemblyPlanMapper.selectNameByPlanId" fetchType="eager" />
            <association property="processName" column="process_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPr.PrProductionProcessMapper.selectProcessNameById" fetchType="eager" />
            <association property="nodeName" column="node_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPr.PrProductionNodeMapper.selectNameByNodeId" fetchType="eager" />
            <association property="lineName" column="line_id" javaType="java.lang.Long"
                     select="com.dy.pmsGlobal.daoPlt.PltProductionLineMapper.selectNameByLineId" fetchType="eager" />
    </resultMap>
    <sql id="Base_Column_List">
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java
@@ -52,8 +52,8 @@
     * @return
     */
    @GetMapping(path="checkStationUsed")
    public BaseResponse<StaAssemblyWorkLast> checkStationUsed(QueryVo last){
        StaAssemblyWorkLast stationInfo  = sv.checkStationUsed(last);
    public BaseResponse<StaAssemblyWorkLast> checkStationUsed(String id){
        StaAssemblyWorkLast stationInfo  = sv.checkStationUsed(id);
        return BaseResponseUtils.buildSuccess(stationInfo);
    }
    /**
pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderSv.java
@@ -90,8 +90,8 @@
        }
        return userInfo;
    }
    public PltStation getStationInfo(String id){
        //仅检查工站信息以及工站占用情况
        Long stationId = null;
        if(StringUtils.isBlank(id)){
            throw new RuntimeException("工站编码不能为空");
@@ -110,7 +110,30 @@
        }
        return stationInfo;
    }
    public StaAssemblyWorkLast checkStationUsed(QueryVo last){
    public StaAssemblyWorkLast checkStationUsed(String id){
        StaAssemblyWorkLast result = new StaAssemblyWorkLast();
        PltStation stationInfo = null;
        if(StringUtils.isBlank(id)){
            throw new RuntimeException("工站编码不能为空,请检查");
        }
        stationInfo = getStationInfo(id);
        //检查表中stationId是否已经存在
        StaAssemblyWorkLast param = new StaAssemblyWorkLast();
        param.setStationId(stationInfo.getId());
        param.setStatus(1);
        List<StaAssemblyWorkLast> workLasts = assemblyWorkLastDao.selectList(param);
        if(workLasts.size() > 0){
            BeanUtils.copyProperties(workLasts.get(0),result);
        }else{
            result.setStationId(stationInfo.getId());
            result.setStationName(stationInfo.getName());
            result.setLineId(stationInfo.getLineId());
            result.setLineName(stationInfo.getLineName());
        }
        return result;
    }
    public StaAssemblyWorkLast checkUserAndStationUsed(QueryVo last){
        StaAssemblyWorkLast result = new StaAssemblyWorkLast();
        PltStation stationInfo = null;
        BaUser userInfo = null;
@@ -160,7 +183,7 @@
    @Transactional
    public StaAssemblyWorkLast save(QueryVo last) {
        //先check
        StaAssemblyWorkLast checkResult = checkStationUsed(last);
        StaAssemblyWorkLast checkResult = checkUserAndStationUsed(last);
        //校验planId processId nodeId
        PrAssemblyPlan params = new PrAssemblyPlan();
        params.setStatus(1);