选煤厂生产管理平台后台代码
Jay
6 天以前 8d3ff63ab144ad6b48015b01196bc901944a48f9
煤质部分后端代码
已修改19个文件
已添加13个文件
1039 ■■■■ 文件已修改
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/utils/SerialNumUtils.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesController.java 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityDetectionController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityMediumController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickItemController.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityTailingController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityDetectionDTO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityMediumDTO.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickDTO.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickItemDTO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityTailingDTO.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityDetectionServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityMediumServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityTailingServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/controller/QualityPlanMonthController.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dao/QualityPlanDao.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dao/QualityPlanDetDao.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dto/QualityPlanDTO.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dto/QualityPlanDetDTO.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/entity/QualityPlanDetEntity.java 166 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/entity/QualityPlanEntity.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/QualityPlanDetService.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/QualityPlanService.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/impl/QualityPlanDetServiceImpl.java 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/impl/QualityPlanServiceImpl.java 105 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/vo/PlanMonthPageReqVO.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dto/QualityWashTargetDTO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/XmcPmsServerApplication.java
@@ -2,14 +2,12 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
/**
 * 项目的启动类
 *
 * @author iailab
 */
@ComponentScan(basePackages = {"com.iailab.iems.common", "com.iailab.module.pms"})
@SpringBootApplication
public class XmcPmsServerApplication {
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/common/utils/SerialNumUtils.java
对比新文件
@@ -0,0 +1,31 @@
package com.iailab.module.pms.coalquality.common.utils;
import com.iailab.framework.common.util.date.DateUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.Date;
/**
 * @author Jay
 */
public class SerialNumUtils {
    public static String getSerialNum(String prefix, Date date, String bc) {
        StringBuilder sb = new StringBuilder();
        if (StringUtils.isNotEmpty(prefix)) {
            sb.append(prefix);
        }
        if (date != null) {
            sb.append(DateUtils.format(date, "yyyyMMdd"));
        }
        if ("bb".equals(bc)) {
            sb.append("1");
        } else {
            sb.append("2");
        }
        return sb.toString();
    }
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/controller/admin/CoalWashCurvesController.java
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/analysis/service/impl/CoalWashCurvesServiceImpl.java
@@ -7,7 +7,6 @@
import com.iailab.framework.common.util.object.BeanUtils;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.framework.tenant.core.aop.TenantIgnore;
import com.iailab.iems.common.utils.SerialNumUtils;
import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalWashCurvesDao;
import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDTO;
import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalWashCurvesDetDTO;
@@ -36,9 +35,6 @@
    private CoalWashCurvesDetService coalWashCurvesDetService;
    private DecimalFormat df = new DecimalFormat("00");
    @Autowired
    private SerialNumUtils serialNumUtils;
    private String BUSINESS_CODE = "CoalWashCurves";
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityDetectionController.java
@@ -3,7 +3,6 @@
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.iems.common.validator.AssertUtils;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO;
import com.iailab.module.pms.coalquality.modules.detection.service.QualityDetectionService;
import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO;
@@ -25,7 +24,7 @@
 */
@Slf4j
@RestController
@RequestMapping("/xmcpms/quality/detection")
@RequestMapping("/coal-quality/quality/detection")
@Tag(name = "煤质检测")
public class QualityDetectionController {
    @Autowired
@@ -41,16 +40,16 @@
        return success(page);
    }
    @GetMapping("{id}")
    @GetMapping("/get")
    @Operation(summary ="信息")
    public CommonResult<QualityDetectionDTO> get(@PathVariable("id") String id) {
    public CommonResult<QualityDetectionDTO> get(String id) {
        QualityDetectionDTO data = qualityDetectionService.get(id);
        return success(data);
    }
    @PostMapping
    @PostMapping("/create")
    @Operation(summary ="保存")
    public CommonResult<Boolean> save(@RequestBody QualityDetectionDTO dto) {
    public CommonResult<Boolean> create(@RequestBody QualityDetectionDTO dto) {
//        if (qualityDetectionService.cheack(dto) > 0) {
//            return new CommonResult().error("编号重复");
//        }
@@ -60,7 +59,7 @@
        return success(true);
    }
    @PutMapping
    @PutMapping("/update")
    @Operation(summary ="修改")
    public CommonResult<Boolean> update(@RequestBody QualityDetectionDTO dto) {
@@ -72,11 +71,9 @@
        return success(true);
    }
    @DeleteMapping
    @DeleteMapping("/delete")
    @Operation(summary ="删除")
    public CommonResult<Boolean> delete(@RequestBody String[] ids) {
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        qualityDetectionService.delete(ids);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityMediumController.java
@@ -3,7 +3,6 @@
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.iems.common.validator.AssertUtils;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityMediumDTO;
import com.iailab.module.pms.coalquality.modules.detection.service.QualityMediumService;
import com.iailab.module.pms.coalquality.modules.detection.vo.MediumPageReqVO;
@@ -22,7 +21,7 @@
 */
@Slf4j
@RestController
@RequestMapping("/xmcpms/quality/medium")
@RequestMapping("/coal-quality/quality/medium")
@Tag(name = "介质粉检测")
public class QualityMediumController {
    @Autowired
@@ -36,16 +35,16 @@
        return success(page);
    }
    @GetMapping("{id}")
    @GetMapping("/get")
    @Operation(summary = "信息")
    public CommonResult<QualityMediumDTO> get(@PathVariable("id") String id){
    public CommonResult<QualityMediumDTO> get(String id){
        QualityMediumDTO data = qualityMediumService.get(id);
        return success(data);
    }
    @PostMapping
    @PostMapping("/create")
    @Operation(summary = "保存")
    public CommonResult<Boolean> save(@RequestBody QualityMediumDTO dto){
    public CommonResult<Boolean> create(@RequestBody QualityMediumDTO dto){
//        //效验数据
//        ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
@@ -54,7 +53,7 @@
        return success(true);
    }
    @PutMapping
    @PutMapping("/update")
    @Operation(summary = "修改")
    public CommonResult<Boolean> update(@RequestBody QualityMediumDTO dto){
//        //效验数据
@@ -69,11 +68,9 @@
        return success(true);
    }
    @DeleteMapping
    @DeleteMapping("/delete")
    @Operation(summary = "删除")
    public CommonResult<Boolean> delete(@RequestBody String[] ids){
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        qualityMediumService.delete(ids);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickController.java
@@ -3,7 +3,6 @@
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.iems.common.validator.AssertUtils;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO;
import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickService;
import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO;
@@ -22,7 +21,7 @@
 */
@Slf4j
@RestController
@RequestMapping("/xmcpms/quality/quick")
@RequestMapping("/coal-quality/quality/quick")
@Tag(name = "生产快检")
public class QualityQuickController {
    @Autowired
@@ -36,14 +35,14 @@
        return success(page);
    }
    @GetMapping("{id}")
    @GetMapping("/get")
    @Operation(summary = "信息")
    public CommonResult<QualityQuickDTO> get(@PathVariable("id") String id){
    public CommonResult<QualityQuickDTO> get(String id){
        QualityQuickDTO data = qualityQuickService.get(id);
        return success(data);
    }
    @PostMapping
    @PostMapping("/create")
    @Operation(summary = "保存")
    public CommonResult<Boolean> save(@RequestBody QualityQuickDTO dto){
@@ -52,7 +51,7 @@
        return success(true);
    }
    @PutMapping
    @PutMapping("/update")
    @Operation(summary = "修改")
    public CommonResult<Boolean> update(@RequestBody QualityQuickDTO dto){
@@ -61,11 +60,9 @@
        return success(true);
    }
    @DeleteMapping
    @DeleteMapping("/delete")
    @Operation(summary = "删除")
    public CommonResult<Boolean> delete(@RequestBody String[] ids){
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        qualityQuickService.delete(ids);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityQuickItemController.java
@@ -1,7 +1,6 @@
package com.iailab.module.pms.coalquality.modules.detection.controller.admin;
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.iems.common.annotation.AutoDict;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickItemDTO;
import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickItemService;
import io.swagger.v3.oas.annotations.Operation;
@@ -26,7 +25,7 @@
 */
@Slf4j
@RestController
@RequestMapping("/xmcpms/quality/quick/item")
@RequestMapping("/coal-quality/quality/quick/item")
@Tag(name = "生产快检详情")
public class QualityQuickItemController {
    @Autowired
@@ -34,7 +33,6 @@
    @GetMapping("/list/{lsh}")
    @Operation(summary ="信息")
    @AutoDict
    public CommonResult<List<QualityQuickItemDTO>> list(@PathVariable("lsh") String lsh){
        Map<String, Object> parmas = new HashMap<>(1);
        parmas.put("lsh", lsh);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/controller/admin/QualityTailingController.java
@@ -3,7 +3,6 @@
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.iems.common.validator.AssertUtils;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityTailingDTO;
import com.iailab.module.pms.coalquality.modules.detection.service.QualityTailingService;
import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO;
@@ -22,7 +21,7 @@
 */
@Slf4j
@RestController
@RequestMapping("/xmcpms/quality/tailing")
@RequestMapping("/coal-quality/quality/tailing")
@Tag(name = "尾矿检测")
public class QualityTailingController {
    @Autowired
@@ -36,23 +35,23 @@
        return success(page);
    }
    @GetMapping("{id}")
    @GetMapping("/get")
    @Operation(summary ="信息")
    public CommonResult<QualityTailingDTO> get(@PathVariable("id") String id){
    public CommonResult<QualityTailingDTO> get(String id){
        QualityTailingDTO data = qualityTailingService.get(id);
        return success(data);
    }
    @PostMapping
    @PostMapping("/create")
    @Operation(summary ="保存")
    public CommonResult<Boolean> save(@RequestBody QualityTailingDTO dto){
    public CommonResult<Boolean> create(@RequestBody QualityTailingDTO dto){
        qualityTailingService.save(dto);
        return success(true);
    }
    @PutMapping
    @PutMapping("/update")
    @Operation(summary ="修改")
    public CommonResult<Boolean> update(@RequestBody QualityTailingDTO dto){
//
@@ -65,11 +64,9 @@
        return success(true);
    }
    @DeleteMapping
    @DeleteMapping("/delete")
    @Operation(summary ="删除")
    public CommonResult<Boolean> delete(@RequestBody String[] ids){
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        qualityTailingService.delete(ids);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityDetectionDTO.java
@@ -1,14 +1,9 @@
package com.iailab.module.pms.coalquality.modules.detection.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iailab.iems.common.annotation.Dict;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
@@ -26,8 +21,6 @@
    private static final long serialVersionUID = 1L;
    @Schema(description = "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description = "关联ID")
@@ -47,7 +40,6 @@
    private String bc;
    @Schema(description = "班次")
    @Dict(dicCode = "bc", itemValue = "bc")
    private String bcName;
    @Schema(description = "采样时间")
@@ -57,7 +49,6 @@
    private String cyd;
    @Schema(description = "采样点")
    @Dict(dicCode = "cyd", itemValue = "cyd")
    private String cydName;
    @Schema(description = "产量")
@@ -75,7 +66,6 @@
    private String mz;
    @Schema(description = "煤种")
    @Dict(dicCode = "ymmz,cpmz,spmz", itemValue = "mz")
    private String mzName;
    @Schema(description = "灰分Ad%")
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityMediumDTO.java
@@ -1,13 +1,9 @@
package com.iailab.module.pms.coalquality.modules.detection.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -22,8 +18,6 @@
    private static final long serialVersionUID = 1L;
    @Schema(description = "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description = "流水号")
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickDTO.java
@@ -1,13 +1,10 @@
package com.iailab.module.pms.coalquality.modules.detection.dto;
import com.iailab.iems.common.annotation.Dict;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.util.Date;
import java.util.List;
/**
@@ -21,21 +18,19 @@
    private static final long serialVersionUID = 1L;
    @Schema(description =  "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description =  "流水号")
    private String lsh;
    @Schema(description =  "采样时间")
    private java.util.Date datetime;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date datetime;
    @Schema(description =  "煤种")
    private String mz;
    @Schema(description =  "煤种")
    @Dict(dicCode = "ymmz", itemValue = "mz")
    private String mzName;
    @Schema(description =  "快速检查详情")
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityQuickItemDTO.java
@@ -3,14 +3,9 @@
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iailab.iems.common.annotation.Dict;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.math.BigDecimal;
/**
@@ -25,8 +20,6 @@
    private static final long serialVersionUID = 1L;
    @Schema(description =  "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    @ExcelIgnore
    private String id;
@@ -48,7 +41,6 @@
    private String xm;
    @Schema(description =  "项目名称")
    @Dict(dicCode = "sckjxm", itemValue = "xm")
    @ExcelProperty(index = 0)
    private String xmName;
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/dto/QualityTailingDTO.java
@@ -1,16 +1,12 @@
package com.iailab.module.pms.coalquality.modules.detection.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iailab.iems.common.annotation.Dict;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * @author PanZhibao
@@ -23,8 +19,6 @@
    private static final long serialVersionUID = 1L;
    @Schema(description = "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description = "流水号")
@@ -38,21 +32,21 @@
    private String bc;
    @Schema(description = "班次")
    @Dict(dicCode = "bc", itemValue = "bc")
    private String bcName;
    @Schema(description = "采样点")
    private String cyd;
    @Schema(description = "采样点")
    @Dict(dicCode = "cyd", itemValue = "cyd")
    private String cydName;
    @Schema(description = "采样时间")
    private java.util.Date cysj;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date cysj;
    @Schema(description = "化验时间")
    private java.util.Date hysj;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date hysj;
    @Schema(description = "采样数量")
    private BigDecimal cysl;
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityDetectionServiceImpl.java
@@ -4,15 +4,13 @@
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.BeanUtils;
import com.iailab.iems.common.utils.ConvertUtils;
import com.iailab.iems.common.utils.SerialNumUtils;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.module.pms.coalquality.modules.detection.dao.QualityDetectionDao;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityDetectionDTO;
import com.iailab.module.pms.coalquality.modules.detection.entity.QualityDetectionEntity;
import com.iailab.module.pms.coalquality.modules.detection.service.QualityDetectionService;
import com.iailab.module.pms.coalquality.modules.detection.vo.DetectionPageReqVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
@@ -32,9 +30,6 @@
@Service
public class QualityDetectionServiceImpl extends BaseServiceImpl<QualityDetectionDao, QualityDetectionEntity>
        implements QualityDetectionService {
    @Autowired
    private SerialNumUtils serialNumUtils;
    private Map<String, String> prefixMap = new HashMap<>();
@@ -63,7 +58,7 @@
            prefixMap.put("spm", "30");
        }
        QualityDetectionEntity entity = ConvertUtils.sourceToTarget(dto, QualityDetectionEntity.class);
        entity.setCode(prefixMap.get(dto.getType()) + serialNumUtils.getByBusinessDate(BUSINESS_CODE + dto.getType(), dto.getRq(), 4));
//        entity.setCode(prefixMap.get(dto.getType()) + serialNumUtils.getByBusinessDate(BUSINESS_CODE + dto.getType(), dto.getRq(), 4));
        entity.setCreateDate(new Date());
//        entity.setCreator(SecurityUser.getUserId().toString());
        insert(entity);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityMediumServiceImpl.java
@@ -6,7 +6,6 @@
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.BeanUtils;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.iems.common.utils.SerialNumUtils;
import com.iailab.module.pms.coalquality.modules.detection.dao.QualityMediumDao;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityMediumDTO;
import com.iailab.module.pms.coalquality.modules.detection.entity.QualityMediumEntity;
@@ -14,7 +13,6 @@
import com.iailab.module.pms.coalquality.modules.detection.vo.MediumPageReqVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -32,10 +30,6 @@
@Service
public class QualityMediumServiceImpl extends BaseServiceImpl<QualityMediumDao, QualityMediumEntity>
        implements QualityMediumService {
    @Autowired
    private SerialNumUtils serialNumUtils;
    private String BUSINESS_CODE = "QualityMedium";
@@ -55,7 +49,7 @@
    @Override
    public void save(QualityMediumDTO dto) {
        dto.setCode(serialNumUtils.getByBusinessDate(BUSINESS_CODE, dto.getRq(), 4));
        //dto.setCode(serialNumUtils.getByBusinessDate(BUSINESS_CODE, dto.getRq(), 4));
        QualityMediumEntity entity = ConvertUtils.sourceToTarget(dto, QualityMediumEntity.class);
        entity.setCreateDate(new Date());
//        entity.setCreator(SecurityUser.getUserId().toString());
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityQuickServiceImpl.java
@@ -5,7 +5,6 @@
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.BeanUtils;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.iems.common.utils.SerialNumUtils;
import com.iailab.module.pms.coalquality.modules.detection.dao.QualityQuickDao;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickItemDTO;
@@ -33,9 +32,6 @@
public class QualityQuickServiceImpl extends BaseServiceImpl<QualityQuickDao, QualityQuickEntity>
        implements QualityQuickService {
    @Autowired
    private SerialNumUtils serialNumUtils;
    private String BUSINESS_CODE = "QualityQuick";
    @Autowired
@@ -61,7 +57,7 @@
    @Override
    public void save(QualityQuickDTO dto) {
        dto.setLsh(serialNumUtils.getByBusinessDate(BUSINESS_CODE, dto.getDatetime(), 4));
        //dto.setLsh(serialNumUtils.getByBusinessDate(BUSINESS_CODE, dto.getDatetime(), 4));
        QualityQuickEntity entity = ConvertUtils.sourceToTarget(dto, QualityQuickEntity.class);
        insert(entity);
        dto.getItemList().stream().forEach(
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/detection/service/impl/QualityTailingServiceImpl.java
@@ -6,7 +6,7 @@
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.BeanUtils;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.iems.common.utils.SerialNumUtils;
import com.iailab.module.pms.coalquality.common.utils.SerialNumUtils;
import com.iailab.module.pms.coalquality.modules.detection.dao.QualityTailingDao;
import com.iailab.module.pms.coalquality.modules.detection.dto.QualityTailingDTO;
import com.iailab.module.pms.coalquality.modules.detection.entity.QualityTailingEntity;
@@ -14,13 +14,11 @@
import com.iailab.module.pms.coalquality.modules.detection.vo.TailingPageReqVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;
/**
 * 尾矿检测
@@ -34,9 +32,6 @@
public class QualityTailingServiceImpl extends BaseServiceImpl<QualityTailingDao, QualityTailingEntity>
        implements QualityTailingService {
    @Autowired
    private SerialNumUtils serialNumUtils;
    private String BUSINESS_CODE = "QualityTailing";
    @Override
@@ -44,14 +39,6 @@
        PageResult<QualityTailingEntity> page = baseDao.selectPage(reqVO);
        return BeanUtils.toBean(page, QualityTailingDTO.class);
    }
    private QueryWrapper<QualityTailingEntity> getWrapper(Map<String, Object> params){
        String rq = (String)params.get("rq");
        QueryWrapper<QualityTailingEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(rq), "rq", rq);
        return wrapper;
    }
    @Override
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/controller/QualityPlanMonthController.java
对比新文件
@@ -0,0 +1,78 @@
package com.iailab.module.pms.coalquality.modules.plan.controller;
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.module.pms.coalquality.modules.plan.dto.QualityPlanDTO;
import com.iailab.module.pms.coalquality.modules.plan.service.QualityPlanService;
import com.iailab.module.pms.coalquality.modules.plan.vo.PlanMonthPageReqVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import static com.iailab.framework.common.pojo.CommonResult.error;
import static com.iailab.framework.common.pojo.CommonResult.success;
/**
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:49:00
 */
@RestController
@RequestMapping("/plan/month")
@Tag(name ="质量月计划")
public class QualityPlanMonthController {
    @Autowired
    private QualityPlanService qualityPlanService;
    private final String PLAN_TYPE = "month";
    @GetMapping("/page")
    public CommonResult<PageResult<QualityPlanDTO>> page(PlanMonthPageReqVO planMonthPageReqVO){
        planMonthPageReqVO.setPlanType(PLAN_TYPE);
        PageResult<QualityPlanDTO> page = qualityPlanService.page(planMonthPageReqVO);
        return success(page);
    }
    @GetMapping("/get")
    @Operation(summary = "信息")
    public CommonResult<QualityPlanDTO> get(String id){
        QualityPlanDTO data = qualityPlanService.get(id);
        return success(data);
    }
    @PostMapping("/create")
    @Operation(summary = "保存")
    public CommonResult<Boolean> create(@RequestBody QualityPlanDTO dto){
        if (qualityPlanService.cheack(dto) > 0) {
            return error(406, "编号重复");
        }
        dto.setPlanType(PLAN_TYPE);
        qualityPlanService.save(dto);
        return success(true);
    }
    @PutMapping("/update")
    @Operation(summary = "修改")
    public CommonResult<Boolean> update(@RequestBody QualityPlanDTO dto){
        if (qualityPlanService.cheack(dto) > 0) {
            return error(406, "编号重复");
        }
        qualityPlanService.update(dto);
        return success(true);
    }
    @DeleteMapping("/delete")
    @Operation(summary = "删除")
    public CommonResult<Boolean> delete(@RequestBody String[] ids){
        qualityPlanService.delete(ids);
        return success(true);
    }
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dao/QualityPlanDao.java
对比新文件
@@ -0,0 +1,30 @@
package com.iailab.module.pms.coalquality.modules.plan.dao;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.iailab.module.pms.coalquality.modules.plan.entity.QualityPlanEntity;
import com.iailab.module.pms.coalquality.modules.plan.vo.PlanMonthPageReqVO;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Mapper;
/**
 * 质量计划
 *
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:36:00
 */
@Mapper
public interface QualityPlanDao extends BaseMapperX<QualityPlanEntity> {
    default PageResult<QualityPlanEntity> selectPage(PlanMonthPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<QualityPlanEntity>()
                .like(StringUtils.isNotBlank(reqVO.getCode()), QualityPlanEntity::getCode, reqVO.getCode())
                .eq(StringUtils.isNotBlank(reqVO.getPlanType()), QualityPlanEntity::getPlanType, reqVO.getPlanType())
                .eq(StringUtils.isNotBlank(reqVO.getCoalType()), QualityPlanEntity::getCoalType, reqVO.getCoalType())
                .eq(StringUtils.isNotBlank(reqVO.getSj()), QualityPlanEntity::getSj, reqVO.getSj())
        );
    }
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dao/QualityPlanDetDao.java
对比新文件
@@ -0,0 +1,16 @@
package com.iailab.module.pms.coalquality.modules.plan.dao;
import com.iailab.framework.mybatis.core.mapper.BaseMapperX;
import com.iailab.module.pms.coalquality.modules.plan.entity.QualityPlanDetEntity;
import org.apache.ibatis.annotations.Mapper;
/**
 * 质量计划详细表
 *
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:37:00
 */
@Mapper
public interface QualityPlanDetDao extends BaseMapperX<QualityPlanDetEntity> {
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dto/QualityPlanDTO.java
对比新文件
@@ -0,0 +1,61 @@
package com.iailab.module.pms.coalquality.modules.plan.dto;
import com.iailab.framework.common.validation.group.AddGroup;
import com.iailab.framework.common.validation.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.util.List;
/**
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:54:00
 */
@Data
@Schema(description = "质量计划")
public class QualityPlanDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @Schema(description = "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description = "编号")
    private String code;
    @Schema(description = "名称")
    private String name;
    @Schema(description = "计划类型")
    private String planType;
    @Schema(description = "煤类型")
    private String coalType;
    @Schema(description = "时间")
    private String sj;
    @Schema(description = "备注")
    private String bz;
    @Schema(description = "创建人")
    private String creator;
    @Schema(description = "创建时间")
    private java.util.Date createDate;
    @Schema(description = "修改人")
    private String updater;
    @Schema(description = "修改时间")
    private java.util.Date updateDate;
    @Schema(description = "详情")
    private List<QualityPlanDetDTO> detList;
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/dto/QualityPlanDetDTO.java
对比新文件
@@ -0,0 +1,112 @@
package com.iailab.module.pms.coalquality.modules.plan.dto;
import com.iailab.framework.common.validation.group.AddGroup;
import com.iailab.framework.common.validation.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
/**
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:53:00
 */
@Data
@Schema(description = "质量计划详细表")
public class QualityPlanDetDTO implements Serializable {
    private static final long serialVersionUID = 1L;
    @Schema(description = "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description = "计划ID")
    private String planId;
    @Schema(description = "单位")
    private String dw;
    @Schema(description = "煤种")
    private String mz;
    @Schema(description = "产品量")
    private BigDecimal cpl;
    @Schema(description = "灰分比较符")
    private String hfBjf;
    @Schema(description = "灰分Ad%")
    private BigDecimal hf;
    @Schema(description = "水分比较符")
    private String sfBjf;
    @Schema(description = "水分Mt%")
    private BigDecimal sf;
    @Schema(description = "硫份St,d%比较符")
    private String lfBjf;
    @Schema(description = "硫份St,d%")
    private BigDecimal lf;
    @Schema(description = "挥发分比较符")
    private String hffBjf;
    @Schema(description = "挥发分Vdaf%")
    private BigDecimal hff;
    @Schema(description = "粘结比较符")
    private String njBjf;
    @Schema(description = "粘结GR.I")
    private BigDecimal nj;
    @Schema(description = "胶质层比较符")
    private String jzcBjf;
    @Schema(description = "胶质层Y(㎜)GR.I")
    private BigDecimal jzc;
    @Schema(description = "发热量(cal/g)")
    private BigDecimal frl;
    @Schema(description = "发热量偏差")
    private BigDecimal frlPc;
    @Schema(description = "中损比较符")
    private String zsBjf;
    @Schema(description = "中损")
    private BigDecimal zs;
    @Schema(description = "中损采样点")
    private String zsCyd;
    @Schema(description = "矸损比较符")
    private String gsBjf;
    @Schema(description = "矸损")
    private BigDecimal gs;
    @Schema(description = "矸损采样点")
    private String gsCyd;
    @Schema(description = "压滤煤泥灰分比较符")
    private String ylmnHfBjf;
    @Schema(description = "压滤煤泥灰分Ad%")
    private BigDecimal ylmnHf;
    @Schema(description = "压滤煤泥采样点")
    private String ylmnCyd;
    @Schema(description = "排序")
    private Integer sort;
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/entity/QualityPlanDetEntity.java
对比新文件
@@ -0,0 +1,166 @@
package com.iailab.module.pms.coalquality.modules.plan.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
/**
 * 质量计划详细表
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("t_quality_plan_det")
public class QualityPlanDetEntity implements Serializable {
  private static final long serialVersionUID = 1L;
  /**
   * ID
   */
  @TableId(type = IdType.ASSIGN_UUID)
  private String id;
  /**
   * 计划ID
   */
  private String planId;
  /**
   * 单位
   */
  private String dw;
  /**
   * 煤种
   */
  private String mz;
  /**
   * 产品量
   */
  private BigDecimal cpl;
  /**
   * 灰分比较符
   */
  private String hfBjf;
  /**
   * 灰分
   */
  private BigDecimal hf;
  /**
   * 水分比较符
   */
  private String sfBjf;
  /**
   * 水分Mt%
   */
  private BigDecimal sf;
  /**
   * 硫份St,d%比较符
   */
  private String lfBjf;
  /**
   * 硫份St,d%
   */
  private BigDecimal lf;
  /**
   * 挥发分比较符
   */
  private String hffBjf;
  /**
   * 挥发分Vdaf%
   */
  private BigDecimal hff;
  /**
   * 粘结比较符
   */
  private String njBjf;
  /**
   * 粘结GR.I
   */
  private BigDecimal nj;
  /**
   * 胶质层比较符
   */
  private String jzcBjf;
  /**
   * 胶质层Y(㎜)GR.I
   */
  private BigDecimal jzc;
  /**
   * 发热量(cal/g)
   */
  private BigDecimal frl;
  /**
   * 发热量偏差
   */
  private BigDecimal frlPc;
  /**
   * 中损比较符
   */
  private String zsBjf;
  /**
   * 中损
   */
  private BigDecimal zs;
  /**
   * 中损采样点
   */
  private String zsCyd;
  /**
   * 矸损比较符
   */
  private String gsBjf;
  /**
   * 矸损
   */
  private BigDecimal gs;
  /**
   * 矸损采样点
   */
  private String gsCyd;
  /**
   * 压滤煤泥灰分比较符
   */
  private String ylmnHfBjf;
  /**
   * 压滤煤泥灰分Ad%
   */
  private BigDecimal ylmnHf;
  /**
   * 压滤煤泥采样点
   */
  private String ylmnCyd;
  /**
   * 排序
   */
  private Integer sort;
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/entity/QualityPlanEntity.java
对比新文件
@@ -0,0 +1,76 @@
package com.iailab.module.pms.coalquality.modules.plan.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
/**
 * 质量计划
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("t_quality_plan")
public class QualityPlanEntity implements Serializable {
  private static final long serialVersionUID = 1L;
  /**
   * ID
   */
  @TableId(type = IdType.ASSIGN_UUID)
  private String id;
  /**
   * 编号
   */
  private String code;
  /**
   * 名称
   */
  private String name;
  /**
   * 计划类型
   */
  private String planType;
  /**
   * 煤类型
   */
  private String coalType;
  /**
   * 时间
   */
  private String sj;
  /**
   * 备注
   */
  private String bz;
  /**
   * 创建人
   */
  private String creator;
  /**
   * 创建时间
   */
  private java.util.Date createDate;
  /**
   * 修改人
   */
  private String updater;
  /**
   * 修改时间
   */
  private java.util.Date updateDate;
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/QualityPlanDetService.java
对比新文件
@@ -0,0 +1,32 @@
package com.iailab.module.pms.coalquality.modules.plan.service;
import com.iailab.framework.common.service.BaseService;
import com.iailab.module.pms.coalquality.modules.plan.dto.QualityPlanDetDTO;
import com.iailab.module.pms.coalquality.modules.plan.entity.QualityPlanDetEntity;
import java.util.List;
/**
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:43:00
 */
public interface QualityPlanDetService extends BaseService<QualityPlanDetEntity> {
    QualityPlanDetDTO get(String id);
    void save(QualityPlanDetDTO dto);
    void update(QualityPlanDetDTO dto);
    void delete(String[] ids);
    List<QualityPlanDetDTO> getListByPlanId(String planId);
    void saveList(List<QualityPlanDetDTO> dtoList, String planId);
    void deleteByPlanId(String planId);
    void deleteByPlanIds(String[] planIds);
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/QualityPlanService.java
对比新文件
@@ -0,0 +1,28 @@
package com.iailab.module.pms.coalquality.modules.plan.service;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.common.service.BaseService;
import com.iailab.module.pms.coalquality.modules.plan.dto.QualityPlanDTO;
import com.iailab.module.pms.coalquality.modules.plan.entity.QualityPlanEntity;
import com.iailab.module.pms.coalquality.modules.plan.vo.PlanMonthPageReqVO;
/**
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:43:00
 */
public interface QualityPlanService extends BaseService<QualityPlanEntity> {
    PageResult<QualityPlanDTO> page(PlanMonthPageReqVO planMonthPageReqVO);
    QualityPlanDTO get(String id);
    void save(QualityPlanDTO dto);
    void update(QualityPlanDTO dto);
    void delete(String[] ids);
    Long cheack(QualityPlanDTO dto);
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/impl/QualityPlanDetServiceImpl.java
对比新文件
@@ -0,0 +1,79 @@
package com.iailab.module.pms.coalquality.modules.plan.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.module.pms.coalquality.modules.plan.dao.QualityPlanDetDao;
import com.iailab.module.pms.coalquality.modules.plan.dto.QualityPlanDetDTO;
import com.iailab.module.pms.coalquality.modules.plan.entity.QualityPlanDetEntity;
import com.iailab.module.pms.coalquality.modules.plan.service.QualityPlanDetService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
/**
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:45:00
 */
@Service
public class QualityPlanDetServiceImpl extends BaseServiceImpl<QualityPlanDetDao, QualityPlanDetEntity>
        implements QualityPlanDetService {
    @Override
    public QualityPlanDetDTO get(String id) {
        QualityPlanDetEntity entity = baseDao.selectById(id);
        return ConvertUtils.sourceToTarget(entity, QualityPlanDetDTO.class);
    }
    @Override
    public void save(QualityPlanDetDTO dto) {
        QualityPlanDetEntity entity = ConvertUtils.sourceToTarget(dto, QualityPlanDetEntity.class);
        insert(entity);
    }
    @Override
    public void update(QualityPlanDetDTO dto) {
        QualityPlanDetEntity entity = ConvertUtils.sourceToTarget(dto, QualityPlanDetEntity.class);
        updateById(entity);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void delete(String[] ids) {
        baseDao.deleteByIds(Arrays.asList(ids));
    }
    @Override
    public List<QualityPlanDetDTO> getListByPlanId(String planId) {
        List<QualityPlanDetEntity> list = baseDao.selectList(
                new QueryWrapper<QualityPlanDetEntity>().eq("plan_id", planId)
                .orderByAsc("sort"));
        return ConvertUtils.sourceToTarget(list, QualityPlanDetDTO.class);
    }
    @Override
    public void saveList(List<QualityPlanDetDTO> dtoList, String planId) {
        for(int i = 0; i < dtoList.size(); i++) {
            QualityPlanDetDTO item = dtoList.get(i);
            item.setPlanId(planId);
            item.setSort(i);
        }
        dtoList.forEach(this::save);
    }
    @Override
    public void deleteByPlanId(String planId) {
        baseDao.delete(new QueryWrapper<QualityPlanDetEntity>().eq("plan_id", planId));
    }
    @Override
    public void deleteByPlanIds(String[] planIds) {
        baseDao.delete(new QueryWrapper<QualityPlanDetEntity>().in("plan_id", Arrays.asList(planIds)));
    }
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/service/impl/QualityPlanServiceImpl.java
对比新文件
@@ -0,0 +1,105 @@
package com.iailab.module.pms.coalquality.modules.plan.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.BeanUtils;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.module.pms.coalquality.modules.plan.dao.QualityPlanDao;
import com.iailab.module.pms.coalquality.modules.plan.dto.QualityPlanDTO;
import com.iailab.module.pms.coalquality.modules.plan.dto.QualityPlanDetDTO;
import com.iailab.module.pms.coalquality.modules.plan.entity.QualityPlanEntity;
import com.iailab.module.pms.coalquality.modules.plan.service.QualityPlanDetService;
import com.iailab.module.pms.coalquality.modules.plan.service.QualityPlanService;
import com.iailab.module.pms.coalquality.modules.plan.vo.PlanMonthPageReqVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
 * 质量计划
 *
 * @author PanZhibao
 * @Description
 * @createTime 2023年02月04日 14:45:00
 */
@Service
public class QualityPlanServiceImpl extends BaseServiceImpl<QualityPlanDao, QualityPlanEntity>
        implements QualityPlanService {
    @Autowired
    private QualityPlanDetService qualityPlanDetService;
    private String BUSINESS_CODE = "QualityPlan";
    @Override
    public PageResult<QualityPlanDTO> page(PlanMonthPageReqVO planMonthPageReqVO) {
        PageResult<QualityPlanEntity> page = baseDao.selectPage(planMonthPageReqVO);
        return BeanUtils.toBean(page, QualityPlanDTO.class);
    }
    @Override
    public QualityPlanDTO get(String id) {
        QualityPlanEntity entity = baseDao.selectById(id);
        QualityPlanDTO result = ConvertUtils.sourceToTarget(entity, QualityPlanDTO.class);
        result.setDetList(qualityPlanDetService.getListByPlanId(id));
        return result;
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void save(QualityPlanDTO dto) {
//        dto.setCode(serialNumUtils.getByBusinessDate(BUSINESS_CODE, new Date(), 4));
        QualityPlanEntity entity = ConvertUtils.sourceToTarget(dto, QualityPlanEntity.class);
        entity.setId(UUID.randomUUID().toString());
        entity.setCreateDate(new Date());
//        entity.setCreator(SecurityUser.getUser().getId().toString());
        insert(entity);
        List<QualityPlanDetDTO> detList = dto.getDetList();
        if (!CollectionUtils.isEmpty(detList)) {
            qualityPlanDetService.saveList(detList, entity.getId());
        }
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void update(QualityPlanDTO dto) {
        QualityPlanEntity entity = ConvertUtils.sourceToTarget(dto, QualityPlanEntity.class);
        entity.setUpdateDate(new Date());
//        entity.setUpdater(SecurityUser.getUserId().toString());
        updateById(entity);
        List<QualityPlanDetDTO> detList = dto.getDetList();
        if (!CollectionUtils.isEmpty(detList)) {
            qualityPlanDetService.deleteByPlanId(entity.getId());
            qualityPlanDetService.saveList(detList, entity.getId());
        }
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void delete(String[] ids) {
        baseDao.deleteByIds(Arrays.asList(ids));
        qualityPlanDetService.deleteByPlanIds(ids);
    }
    @Override
    public Long cheack(QualityPlanDTO dto) {
        String id = dto.getId();
        String code = dto.getCode();
        QueryWrapper<QualityPlanEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.ne(StringUtils.isNotBlank(id), "id", id);
        queryWrapper.and(wrapper -> wrapper.eq("code", code));
        return baseDao.selectCount(queryWrapper);
    }
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/plan/vo/PlanMonthPageReqVO.java
对比新文件
@@ -0,0 +1,33 @@
package com.iailab.module.pms.coalquality.modules.plan.vo;
import com.iailab.framework.common.pojo.PageParam;
import lombok.Data;
/**
 * 原子指标
 *
 * @author PanZhibao
 * @Description
 * @createTime 2024年09月11日
 */
@Data
public class PlanMonthPageReqVO extends PageParam {
    /**
     * 流水号
     */
    private String code;
    /**
     * 计划类型
     */
    private String planType;
    /**
     * 煤种类型
     */
    private String coalType;
    /**
     * 时间
     */
    private String sj;
}
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java
@@ -3,12 +3,6 @@
import com.iailab.framework.common.annotation.AutoDict;
import com.iailab.framework.common.pojo.CommonResult;
import com.iailab.framework.common.pojo.PageResult;
import com.iailab.iems.common.utils.Result;
import com.iailab.iems.common.validator.AssertUtils;
import com.iailab.iems.common.validator.ValidatorUtils;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.DefaultGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import com.iailab.module.pms.coalquality.modules.wash.dto.QualityWashTargetDTO;
import com.iailab.module.pms.coalquality.modules.wash.service.QualityWashTargetService;
import com.iailab.module.pms.coalquality.modules.wash.vo.WashTargetPageReqVO;
@@ -41,16 +35,14 @@
    @GetMapping("/get")
    @Operation(summary = "信息")
    public Result<QualityWashTargetDTO> get(String id) {
    public CommonResult<QualityWashTargetDTO> get(String id) {
        QualityWashTargetDTO data = qualityWashTargetService.get(id);
        return new Result<QualityWashTargetDTO>().ok(data);
        return success(data);
    }
    @PostMapping
    @Operation(summary = "保存")
    public CommonResult<Boolean> save(@RequestBody QualityWashTargetDTO dto) {
        //效验数据
        ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
        qualityWashTargetService.save(dto);
@@ -60,9 +52,6 @@
    @PutMapping
    @Operation(summary = "修改")
    public CommonResult<Boolean> update(@RequestBody QualityWashTargetDTO dto) {
        //效验数据
        ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
        qualityWashTargetService.update(dto);
        return success(true);
@@ -71,8 +60,6 @@
    @DeleteMapping
    @Operation(summary = "删除")
    public CommonResult<Boolean> delete(@RequestBody String[] ids) {
        //效验数据
        AssertUtils.isArrayEmpty(ids, "id");
        qualityWashTargetService.delete(ids);
iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/dto/QualityWashTargetDTO.java
@@ -1,14 +1,9 @@
package com.iailab.module.pms.coalquality.modules.wash.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.iailab.iems.common.annotation.Dict;
import com.iailab.iems.common.validator.group.AddGroup;
import com.iailab.iems.common.validator.group.UpdateGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import java.io.Serializable;
import java.math.BigDecimal;
@@ -23,8 +18,6 @@
    private static final long serialVersionUID = 1L;
    @Schema(description = "id")
    @Null(message="{id.null}", groups = AddGroup.class)
    @NotNull(message="{id.require}", groups = UpdateGroup.class)
    private String id;
    @Schema(description = "年月")
@@ -33,7 +26,6 @@
    @Schema(description = "煤种")
    private String mz;
    @Dict(dicCode = "ymmz", itemValue = "mz")
    @Schema(description = "煤种")
    private String mzName;