“djh”
2 days ago 2d9bf42ce507096c3b73a782da3ad16f29d2ccdc
新增年份查询
57 files modified
403 ■■■■■ changed files
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/InconsistentController.java 5 ●●●●● patch | view | raw | blame | history
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/MeetingsController.java 5 ●●●●● patch | view | raw | blame | history
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/SupplierSureController.java 13 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/AnnualMaintenanceEvaluate.java 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/AnnualMaintenanceRecord.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/AnnualMaintenanceService.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/CalibrationMonitoringEquipment.java 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/InspectionRecord.java 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/InspectionSpecification.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditEvaluate.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditPerson.java 7 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/Material.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/MonthlyInspection.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedCommon.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedProduct.java 5 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedReview.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedUnqualified.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/PerformanceEvaluation.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/PurchaseApply.java 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/PurchaseContract.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/QualityInformationExterior.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/QualityInformationInside.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/SupplierSure.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/domain/WarehousingRecord.java 6 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/mapper/InconsistentMapper.java 3 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/mapper/MeetingsMapper.java 3 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/InconsistentService.java 2 ●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/MeetingsService.java 2 ●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/SupplierSureService.java 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExQuestionServiceImpl.java 10 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/impl/InconsistentServiceImpl.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/impl/MeetingsServiceImpl.java 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/impl/PurchaseApplyServiceImpl.java 19 ●●●●● patch | view | raw | blame | history
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SupplierSureServiceImpl.java 167 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/AnnualMaintenanceEvaluateMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/AnnualMaintenanceRecordMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/AnnualMaintenanceServiceMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/CalibrationMonitoringEquipmentMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/InconsistentMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/InspectionRecordMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/InspectionSpecificationMapper.xml 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/InternalAuditEvaluateMapper.xml 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/InternalAuditPersonMapper.xml 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/MaterialMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/MeetingsMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/MonthlyInspectionMapper.xml 5 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/OutsourcedCommonMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/OutsourcedProductMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/OutsourcedReviewMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/OutsourcedUnqualifiedMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/PerformanceEvaluationMapper.xml 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/PurchaseApplyMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/PurchaseContractMapper.xml 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/QualityInformationExteriorMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/QualityInformationInsideMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/SupplierSureMapper.xml 4 ●●●● patch | view | raw | blame | history
multi-system/src/main/resources/mapper/system/WarehousingRecordMapper.xml 3 ●●●●● patch | view | raw | blame | history
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/InconsistentController.java
@@ -34,10 +34,11 @@
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司id"),
            @ApiImplicitParam(paramType = "query", name = "year", dataType = "String", required = false, value = "年份"),
    })
    @GetMapping("/selectInconsistentList")
    public CommonResult selectInconsistentList(Integer companyId){
        return CommonResult.success(inconsistentService.selectInconsistentList(companyId));
    public CommonResult selectInconsistentList(Integer companyId,String year){
        return CommonResult.success(inconsistentService.selectInconsistentList(companyId,year));
    }
    @RepeatSubmit
    @ApiOperation(value = "新增不符合项管理")
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/MeetingsController.java
@@ -34,10 +34,11 @@
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司id"),
            @ApiImplicitParam(paramType = "query", name = "year", dataType = "String", required = false, value = "年份"),
    })
    @GetMapping("/selectMeetingsList")
    public CommonResult selectMeetingsList(Integer companyId){
        return CommonResult.success(meetingsService.selectMeetingsList(companyId));
    public CommonResult selectMeetingsList(Integer companyId,String year){
        return CommonResult.success(meetingsService.selectMeetingsList(companyId,year));
    }
    @RepeatSubmit
    @ApiOperation(value = "新增会议管理")
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/SupplierSureController.java
@@ -83,6 +83,19 @@
        return sureService.deletedSupplier(supplierId);
    }
    @ApiOperation(value = "合格供应商一键复制")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司id,不传则使用当前登录用户公司"),
            @ApiImplicitParam(paramType = "query", name = "sourceYear", dataType = "String", required = true, value = "源年份"),
            @ApiImplicitParam(paramType = "query", name = "targetYear", dataType = "String", required = true, value = "目标年份"),
    })
    @GetMapping("/copy")
    public CommonResult copySupplierSure(
            @RequestParam(required = false) Integer companyId,
            @RequestParam("sourceYear") String sourceYear,
            @RequestParam("targetYear") String targetYear) {
        return sureService.copySupplierSure(companyId, sourceYear, targetYear);
    }
    /**
     * 合格供应商证书列表
multi-system/src/main/java/com/gkhy/exam/system/domain/AnnualMaintenanceEvaluate.java
@@ -127,5 +127,8 @@
    @ApiModelProperty(value = "企业名称")
    private String companyName;
    @TableField(exist = false)
    private String year;
}
multi-system/src/main/java/com/gkhy/exam/system/domain/AnnualMaintenanceRecord.java
@@ -194,5 +194,9 @@
    @TableField(exist = false)
    private List<Long> delRecordUserIds;
    @ApiModelProperty("年度")
    @TableField(exist = false)
    private String year;
}
multi-system/src/main/java/com/gkhy/exam/system/domain/AnnualMaintenanceService.java
@@ -39,6 +39,10 @@
    @NotNull(message = "企业id不能为空")
    private Integer companyId;
    @ApiModelProperty(value = "保养年份")
    @TableField("year")
    private String year;
    @ApiModelProperty(value ="设备名称", required = true)
    @TableField("device_name")
    @NotBlank(message = "设备名称不能为空")
multi-system/src/main/java/com/gkhy/exam/system/domain/CalibrationMonitoringEquipment.java
@@ -113,4 +113,7 @@
    private Integer version;
    @TableField(exist = false)
    private String year;
}
multi-system/src/main/java/com/gkhy/exam/system/domain/InspectionRecord.java
@@ -31,6 +31,9 @@
    @TableField(exist = false)
    private String companyName;
    @TableField(exist = false)
    private String year;
    @ApiModelProperty(value = "记录名称")
    @TableField("record_name")
    private String recordName;
multi-system/src/main/java/com/gkhy/exam/system/domain/InspectionSpecification.java
@@ -30,6 +30,10 @@
    @TableField(exist = false)
    private String companyName;
    @ApiModelProperty(value = "年")
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "文件名称")
    @TableField("file_name")
    private String fileName;
multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditEvaluate.java
@@ -24,6 +24,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "年度")
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "企业名称")
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/InternalAuditPerson.java
@@ -23,6 +23,13 @@
    @ApiModelProperty(value = "企业id",required = true)
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "年份")
    @TableField("year")
    private String year;
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/Material.java
@@ -37,6 +37,10 @@
    @NotNull(message = "公司ID不能为空")
    private Long companyId;
    @ApiModelProperty(value = "年份", required = true)
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "名称", required = true)
    @TableField("material_name")
    @NotBlank(message = "名称不能为空")
multi-system/src/main/java/com/gkhy/exam/system/domain/MonthlyInspection.java
@@ -25,6 +25,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "年")
    @TableField("year")
    private String year;
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedCommon.java
@@ -37,6 +37,10 @@
    @NotNull(message = "公司id不能为空")
    private Long companyId;
    @ApiModelProperty(value = "年份")
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "供应商id",required = true)
    @TableField("supplier_id")
    @NotNull(message = "供应商id不能为空")
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedProduct.java
@@ -38,6 +38,11 @@
    @NotNull(message = "公司id不能为空")
    private Long companyId;
    @ApiModelProperty(value = "年份",required = true)
    @TableField("year")
    @NotNull(message = "年份不能为空")
    private String year;
    @ApiModelProperty(value = "供应商id",required = true)
    @TableField("supplier_id")
    @NotNull(message = "供应商id不能为空")
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedReview.java
@@ -36,6 +36,10 @@
    @NotNull(message = "公司id不能为空")
    private Long companyId;
    @ApiModelProperty(value = "年")
    @TableField(exist = false)
    private String year;
    @ApiModelProperty(value = "评审名称",required = true)
    @TableField("review_name")
    @NotBlank(message = "评审名称不能为空")
multi-system/src/main/java/com/gkhy/exam/system/domain/OutsourcedUnqualified.java
@@ -38,6 +38,10 @@
    @NotNull(message = "公司id不能为空")
    private Long companyId;
    @ApiModelProperty(value = "年份")
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "供应商id",required = true)
    @TableField("supplier_id")
    @NotNull(message = "供应商id不能为空")
multi-system/src/main/java/com/gkhy/exam/system/domain/PerformanceEvaluation.java
@@ -30,6 +30,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "年度")
    @TableField("year")
    private String year;
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/PurchaseApply.java
@@ -28,6 +28,9 @@
    @TableField("company_id")
    private Integer companyId;
    @TableField(exist = false)
    private String year;
    @ApiModelProperty(value = "企业名称")
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/PurchaseContract.java
@@ -27,6 +27,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "年份")
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "企业名称")
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/QualityInformationExterior.java
@@ -28,6 +28,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "反馈单所属年")
    @TableField(exist = false)
    private String year;
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/QualityInformationInside.java
@@ -30,6 +30,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "反馈单所属年")
    @TableField(exist = false)
    private String year;
    @TableField(exist = false)
    private String companyName;
multi-system/src/main/java/com/gkhy/exam/system/domain/SupplierSure.java
@@ -24,6 +24,10 @@
    @TableField("company_id")
    private Integer companyId;
    @ApiModelProperty(value = "供应商年份")
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "供应商名称")
    @TableField("supplier_name")
    private String supplierName;
multi-system/src/main/java/com/gkhy/exam/system/domain/WarehousingRecord.java
@@ -36,6 +36,10 @@
    @NotNull(message = "公司id不能为空")
    private Long companyId;
    @ApiModelProperty(value = "年份",required = true)
    @TableField("year")
    private String year;
    @ApiModelProperty(value = "物料id",required = true)
    @TableField("material_id")
    @NotNull(message = "物料id不能为空")
@@ -84,4 +88,6 @@
    @TableField(exist = false)
    private List<Long> delDetails;
}
multi-system/src/main/java/com/gkhy/exam/system/mapper/InconsistentMapper.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.exam.system.domain.Inconsistent;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -17,6 +18,6 @@
@Mapper
public interface InconsistentMapper extends BaseMapper<Inconsistent> {
    List<Inconsistent> selectInconsistentList(Integer companyId);
    List<Inconsistent> selectInconsistentList(@Param("companyId") Integer companyId, @Param("year") String year);
}
multi-system/src/main/java/com/gkhy/exam/system/mapper/MeetingsMapper.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gkhy.exam.system.domain.Meetings;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -16,6 +17,6 @@
 */
@Mapper
public interface MeetingsMapper extends BaseMapper<Meetings> {
    List<Meetings> selectMeetingsList(Integer companyId);
    List<Meetings> selectMeetingsList(@Param("companyId") Integer companyId, @Param("year") String year);
}
multi-system/src/main/java/com/gkhy/exam/system/service/InconsistentService.java
@@ -14,7 +14,7 @@
 * @since 2025-07-10 15:11:50
 */
public interface InconsistentService extends IService<Inconsistent> {
    CommonPage selectInconsistentList(Integer companyId);
    CommonPage selectInconsistentList(Integer companyId,String year);
    CommonResult insertInconsistent(Inconsistent inconsistent);
multi-system/src/main/java/com/gkhy/exam/system/service/MeetingsService.java
@@ -14,7 +14,7 @@
 * @since 2025-07-10 15:11:50
 */
public interface MeetingsService extends IService<Meetings> {
    CommonPage selectMeetingsList(Integer companyId);
    CommonPage selectMeetingsList(Integer companyId,String year);
    CommonResult insertMeetings(Meetings meetings);
multi-system/src/main/java/com/gkhy/exam/system/service/SupplierSureService.java
@@ -13,4 +13,7 @@
    CommonResult updateSupplier(SupplierSure sure);
    CommonResult deletedSupplier(Integer supplierId);
    CommonResult copySupplierSure(Integer companyId, String sourceYear, String targetYear);
}
multi-system/src/main/java/com/gkhy/exam/system/service/impl/ExQuestionServiceImpl.java
@@ -208,11 +208,11 @@
            }
            ExExamPaper examPaper = examPaperMapper.selectById(paperStudent.getPaperId());
            if(examPaper.getLimited()==1){
                if(paperStudent.getStartTime()!=null && (currentDateTime-paperStudent.getStartTime()>=examPaper.getLimitTime()*60*1000)){
//                    paperStudent.setCompleted(1);
//                    paperStudentMapper.updateById(paperStudent);
                    throw new ApiException("考试已超时,不能再考试");
                }
//                if(paperStudent.getStartTime()!=null && (currentDateTime-paperStudent.getStartTime()>=examPaper.getLimitTime()*60*1000)){
////                    paperStudent.setCompleted(1);
////                    paperStudentMapper.updateById(paperStudent);
//                    throw new ApiException("考试已超时,不能再考试");
//                }
                LocalDateTime deadline = examPaper.getDeadline();
                if(currentDateTime-deadline.toInstant(ZoneOffset.of("+8")).toEpochMilli()>0){
//                    paperStudent.setCompleted(1);
multi-system/src/main/java/com/gkhy/exam/system/service/impl/InconsistentServiceImpl.java
@@ -28,9 +28,9 @@
    @Autowired
    private InconsistentMapper inconsistentMapper;
    @Override
    public CommonPage selectInconsistentList(Integer companyId) {
    public CommonPage selectInconsistentList(Integer companyId,String year) {
        PageUtils.startPage();
        List<Inconsistent> inconsistents = inconsistentMapper.selectInconsistentList(companyId);
        List<Inconsistent> inconsistents = inconsistentMapper.selectInconsistentList(companyId,year);
        return CommonPage.restPage(inconsistents);
    }
multi-system/src/main/java/com/gkhy/exam/system/service/impl/MeetingsServiceImpl.java
@@ -28,9 +28,9 @@
    @Autowired
    private MeetingsMapper meetingsMapper;
    @Override
    public CommonPage selectMeetingsList(Integer companyId) {
    public CommonPage selectMeetingsList(Integer companyId,String year) {
        PageUtils.startPage();
        List<Meetings> meetings = meetingsMapper.selectMeetingsList(companyId);
        List<Meetings> meetings = meetingsMapper.selectMeetingsList(companyId,year);
        return CommonPage.restPage(meetings);
    }
multi-system/src/main/java/com/gkhy/exam/system/service/impl/PurchaseApplyServiceImpl.java
@@ -13,6 +13,7 @@
import com.gkhy.exam.system.service.PurchaseApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.time.LocalDateTime;
import java.util.List;
@@ -47,11 +48,13 @@
        purchaseApply.setCreateTime(LocalDateTime.now());
        purchaseApply.setCreateBy(SecurityUtils.getUsername());
        applyMapper.insert(purchaseApply);
        List<PurchaseApplyPlan> purchaseApplyPlans = purchaseApply.getPurchaseApplyPlans();
        for (PurchaseApplyPlan purchaseApplyPlan : purchaseApplyPlans) {
            purchaseApplyPlan.setApplyId(purchaseApply.getId());
        if (!CollectionUtils.isEmpty(purchaseApply.getPurchaseApplyPlans())){
            List<PurchaseApplyPlan> purchaseApplyPlans = purchaseApply.getPurchaseApplyPlans();
            for (PurchaseApplyPlan purchaseApplyPlan : purchaseApplyPlans) {
                purchaseApplyPlan.setApplyId(purchaseApply.getId());
            }
            applyPlanMapper.insertPlans(purchaseApplyPlans);
        }
        applyPlanMapper.insertPlans(purchaseApplyPlans);
        return CommonResult.success();
    }
@@ -60,9 +63,11 @@
        purchaseApply.setUpdateTime(LocalDateTime.now());
        purchaseApply.setUpdateBy(SecurityUtils.getUsername());
        applyMapper.updateById(purchaseApply);
        List<PurchaseApplyPlan> purchaseApplyPlans = purchaseApply.getPurchaseApplyPlans();
        applyPlanMapper.deletedByIds(purchaseApply.getId());
        applyPlanMapper.insertPlans(purchaseApplyPlans);
        if (!CollectionUtils.isEmpty(purchaseApply.getPurchaseApplyPlans())){
            List<PurchaseApplyPlan> purchaseApplyPlans = purchaseApply.getPurchaseApplyPlans();
            applyPlanMapper.deletedByIds(purchaseApply.getId());
            applyPlanMapper.insertPlans(purchaseApplyPlans);
        }
        return CommonResult.success();
    }
multi-system/src/main/java/com/gkhy/exam/system/service/impl/SupplierSureServiceImpl.java
@@ -1,5 +1,6 @@
package com.gkhy.exam.system.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.exam.common.api.CommonPage;
import com.gkhy.exam.common.api.CommonResult;
@@ -7,12 +8,17 @@
import com.gkhy.exam.common.utils.PageUtils;
import com.gkhy.exam.common.utils.SecurityUtils;
import com.gkhy.exam.system.domain.SupplierSure;
import com.gkhy.exam.system.domain.SupplierSureCertifity;
import com.gkhy.exam.system.domain.SupplierSurePerformance;
import com.gkhy.exam.system.domain.SupplierSureQuality;
import com.gkhy.exam.system.mapper.SupplierSureCertifityMapper;
import com.gkhy.exam.system.mapper.SupplierSureMapper;
import com.gkhy.exam.system.mapper.SupplierSurePerformanceMapper;
import com.gkhy.exam.system.mapper.SupplierSureQualityMapper;
import com.gkhy.exam.system.service.SupplierSureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.List;
@@ -26,6 +32,8 @@
    private SupplierSurePerformanceMapper performanceMapper;
    @Autowired
    private SupplierSureQualityMapper qualityMapper;
    @Autowired
    private SupplierSureCertifityMapper certifityMapper;
    @Override
    public CommonPage selectSupplierList(SupplierSure sure) {
@@ -67,4 +75,163 @@
        supplierSureMapper.updateById(supplierSure);
        return CommonResult.success();
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public CommonResult copySupplierSure(Integer companyId, String sourceYear, String targetYear) {
        if (companyId == null) {
            companyId = Math.toIntExact(SecurityUtils.getCompanyId());
        }
        if (sourceYear == null || sourceYear.isEmpty()) {
            return CommonResult.failed("源年份不能为空");
        }
        if (targetYear == null || targetYear.isEmpty()) {
            return CommonResult.failed("目标年份不能为空");
        }
        String currentUsername = SecurityUtils.getUsername();
        LocalDateTime now = LocalDateTime.now();
        LambdaQueryWrapper<SupplierSure> targetQueryWrapper =
                new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<>();
        targetQueryWrapper.eq(SupplierSure::getCompanyId, companyId)
                .eq(SupplierSure::getYear, targetYear)
                .eq(SupplierSure::getDelFlag, 1);
        List<SupplierSure> targetSuppliers = supplierSureMapper.selectList(targetQueryWrapper);
        if (targetSuppliers != null && !targetSuppliers.isEmpty()) {
            for (SupplierSure targetSupplier : targetSuppliers) {
                Integer targetSupplierId = targetSupplier.getId();
                SupplierSure deleteSupplier = new SupplierSure();
                deleteSupplier.setId(targetSupplierId);
                deleteSupplier.setDelFlag(2);
                deleteSupplier.setUpdateTime(now);
                deleteSupplier.setUpdateBy(currentUsername);
                supplierSureMapper.updateById(deleteSupplier);
            }
        }
        LambdaQueryWrapper<SupplierSure> sourceQueryWrapper =
                new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<>();
        sourceQueryWrapper.eq(SupplierSure::getCompanyId, companyId)
                .eq(SupplierSure::getYear, sourceYear)
                .eq(SupplierSure::getDelFlag, 1);
        List<SupplierSure> sourceSuppliers = supplierSureMapper.selectList(sourceQueryWrapper);
        if (sourceSuppliers == null || sourceSuppliers.isEmpty()) {
            return CommonResult.failed("源年份没有可复制的数据");
        }
        for (SupplierSure sourceSupplier : sourceSuppliers) {
            Integer oldSupplierId = sourceSupplier.getId();
            SupplierSure newSupplier = new SupplierSure();
            newSupplier.setCompanyId(sourceSupplier.getCompanyId());
            newSupplier.setYear(targetYear);
            newSupplier.setSupplierName(sourceSupplier.getSupplierName());
            newSupplier.setSupplierAddr(sourceSupplier.getSupplierAddr());
            newSupplier.setMerito(sourceSupplier.getMerito());
            newSupplier.setUser(sourceSupplier.getUser());
            newSupplier.setPhone(sourceSupplier.getPhone());
            newSupplier.setRemark(sourceSupplier.getRemark());
            newSupplier.setDelFlag(1);
            newSupplier.setCreateBy(currentUsername);
            newSupplier.setCreateTime(now);
            newSupplier.setUpdateBy(currentUsername);
            newSupplier.setUpdateTime(now);
            supplierSureMapper.insert(newSupplier);
            Integer newSupplierId = newSupplier.getId();
            LambdaQueryWrapper<SupplierSureCertifity> certifityQueryWrapper =
                    new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<>();
            certifityQueryWrapper.eq(SupplierSureCertifity::getSupplierSureId, oldSupplierId)
                    .eq(SupplierSureCertifity::getDelFlag, 1);
            List<SupplierSureCertifity> certifities = certifityMapper.selectList(certifityQueryWrapper);
            if (certifities != null && !certifities.isEmpty()) {
                for (SupplierSureCertifity certifity : certifities) {
                    SupplierSureCertifity newCertifity = new SupplierSureCertifity();
                    newCertifity.setSupplierSureId(newSupplierId);
                    newCertifity.setCertifityName(certifity.getCertifityName());
                    newCertifity.setFilePath(certifity.getFilePath());
                    newCertifity.setDelFlag(1);
                    certifityMapper.insert(newCertifity);
                }
            }
            LambdaQueryWrapper<SupplierSureQuality> qualityQueryWrapper =
                    new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<>();
            qualityQueryWrapper.eq(SupplierSureQuality::getSupplierSureId, oldSupplierId);
            List<SupplierSureQuality> qualities = qualityMapper.selectList(qualityQueryWrapper);
            if (qualities != null && !qualities.isEmpty()) {
                for (SupplierSureQuality quality : qualities) {
                    SupplierSureQuality newQuality = new SupplierSureQuality();
                    newQuality.setSupplierSureId(newSupplierId);
                    newQuality.setName(quality.getName());
                    newQuality.setAddress(quality.getAddress());
                    newQuality.setPerson(quality.getPerson());
                    newQuality.setEmil(quality.getEmil());
                    newQuality.setPhone(quality.getPhone());
                    newQuality.setTrait(quality.getTrait());
                    newQuality.setFacility(quality.getFacility());
                    newQuality.setCraft(quality.getCraft());
                    newQuality.setDevelop(quality.getDevelop());
                    newQuality.setTeamWork(quality.getTeamWork());
                    newQuality.setQualification(quality.getQualification());
                    newQuality.setOtherQualifi(quality.getOtherQualifi());
                    newQuality.setOtherDate(quality.getOtherDate());
                    newQuality.setProduct(quality.getProduct());
                    newQuality.setOtherProduct(quality.getOtherProduct());
                    newQuality.setCompanyMess(quality.getCompanyMess());
                    newQuality.setChargeName(quality.getChargeName());
                    newQuality.setChargeTime(now);
                    qualityMapper.insert(newQuality);
                }
            }
            LambdaQueryWrapper<SupplierSurePerformance> performanceQueryWrapper =
                    new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<>();
            performanceQueryWrapper.eq(SupplierSurePerformance::getSupplierSureId, oldSupplierId);
            List<SupplierSurePerformance> performances = performanceMapper.selectList(performanceQueryWrapper);
            if (performances != null && !performances.isEmpty()) {
                for (SupplierSurePerformance performance : performances) {
                    SupplierSurePerformance newPerformance = new SupplierSurePerformance();
                    newPerformance.setSupplierSureId(newSupplierId);
                    newPerformance.setName(performance.getName());
                    newPerformance.setAddress(performance.getAddress());
                    newPerformance.setPeople(performance.getPeople());
                    newPerformance.setPhone(performance.getPhone());
                    newPerformance.setEmil(performance.getEmil());
                    newPerformance.setProduct(performance.getProduct());
                    newPerformance.setType(performance.getType());
                    newPerformance.setGist(performance.getGist());
                    newPerformance.setVerify(performance.getVerify());
                    newPerformance.setP1(performance.getP1());
                    newPerformance.setP2(performance.getP2());
                    newPerformance.setP3(performance.getP3());
                    newPerformance.setP4(performance.getP4());
                    newPerformance.setP5(performance.getP5());
                    newPerformance.setP6(performance.getP6());
                    newPerformance.setOpinion(performance.getOpinion());
                    newPerformance.setReviewUsers(performance.getReviewUsers());
                    newPerformance.setReviewTime(now);
                    newPerformance.setReviewMess(performance.getReviewMess());
                    newPerformance.setCheckId(performance.getCheckId());
                    newPerformance.setCheckTime(now);
                    performanceMapper.insert(newPerformance);
                }
            }
        }
        return CommonResult.success("复制成功");
    }
}
multi-system/src/main/resources/mapper/system/AnnualMaintenanceEvaluateMapper.xml
@@ -11,6 +11,9 @@
        <if test="companyId != null">
            and a.company_id = #{companyId}
        </if>
        <if test="year!=null and year!=''">
            and YEAR(a.enactment_date) = #{year}
        </if>
        order by a.create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/AnnualMaintenanceRecordMapper.xml
@@ -12,6 +12,9 @@
        <if test="companyId != null">
            and a.company_id = #{companyId}
        </if>
        <if test="year!=null and year !=''">
            and YEAR(a.fault_date) = #{year}
        </if>
        order by a.create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/AnnualMaintenanceServiceMapper.xml
@@ -9,6 +9,9 @@
        <if test="companyId != null">
            and company_id = #{companyId}
        </if>
        <if test="year!=null and year!=''">
            and `year` = #{year}
        </if>
        order by create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/CalibrationMonitoringEquipmentMapper.xml
@@ -9,6 +9,9 @@
        <if test="companyId!=null ">
            and company_id = #{companyId}
        </if>
        <if test="year!=null and year !=''">
            and YEAR( calibration_time ) = #{year}
        </if>
        order by create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/InconsistentMapper.xml
@@ -20,6 +20,9 @@
                <if test="companyId != null">
                    and company_id = #{companyId}
                </if>
                <if test="year != null and year !=''">
                    and `year` = #{year}
                </if>
        order by create_time desc
    </select>
multi-system/src/main/resources/mapper/system/InspectionRecordMapper.xml
@@ -27,6 +27,9 @@
        <if test="companyId !=null">
            and ir.company_id = #{companyId}
        </if>
        <if test="year!=null and year !=''">
            and YEAR(ir.`sign_time`) = #{year}
        </if>
        ORDER BY
            ir.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/InspectionSpecificationMapper.xml
@@ -6,6 +6,7 @@
        SELECT
            iss.`id`,
            iss.`company_id`,
            iss.`year`,
            sc.`name` AS company_name,
            iss.`file_name`,
            iss.`file_path`,
@@ -23,6 +24,9 @@
          <if test="companyId!=null">
              AND iss.company_id = #{companyId}
          </if>
          <if test="year!=null and year !=''">
              and iss.`year` = #{year}
          </if>
        ORDER BY
            iss.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/InternalAuditEvaluateMapper.xml
@@ -6,6 +6,7 @@
        SELECT
            iae.`id`,
            iae.`company_id`,
            iae.`year`,
            sc.`name` AS company_name,
            iae.`person_id`,
            es.`name` AS person_name,
@@ -33,6 +34,9 @@
            <if test="companyId!=null and companyId!=''">
                and iae.company_id = #{companyId}
            </if>
            <if test="year !=null and year !=''">
                and iae.`year` = #{year}
            </if>
            ORDER BY
                iae.create_time ASC
    </select>
multi-system/src/main/resources/mapper/system/InternalAuditPersonMapper.xml
@@ -6,6 +6,7 @@
        SELECT
            iap.`id`,
            iap.`company_id`,
            iap.`year`,
            sc.`name` as company_name,
            iap.`person_id`,
            es.`name` as person_name,
@@ -26,6 +27,9 @@
        <if test="companyId!=null and companyId!=''">
            and iap.company_id = #{companyId}
        </if>
        <if test="year !=null and year !=''">
            and iap.`year` = #{year}
        </if>
        ORDER BY iap.create_time ASC
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/MaterialMapper.xml
@@ -13,6 +13,9 @@
        <if test="inventory != null">
            and inventory = #{inventory}
        </if>
        <if test="year!=null and year!=''">
            and `year` = #{year}
        </if>
        order by update_time desc
    </select>
multi-system/src/main/resources/mapper/system/MeetingsMapper.xml
@@ -7,6 +7,9 @@
        <if test="companyId != null">
            and company_id = #{companyId}
        </if>
        <if test="year != null and year !=''">
            and `year` = #{year}
        </if>
        order by create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/MonthlyInspectionMapper.xml
@@ -6,6 +6,7 @@
        SELECT
            mi.`id`,
            mi.`company_id`,
            mi.`year`,
            sc.`name` AS company_name,
            mi.`record_name`,
            mi.`del_flag`,
@@ -24,6 +25,9 @@
        <if test="id!=null">
            and mi.id = #{id}
        </if>
        <if test="year!=null and year!=''">
            and mi.`year` = #{year}
        </if>
        ORDER BY
            mi.create_time DESC
    </select>
@@ -31,6 +35,7 @@
        SELECT
            mi.`id`,
            mi.`company_id`,
            mi.`year`,
            sc.`name` AS company_name,
            mi.`record_name`,
            mi.`del_flag`,
multi-system/src/main/resources/mapper/system/OutsourcedCommonMapper.xml
@@ -10,6 +10,9 @@
        <if test="companyId != null">
            and a.company_id = #{companyId}
        </if>
        <if test="year!=null and year !=''">
            and a.`year` = #{year}
        </if>
        order by a.create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/OutsourcedProductMapper.xml
@@ -10,6 +10,9 @@
        <if test="companyId != null">
            and a.company_id = #{companyId}
        </if>
        <if test="year!=null and year!=''">
            and a.`year` = #{year}
        </if>
        order by a.create_time desc
    </select>
multi-system/src/main/resources/mapper/system/OutsourcedReviewMapper.xml
@@ -8,6 +8,9 @@
        <if test="companyId != null">
            and company_id = #{companyId}
        </if>
        <if test="year!=null and year!=''">
            and YEAR(apply_dept_date) = #{year}
        </if>
        order by create_time desc
    </select>
multi-system/src/main/resources/mapper/system/OutsourcedUnqualifiedMapper.xml
@@ -11,6 +11,9 @@
        <if test="companyId != null">
            and a.company_id = #{companyId}
        </if>
        <if test="year!=null and year!=''">
            and a.`year` = #{year}
        </if>
        order by a.create_time desc
    </select>
</mapper>
multi-system/src/main/resources/mapper/system/PerformanceEvaluationMapper.xml
@@ -15,6 +15,7 @@
        SELECT
            pe.`id`,
            pe.`company_id`,
            pe.`year`,
            sc.`name` as company_name,
            pe.`evaluate_name`,
            pe.`number`,
@@ -40,6 +41,9 @@
            <if test="companyId!=null">
                and pe.company_id = #{companyId}
            </if>
            <if test="year!=null and year != ''">
                and pe.`year` = #{year}
            </if>
        ORDER BY
            pe.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/PurchaseApplyMapper.xml
@@ -36,6 +36,9 @@
          <if test="companyId!=null">
              AND pa.company_id = #{companyId}
          </if>
          <if test="year!=null and year!=''">
              and YEAR(pa.apply_time) = #{year}
          </if>
        ORDER BY
            pa.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/PurchaseContractMapper.xml
@@ -7,6 +7,7 @@
        SELECT
            pc.`id`,
            pc.`company_id`,
            pc.`year`,
            sc.`name` AS company_name,
            pc.`file_name`,
            pc.`file_path`,
@@ -23,6 +24,9 @@
          <if test="companyId!=null">
              AND pc.company_id = #{companyId}
          </if>
          <if test="year!=null and year !=''">
              AND pc.`year` = #{year}
          </if>
        ORDER BY
            pc.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/QualityInformationExteriorMapper.xml
@@ -40,6 +40,9 @@
            <if test="companyId != null">
                and qie.company_id =#{companyId}
            </if>
        <if test="year != null and year != ''">
            and YEAR(qie.offer_time) = #{year}
        </if>
        ORDER BY
            qie.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/QualityInformationInsideMapper.xml
@@ -57,6 +57,9 @@
            <if test="companyId!=null">
                and qi.company_id = #{companyId}
            </if>
        <if test="year!=null and year!=''">
            and YEAR(qi.feed_time) = #{year}
        </if>
        ORDER BY
            qi.create_time DESC
    </select>
multi-system/src/main/resources/mapper/system/SupplierSureMapper.xml
@@ -6,6 +6,7 @@
        SELECT
            ss.`id`,
            ss.`company_id`,
            ss.`year`,
            sc.`name` AS company_name,
            ss.`supplier_name`,
            ss.`supplier_addr`,
@@ -26,6 +27,9 @@
        <if test="companyId!=null and companyId!=''">
            and ss.company_id =#{companyId}
        </if>
        <if test="year!=null and year!=''">
            and ss.`year` = #{year}
        </if>
        ORDER BY
            ss.create_time ASC
multi-system/src/main/resources/mapper/system/WarehousingRecordMapper.xml
@@ -12,6 +12,9 @@
        <if test="materialId != null">
            and material_id = #{materialId}
        </if>
        <if test="year!=null and year!=''">
            and `year` = #{year}
        </if>
        order by create_time desc
    </select>
</mapper>