| | |
| | | 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 |
| | |
| | | @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); |
| | | } |
| | |
| | | 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; |
| | |
| | | .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) { |
| | |
| | | <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 |