gongchunyi
8 小时以前 5224b79436b16039d07a981029e330f48b3c7708
fix: 日期格式转换、生产订单缺少查询条件
已修改4个文件
30 ■■■■ 文件已修改
src/main/java/com/ruoyi/basic/service/impl/BaseParamServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/controller/ProductMaterialController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/production/service/impl/ProductionOrderRouteItemParamServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/production/ProductOrderMapper.xml 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/ruoyi/basic/service/impl/BaseParamServiceImpl.java
@@ -154,8 +154,7 @@
    private String toUpperCasePattern(String pattern) {
        if (StringUtils.isEmpty(pattern)) return "";
        return pattern.replace("yyyy", "YYYY")
                .replace("dd", "DD")
                .replace("ss", "SS");
                .replace("dd", "DD");
    }
    @Override
src/main/java/com/ruoyi/production/controller/ProductMaterialController.java
@@ -56,7 +56,7 @@
    @GetMapping("/listQuery")
    @ApiOperation("物料数据类别子类数据集合")
    @Log(title = "物料数据类别子类数据集合", businessType = BusinessType.OTHER)
    public AjaxResult productMaterialListByQuery(@RequestParam(value = "materialName", required = false) String materialName, @RequestParam(value = "materialTypeId", required = false) Integer materialTypeId) {
    public AjaxResult productMaterialListByQuery(@RequestParam(value = "productName", required = false) String materialName, @RequestParam(value = "materialTypeId", required = false) Integer materialTypeId) {
        List<ProductMaterialGroupDto> productMaterialMap = productMaterialService.productMaterialListByQuery(materialName, materialTypeId);
        return AjaxResult.success(productMaterialMap);
    }
src/main/java/com/ruoyi/production/service/impl/ProductionOrderRouteItemParamServiceImpl.java
@@ -6,6 +6,7 @@
import com.ruoyi.basic.service.BaseParamService;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.production.dto.ProductionOrderRouteItemParamDto;
import com.ruoyi.production.mapper.ProductionOrderRouteItemParamMapper;
import com.ruoyi.production.pojo.ProductionOrderRouteItemParam;
@@ -42,13 +43,21 @@
                .eq(ProductionOrderRouteItemParam::getRouteItemId, routeItemId)
                .orderByAsc(ProductionOrderRouteItemParam::getSort));
        return list.stream().map(item -> {
            ProductionOrderRouteItemParamDto dto = new ProductionOrderRouteItemParamDto();
            BeanUtils.copyProperties(item, dto);
            dto.setParamFormat(toUpperCasePattern(dto.getParamFormat()));
            return dto;
        }).collect(Collectors.toList());
    }
    private String toUpperCasePattern(String pattern) {
        if (StringUtils.isEmpty(pattern)) return "";
        return pattern.replace("yyyy", "YYYY")
                .replace("dd", "DD");
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void addRouteItemParam(ProductionOrderRouteItemParamDto dto) {
src/main/resources/mapper/production/ProductOrderMapper.xml
@@ -68,9 +68,23 @@
            <if test="c.startTime != null and c.endTime != null">
                AND po.create_time BETWEEN #{c.startTime} AND #{c.endTime}
            </if>
            <if test="c.status != null">
                AND po.status = #{c.status}
            </if>
            <if test="c.productName != null and c.productName != ''">
                AND pm.product_name LIKE CONCAT('%', #{c.productName}, '%')
            </if>
            <if test="c.materialCode != null and c.materialCode != ''">
                AND pms.material_code LIKE CONCAT('%', #{c.materialCode}, '%')
            </if>
            <if test="c.model != null and c.model != ''">
                AND pms.model LIKE CONCAT('%', #{c.model}, '%')
            </if>
            <if test="c.strength != null and c.strength != ''">
                AND po.strength = #{c.strength}
            </if>
        </where>
    </select>
    <select id="listProcessRoute" resultType="com.ruoyi.production.pojo.ProcessRoute">
        select pr.*
        from process_route pr