deslrey
2 天以前 4f258638d62ccaae0050f1ed6c7231941b66fb50
【物料属性】的回显及查询
已修改8个文件
259 ■■■■ 文件已修改
basic-server/src/main/resources/mapper/StandardTreeMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsReportMapper.xml 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsSampleMapper.xml 166 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -330,6 +330,7 @@
            ${ew.customSqlSegment}
        </if>
    </select>
    <select id="getIfsByOver" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto">
        select * from (<include refid="getIfsOrder"/>
        <where>
@@ -343,6 +344,7 @@
        </if>
        order by send_time desc
    </select>
    <select id="getIfsByOverList" resultType="com.ruoyi.basic.dto.IfsInventoryQuantitySupplierDto">
        select * from (<include refid="getIfsOrder"/>
            <where>
inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java
@@ -1,12 +1,13 @@
package com.ruoyi.inspect.dto;
import com.ruoyi.basic.pojo.IfsInventoryQuantity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class InsOrderPlanDTO implements Serializable {
public class InsOrderPlanDTO extends IfsInventoryQuantity implements Serializable  {
    @ApiModelProperty("检验任务主键id")
    private Long insSampleId;
inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java
@@ -24,6 +24,9 @@
    @ApiModelProperty(value = "下单类别")
    private Integer typeSource;
    @ApiModelProperty(value = "物料属性")
    private String materialProp;
    @ApiModelProperty(value = "检验类别")
    private String orderType;
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java
@@ -32,7 +32,8 @@
                                                @Param("userId") Integer userId,
                                                @Param("sonLaboratory") String sonLaboratory,
                                                @Param("laboratory") String laboratory,
                                                @Param("isCheck") Integer isCheck);
                                                @Param("isCheck") Integer isCheck,
                                                @Param("materialProp") String materialProp);
    IPage<InsOrderPlanTaskSwitchVo> inspectionOrderDetailsTaskSwitching(Page page, @Param("ew") QueryWrapper<InsOrderPlanDTO> ew, @Param("userId") Integer userId, @Param("sonLaboratory") String sonLaboratory, @Param("laboratory") String laboratory);
@@ -48,6 +49,7 @@
    /**
     * 可能没有产品直接就是对象
     *
     * @param sample
     * @return
     */
@@ -55,6 +57,7 @@
    /**
     * 样品
     *
     * @param id
     * @param laboratory
     * @return
@@ -64,6 +67,7 @@
    /**
     * 原材料
     *
     * @param id
     * @param laboratory
     * @param rawMaterialTag
@@ -77,6 +81,7 @@
    /**
     * 电缆配置查看配置标识
     *
     * @param id
     * @param laboratory
     * @return
@@ -85,6 +90,7 @@
    /**
     * 原材料查看配置标识
     *
     * @param id
     * @param laboratory
     * @return
@@ -93,6 +99,7 @@
    /**
     * 查看重复标识
     *
     * @param id
     * @param laboratory
     * @return
@@ -104,6 +111,7 @@
    /**
     * 查询厂家密度(有型号)
     *
     * @param sample
     * @param production
     * @return
@@ -112,6 +120,7 @@
    /**
     * 查询厂家密度(没型号)
     *
     * @param sample
     * @param production
     * @return
@@ -121,6 +130,7 @@
    /**
     * 查询检验项检验结果
     *
     * @param itemIds
     * @return
     */
@@ -128,6 +138,7 @@
    /**
     * 根据订单id查询样品
     *
     * @param insOrderId
     * @return
     */
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -177,13 +177,17 @@
        Integer isCheck = insOrderPlanDTO.getIsCheck();
        insOrderPlanDTO.setIsCheck(null);
        String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//试验室
        // 数据置空,防止反射生成重复数据
        String materialProp = insOrderPlanDTO.getMaterialProp();
        insOrderPlanDTO.setMaterialProp(null);
        IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page,
                QueryWrappers.queryWrappers(insOrderPlanDTO),
                userName,
                userId,
                sonLaboratory,
                laboratory,
                isCheck);
                isCheck,
                materialProp);
        return insOrderPage;
    }
@@ -620,6 +624,7 @@
    /**
     * 查询模板内容
     *
     * @param order
     * @param insProducts
     */
@@ -684,6 +689,7 @@
    /**
     * todo: 原始记录模板清除没有使用的检验项(暂时有bug无法使用)
     *
     * @param sheet
     * @param itemNameList
     */
@@ -756,6 +762,7 @@
    /**
     * 坐标拼接
     *
     * @param r 横坐标
     * @param c 纵坐标
     * @return
@@ -964,6 +971,7 @@
    /**
     * *****添加分析数据******
     *
     * @param productList
     * @param ifsInventoryQuantity
     * @param order
@@ -1054,6 +1062,7 @@
    /**
     * *****计算偏差****
     *
     * @param data
     * @param targetStr
     * @return
@@ -1079,6 +1088,7 @@
    /**
     * *****计算偏差****
     *
     * @param targetStr
     * @return
     */
@@ -1097,6 +1107,7 @@
    /**
     * ******原始记录模板复制*****
     *
     * @param orderId
     * @param ids
     */
@@ -1130,6 +1141,7 @@
    /**
     * 检验任务复核
     *
     * @param orderId
     * @param laboratory
     * @param type
@@ -1259,6 +1271,7 @@
    /**
     * 生成报告
     *
     * @param orderId
     */
    private void generateReport(Integer orderId) {
@@ -1298,6 +1311,7 @@
    /**
     * 电缆配置, 查看配置标识
     *
     * @param id
     * @param laboratory
     * @return
@@ -1309,6 +1323,7 @@
    /**
     * 原材料查看标识
     *
     * @param id
     * @param laboratory
     * @return
@@ -1320,6 +1335,7 @@
    /**
     * 查看重复标识
     *
     * @param id
     * @param laboratory
     * @return
@@ -1331,6 +1347,7 @@
    /**
     * 新增不合格复测内容
     *
     * @return
     */
    @Override
@@ -1527,6 +1544,7 @@
    /**
     * 查询进货原始记录
     *
     * @param insOrderId
     * @return
     */
@@ -1582,6 +1600,7 @@
    /**
     * 保存原材料进货验证
     *
     * @param factoryVerify
     * @return
     */
@@ -1633,6 +1652,7 @@
    /**
     * 设置表格样式
     *
     * @param max 标识最大个数
     * @return
     */
@@ -1677,6 +1697,7 @@
    /**
     * 处理有电缆颜色标识的检测项
     *
     * @param cableTags 电缆颜色标识
     * @param collect   检测项列表
     * @param startIndex 起始下标
@@ -1709,6 +1730,7 @@
    /**
     * 检测项排序
     *
     * @param sourceMap
     * @param targetMap
     */
@@ -1722,6 +1744,7 @@
    /**
     * 小报告生成
     *
     * @param orderId
     * @param insOrder
     * @param insSamples
@@ -1928,6 +1951,7 @@
    /**
     * 处理常规检测项
     *
     * @param item
     * @param finalIndex
     * @param sampleList
@@ -2220,6 +2244,7 @@
    /**
     * 添加小报告表头
     *
     * @param text
     * @param max
     * @param rows
@@ -2402,6 +2427,7 @@
    /**
     * 创建大报告
     *
     * @param orderId
     * @param insOrder
     * @param
@@ -2827,6 +2853,7 @@
    /**
     * 调整高度
     *
     * @param row
     * @param rowHeight
     * @return
@@ -3058,6 +3085,7 @@
    /**
     * 添加报告表头
     *
     * @param sample
     * @param text
     * @param rowRenderData
@@ -3281,6 +3309,7 @@
    /**
     * 添加检测值
     *
     * @param a   当前样品
     * @param text
     * @param rowRenderData
@@ -3969,6 +3998,7 @@
    /**
     * 添加报告结论中英文
     *
     * @param sample
     * @param itemCh
     * @param itemEn
@@ -4028,6 +4058,7 @@
    /**
     * 格式化修改检验项
     *
     * @param sampleProductDto2s
     */
    private void formatProducts(List<SampleProductExportDto> sampleProductDto2s) {
@@ -4097,6 +4128,7 @@
    /**
     * 添加结尾
     *
     * @param text
     * @param rowRenderData
     * @param rows
@@ -4128,6 +4160,7 @@
    /**
     * 判断当前内容是否是科学计数法
     *
     * @param str
     * @return
     */
@@ -4144,6 +4177,7 @@
    /**
     * 修改要求描述的科学计数法
     *
     * @param input
     */
    public static String convertToScientificNotation(String input) {
@@ -4173,6 +4207,7 @@
    /**
     * 展示成科学计数法
     *
     * @param number
     * @return
     */
@@ -4269,6 +4304,7 @@
    /**
     * 根据要求描述保留结果小数点位数
     *
     * @param reference
     * @param value
     * @return
@@ -4337,6 +4373,7 @@
    /**
     * 保留位数, 如果等于0 返回找到的一个非0位数
     *
     * @param number 当前数字
     * @param scale  原本保留的位数
     * @return
@@ -4375,6 +4412,7 @@
    /**
     * *****保存元此阿里进货验证原始记录*****
     *
     * @param insOrderId 订单Id
     * @param examineUserId  复核人Id
     * @param writeUserId  检验员Id
@@ -4530,6 +4568,7 @@
    /**
     * ***格式化进厂验证内容****
     *
     * @param basicType
     * @return
     */
@@ -4559,6 +4598,7 @@
    /**
     * ***word转换pdf***
     *
     * @param path
     * @return
     */
@@ -4607,6 +4647,7 @@
    /**
     * *****修改成品抽样状态******
     *
     * @param insSamples
     * @param order
     */
@@ -4644,6 +4685,7 @@
    /**
     * 添加工时
     *
     * @param userId
     * @param insProduct
     * @param insOrder
inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java
@@ -14,6 +14,9 @@
    @ApiModelProperty("样品名称")
    private String sample;
    @ApiModelProperty("物料属性")
    private String materialProp;
    @ApiModelProperty("零件描述")
    private String partDesc;
inspect-server/src/main/resources/mapper/InsReportMapper.xml
@@ -18,6 +18,7 @@
        io.laboratory,
        io.ifs_inventory_id,
        iiq.is_copper,
        iiq.material_prop,
        ip.son_laboratory,
        iiq.update_batch_no,
        iiq.part_desc,
@@ -32,23 +33,21 @@
        left join ins_product ip on ip.ins_sample_id = is2.id
        where 1=1
        and ir.is_pass = 1
        <if test="createOrderUser != null and createOrderUser != ''">
            and (ir.write_user_id = #{createOrderUser} or ir.examine_user_id = #{createOrderUser} or ir.ratify_user_id = #{createOrderUser})
        <if test="createOrderUser != null">
            and (ir.write_user_id = #{createOrderUser} or ir.examine_user_id = #{createOrderUser} or ir.ratify_user_id =
            #{createOrderUser})
        </if>
        <if test="laboratory!=null and laboratory!=''">
           and  laboratory=#{laboratory}
            and io.laboratory=#{laboratory}
        </if>
        <if test="queryStatus != null and queryStatus != ''">
            <!-- 待提交-->
            <if test='queryStatus == 0'>
            <if test='queryStatus == "0"'>
                and ir.state = 0
            </if>
            <!-- 待审批-->
            <if test='queryStatus == 1'>
            <if test='queryStatus == "1"'>
                and ir.state = 1 and (ir.is_examine != 1 or ir.is_examine is null)
            </if>
            <!-- 待批准-->
            <if test='queryStatus == 2'>
            <if test='queryStatus == "2"'>
                and ir.state = 1 and ir.is_examine = 1 and (ir.is_ratify != 1 or ir.is_ratify is null)
            </if>
        </if>
@@ -59,8 +58,11 @@
        </if>
        ORDER BY a.create_time DESC
    </select>
    <select id="getLaboratoryByName" resultType="java.lang.String">
        select s.address from seal s
        select s.address
        from seal s
        left join laboratory l on s.lab_id = l.id
        where l.laboratory_name = #{name}
        and s.type = #{type}
@@ -114,7 +116,8 @@
        where 1=1
        and ir.is_pass = 1
        <if test="createOrderUser != null and createOrderUser != ''">
            and (ir.write_user_id = #{createOrderUser} or ir.examine_user_id = #{createOrderUser} or ir.ratify_user_id = #{createOrderUser})
            and (ir.write_user_id = #{createOrderUser} or ir.examine_user_id = #{createOrderUser} or ir.ratify_user_id =
            #{createOrderUser})
        </if>
        <if test="queryStatus != null and queryStatus != ''">
            <!-- 待提交-->
inspect-server/src/main/resources/mapper/InsSampleMapper.xml
@@ -162,13 +162,15 @@
               ip.structure_item_parameter_id
    </sql>
    <select id="findInsSampleAndOrder" resultType="com.ruoyi.inspect.vo.InsOrderPlanVO">
        select * from(select * from(
        SELECT * FROM (
        SELECT * FROM (
        SELECT
        a.*,ios.ins_state,ios.verify_tell,verify_user
        FROM
        (
        a.*,
        ios.ins_state,
        ios.verify_tell,
        verify_user
        FROM (
        SELECT
        io.id,
        io.entrust_code,
@@ -176,10 +178,7 @@
        io.appointed,
        io.send_time,
        io.order_type,
        case when
            io.type_source = 0
            then io.sample_view
            else io.sample end sample,
        CASE WHEN io.type_source = 0 THEN io.sample_view ELSE io.sample END AS sample,
        GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model,
        userName,
        checkName,
@@ -188,54 +187,65 @@
        io.laboratory,
        io.type_source,
        io.ifs_inventory_id,
        ira.id ins_report_id,
        ira.id AS ins_report_id,
        ira.url,
        ira.url_s,
        ira.temp_url_pdf,
        iiq.is_copper,
        iiq.is_split_order,
        iiq.update_batch_no,
        iiq.part_desc
        iiq.part_desc,
        iiq.material_prop AS material_prop
        FROM
        ins_order io
        LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id
        LEFT JOIN ins_report ira ON ira.ins_order_id = io.id
        LEFT JOIN ifs_inventory_quantity iiq ON iiq.id = io.ifs_inventory_id
        LEFT JOIN (
        SELECT ins_sample_id,GROUP_CONCAT( DISTINCT uu.name SEPARATOR ',') AS userName
        FROM ins_sample_user u LEFT JOIN  user uu ON u.user_id = uu.id
        SELECT
        ins_sample_id,
        GROUP_CONCAT(DISTINCT uu.name SEPARATOR ',') AS userName
        FROM ins_sample_user u
        LEFT JOIN user uu ON u.user_id = uu.id
        WHERE u.state=0
        <if test="sonLaboratory!= null and sonLaboratory != ''">
           and son_laboratory=#{sonLaboratory}
            AND son_laboratory = #{sonLaboratory}
        </if>
        GROUP BY ins_sample_id
        ORDER BY ins_sample_id
        ) isu ON isu.ins_sample_id = io.id
        LEFT JOIN (
        SELECT ins_sample_id,uu.name checkName
        FROM ins_sample_user u LEFT JOIN  user uu ON u.user_id = uu.id
        SELECT
        ins_sample_id,
        uu.name AS checkName
        FROM ins_sample_user u
        LEFT JOIN user uu ON u.user_id = uu.id
        WHERE u.state=1
        <if test="sonLaboratory!= null and sonLaboratory != ''">
            and son_laboratory=#{sonLaboratory}
            AND son_laboratory = #{sonLaboratory}
        </if>
        GROUP BY ins_sample_id
        ORDER BY ins_sample_id
        )isu2 ON isu2.ins_sample_id = io.id
        LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id
        WHERE io.state = 1 and send_time is not null
        WHERE io.state = 1
        AND io.send_time IS NOT NULL
        <if test="materialProp != null and materialProp != ''">
            AND iiq.material_prop LIKE CONCAT('%', #{materialProp}, '%')
        </if>
        <if test="sonLaboratory != null and sonLaboratory != ''">
            AND ip.son_laboratory = #{sonLaboratory}
        </if>
        <if test="isCheck != null">
            <if test="userName !=null and userName!=''">
                and checkName like CONCAT ('%', #{userName},'%')
                AND checkName LIKE CONCAT('%', #{userName}, '%')
            </if>
        </if>
        <if test="isCheck == null">
            <if test="userName !=null and userName!=''">
                and userName like CONCAT ('%', #{userName},'%')
                AND userName LIKE CONCAT('%', #{userName}, '%')
            </if>
        </if>
        <if test="sonLaboratory!= null and sonLaboratory != ''">
            and ip.son_laboratory = #{sonLaboratory}
        </if>
        GROUP BY
        ip.son_laboratory,
        io.id
@@ -245,17 +255,117 @@
        a.type DESC,
        a.id
        ) b
        where ins_state is not null
        WHERE ins_state IS NOT NULL
        <if test="laboratory!=null and laboratory!=''">
            and laboratory=#{laboratory}
            AND laboratory = #{laboratory}
        </if>
        )A
        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
            ${ew.customSqlSegment}
        </if>
        ORDER BY send_time asc
        ORDER BY send_time ASC
    </select>
<!--    <select id="findInsSampleAndOrder" resultType="com.ruoyi.inspect.vo.InsOrderPlanVO">-->
<!--        select * from(select * from(-->
<!--        SELECT-->
<!--        a.*,ios.ins_state,ios.verify_tell,verify_user-->
<!--        FROM-->
<!--        (-->
<!--        SELECT-->
<!--        io.id,-->
<!--        io.entrust_code,-->
<!--        io.type,-->
<!--        io.appointed,-->
<!--        io.send_time,-->
<!--        io.order_type,-->
<!--        case when-->
<!--        io.type_source = 0-->
<!--        then io.sample_view-->
<!--        else io.sample end sample,-->
<!--        GROUP_CONCAT(DISTINCT isa.model SEPARATOR ' ') AS sample_model,-->
<!--        userName,-->
<!--        checkName,-->
<!--        ip.son_laboratory,-->
<!--        io.ins_time,-->
<!--        io.laboratory,-->
<!--        io.type_source,-->
<!--        io.ifs_inventory_id,-->
<!--        ira.id ins_report_id,-->
<!--        ira.url,-->
<!--        ira.url_s,-->
<!--        ira.temp_url_pdf,-->
<!--        iiq.is_copper,-->
<!--        iiq.is_split_order,-->
<!--        iiq.update_batch_no,-->
<!--        iiq.part_desc,-->
<!--        iiq.material_prop AS material_prop-->
<!--        FROM-->
<!--        ins_order io-->
<!--        LEFT JOIN ins_sample isa ON isa.ins_order_id = io.id-->
<!--        LEFT JOIN ins_report ira ON ira.ins_order_id = io.id-->
<!--        LEFT JOIN ifs_inventory_quantity iiq-->
<!--        ON iiq.id = io.ifs_inventory_id-->
<!--        <if test="materialProp != null and materialProp != ''">-->
<!--            AND iiq.material_prop LIKE CONCAT('%', #{materialProp}, '%')-->
<!--        </if>-->
<!--        LEFT JOIN (-->
<!--        SELECT ins_sample_id,GROUP_CONCAT( DISTINCT uu.name SEPARATOR ',') AS userName-->
<!--        FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id-->
<!--        WHERE u.state=0-->
<!--        <if test="sonLaboratory!= null and sonLaboratory != ''">-->
<!--            and son_laboratory=#{sonLaboratory}-->
<!--        </if>-->
<!--        GROUP BY ins_sample_id-->
<!--        ORDER BY ins_sample_id-->
<!--        ) isu ON isu.ins_sample_id = io.id-->
<!--        LEFT JOIN (-->
<!--        SELECT ins_sample_id,uu.name checkName-->
<!--        FROM ins_sample_user u LEFT JOIN user uu ON u.user_id = uu.id-->
<!--        WHERE u.state=1-->
<!--        <if test="sonLaboratory!= null and sonLaboratory != ''">-->
<!--            and son_laboratory=#{sonLaboratory}-->
<!--        </if>-->
<!--        GROUP BY ins_sample_id-->
<!--        ORDER BY ins_sample_id-->
<!--        )isu2 ON isu2.ins_sample_id = io.id-->
<!--        LEFT JOIN ins_product ip ON ip.ins_sample_id = isa.id-->
<!--        WHERE io.state = 1 and send_time is not null-->
<!--        <if test="isCheck != null">-->
<!--            <if test="userName !=null and userName!=''">-->
<!--                and checkName like CONCAT ('%', #{userName},'%')-->
<!--            </if>-->
<!--        </if>-->
<!--        <if test="isCheck == null">-->
<!--            <if test="userName !=null and userName!=''">-->
<!--                and userName like CONCAT ('%', #{userName},'%')-->
<!--            </if>-->
<!--        </if>-->
<!--        <if test="sonLaboratory!= null and sonLaboratory != ''">-->
<!--            and ip.son_laboratory = #{sonLaboratory}-->
<!--        </if>-->
<!--        GROUP BY-->
<!--        ip.son_laboratory,-->
<!--        io.id-->
<!--        ) a-->
<!--        LEFT JOIN ins_order_state ios ON ios.ins_order_id = a.id AND ios.laboratory = a.son_laboratory-->
<!--        ORDER BY-->
<!--        a.type DESC,-->
<!--        a.id-->
<!--        ) b-->
<!--        where ins_state is not null-->
<!--        <if test="laboratory!=null and laboratory!=''">-->
<!--            and laboratory=#{laboratory}-->
<!--        </if>-->
<!--        )A-->
<!--        <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">-->
<!--            ${ew.customSqlSegment}-->
<!--        </if>-->
<!--        ORDER BY send_time asc-->
<!--    </select>-->
    <select id="inspectionOrderDetailsTaskSwitching" resultType="com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo">
        select * from(
        SELECT