成品下单撤销报错问题修复&原材料下单下发时间过滤条件调整为报检时间
已修改7个文件
51 ■■■■ 文件已修改
basic-server/src/main/resources/mapper/StandardTreeMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
inspect-server/src/main/resources/mapper/InsProductMapper.xml 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
basic-server/src/main/resources/mapper/StandardTreeMapper.xml
@@ -334,7 +334,7 @@
        select * from (<include refid="getIfsOrder"/>
        <where>
            <if test="beginDeclareDate != null and beginDeclareDate != '' and endDeclareDate != null and endDeclareDate != ''">
                send_time between #{beginDeclareDate} and #{endDeclareDate}
                declare_date between #{beginDeclareDate} and #{endDeclareDate}
            </if>
        </where>
        ) a
@@ -347,7 +347,7 @@
        select * from (<include refid="getIfsOrder"/>
            <where>
                <if test="beginDeclareDate != null and beginDeclareDate != '' and endDeclareDate != null and endDeclareDate != ''">
                    send_time between #{beginDeclareDate} and #{endDeclareDate}
                    declare_date between #{beginDeclareDate} and #{endDeclareDate}
                </if>
            </where>
        ) a
@@ -360,7 +360,7 @@
        <where>
            and (quarter_order_id is not null)
            <if test="beginDeclareDate != null and beginDeclareDate != '' and endDeclareDate != null and endDeclareDate != ''">
                and  send_time between #{beginDeclareDate} and #{endDeclareDate}
                and  declare_date between #{beginDeclareDate} and #{endDeclareDate}
            </if>
        </where>
        ) a
inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
@@ -145,6 +145,12 @@
        return Result.success(insProductService.selectNoProducts(page, insProduct,orderId,ids));
    }
    //撤销审核,查询撤销的检测项
    @GetMapping("/getRevocationInsProductList")
    public Result<?> getRevocationInsProductList(@RequestParam("orderId") Integer orderId){
        return Result.success(insProductService.getRevocationInsProductList(orderId));
    }
    @ApiOperation(value = "待检的撤销")
    @PostMapping("/updateInspected")
@@ -152,8 +158,8 @@
        Integer orderId = (Integer) param.get("orderId");
        String ids = (String) param.get("ids");
        Integer typeSource = (Integer) param.get("typeSource");
        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
        if(Objects.nonNull(typeSource) && typeSource == 1){
            Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString());
            ifsInventoryQuantityMapper.update(null,new LambdaUpdateWrapper<IfsInventoryQuantity>()
                    .set(IfsInventoryQuantity::getState,0)
                    .eq(IfsInventoryQuantity::getId,ifsInventoryId));
inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
@@ -117,7 +117,7 @@
    @ApiOperation(value = "撤销报检")
    @PostMapping("/revokeInspectionReport")
    public Result<?> revokeInspectionReport(@RequestBody Map<String, Object> param) {
        Long id = (Long) param.get("id");
        Long id = Long.parseLong(param.get("id").toString());
        return Result.success(rawMaterialOrderService.revokeInspectionReport(id));
    }
@@ -164,7 +164,7 @@
    @ApiOperation(value = "原材料撤销下单")
    @GetMapping("/repealRawOrder")
    public Result<?> repealRawOrder(@RequestBody Map<String, Object> param){
        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
        Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString());
        return Result.success(rawMaterialOrderService.repealRawOrder(ifsInventoryId));
    }
@@ -201,7 +201,7 @@
    @ApiOperation(value = "原材料下单放行免检")
    @PostMapping("/rawOrderRelease")
    public Result<?> rawOrderRelease(@RequestBody Map<String, Object> param){
        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
        Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString());
        String partDetail = (String) param.get("partDetail");
        return Result.success(rawMaterialOrderService.rawOrderRelease(ifsInventoryId, partDetail));
    }
@@ -269,7 +269,7 @@
    @ApiOperation(value = "让步放行")
    @PostMapping("/concessionRelease")
    public Result<?> concessionRelease(@RequestBody Map<String, Object> param){
        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
        Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString());
        return Result.success(rawMaterialOrderService.concessionRelease(ifsInventoryId));
    }
@@ -319,7 +319,7 @@
    @ApiOperation(value = "提前入库")
    @PostMapping("/advancedGodown")
    public Result<?> advancedGodown(@RequestBody Map<String, Object> param){
        Long ifsInventoryId = (Long) param.get("ifsInventoryId");
        Long ifsInventoryId = Long.parseLong(param.get("ifsInventoryId").toString());
        return Result.success(rawMaterialOrderService.advancedGodown(ifsInventoryId));
    }
inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java
@@ -77,6 +77,8 @@
     * @return
     */
    List<InsProductDeviationWarningDetail> selectAnalysis(@Param("insProduct") InsProduct insProduct, @Param("supplierName") String supplierName);
    List<InsProduct> getRevocationInsProductList(@Param("ids") List<Integer> ids);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java
@@ -50,4 +50,6 @@
     * @return
     */
    boolean removeBindingProductTree(Integer productId);
    List<InsProduct> getRevocationInsProductList(Integer orderId);
}
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsProductServiceImpl.java
@@ -215,6 +215,20 @@
        return false;
    }
    @Override
    public List<InsProduct> getRevocationInsProductList(Integer orderId) {
        InsOrder insOrder = insOrderMapper.selectById(orderId);
        if(Objects.isNull(insOrder)){
            throw new RuntimeException("未找到该订单");
        }
        String revocationInsProductIds = insOrder.getRevocationInsProductIds();
        List<Integer> ids = new ArrayList<>();
        if(StringUtils.isNotBlank(revocationInsProductIds)){
            ids = Arrays.asList(revocationInsProductIds.split(",")).stream().map(Integer::parseInt).collect(Collectors.toList());
        }
        return baseMapper.getRevocationInsProductList(ids);
    }
}
inspect-server/src/main/resources/mapper/InsProductMapper.xml
@@ -172,4 +172,13 @@
        order by io.first_submit_date desc
        limit 10
    </select>
    <select id="getRevocationInsProductList" resultType="com.ruoyi.inspect.pojo.InsProduct">
        select *
        from ins_product
        WHERE state = 1
        AND id in
        <foreach collection="ids" item="id" open="(" close=")" separator=",">
            #{id}
        </foreach>
    </select>
</mapper>