diff --git a/mes-framework/mes-common/src/main/java/com/chanko/yunxi/mes/framework/common/pojo/PageParam.java b/mes-framework/mes-common/src/main/java/com/chanko/yunxi/mes/framework/common/pojo/PageParam.java index cacc0d9..bf5b9ae 100644 --- a/mes-framework/mes-common/src/main/java/com/chanko/yunxi/mes/framework/common/pojo/PageParam.java +++ b/mes-framework/mes-common/src/main/java/com/chanko/yunxi/mes/framework/common/pojo/PageParam.java @@ -27,10 +27,10 @@ public class PageParam implements Serializable { @Min(value = 1, message = "页码最小值为 1") private Integer pageNo = PAGE_NO; - @Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") + @Schema(description = "每页条数,最大值为 999", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") @NotNull(message = "每页条数不能为空") @Min(value = 1, message = "每页条数最小值为 1") - @Max(value = 100, message = "每页条数最大值为 100") + @Max(value = 999, message = "每页条数最大值为 999") private Integer pageSize = PAGE_SIZE; } diff --git a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/BusinesTypeEnum.java b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/BusinesTypeEnum.java index b56a354..3646998 100644 --- a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/BusinesTypeEnum.java +++ b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/BusinesTypeEnum.java @@ -26,6 +26,7 @@ public enum BusinesTypeEnum { FINANCE_RECEIVE_INVOICE("发票接收"), FINANCE_INVOICE("财务发票"), MATERIAL("物料"), + QUOTATION_RECORD("报价记录"), ; private String description; diff --git a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java index d18bf60..768078f 100644 --- a/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java +++ b/mes-module-heli/mes-module-heli-api/src/main/java/com/chanko/yunxi/mes/module/heli/enums/ErrorCodeConstants.java @@ -106,6 +106,7 @@ public interface ErrorCodeConstants { ErrorCode TASK_DISPATCH_TASK_NOT_EXISTS = new ErrorCode(1_009_004, "任务不存在或已完成"); ErrorCode TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE = new ErrorCode(1_009_005, "任务不满足操作条件"); + ErrorCode TASK_DISPATCH_TASK_IS_OVER = new ErrorCode(1_009_007, "报工数量已完成"); ErrorCode TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS = new ErrorCode(1_009_006, "无法超额报工"); /*************质量管理***********/ ErrorCode UNQUALIFIED_NOTIFICATION_NOT_EXISTS = new ErrorCode(1_010_001, "品质异常通知单审核不存在"); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/bdgzsomthing/bdgzsomthingController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/bdgzsomthing/bdgzsomthingController.java index c030311..bc34a66 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/bdgzsomthing/bdgzsomthingController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/bdgzsomthing/bdgzsomthingController.java @@ -150,6 +150,7 @@ public class bdgzsomthingController { public void init() { selectHasPrice(); } + @Scheduled(cron = "0 0 2 * * ?") //每天十天执行一次 public void selectHasPrice(){ bdgzsomthingService.selectHasPrice(); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/MasterController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/MasterController.java index 79e7d38..c401fcc 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/MasterController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/MasterController.java @@ -1,95 +1,95 @@ -package com.chanko.yunxi.mes.module.heli.controller.admin.master; - -import org.springframework.web.bind.annotation.*; -import javax.annotation.Resource; -import org.springframework.validation.annotation.Validated; -import org.springframework.security.access.prepost.PreAuthorize; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Operation; - -import javax.validation.constraints.*; -import javax.validation.*; -import javax.servlet.http.*; -import java.util.*; -import java.io.IOException; - -import com.chanko.yunxi.mes.framework.common.pojo.PageParam; -import com.chanko.yunxi.mes.framework.common.pojo.PageResult; -import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; -import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; -import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success; - -import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils; - -import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog; -import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*; - -import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*; -import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO; -import com.chanko.yunxi.mes.module.heli.service.master.MasterService; - -@Tag(name = "管理后台 - 借用主") -@RestController -@RequestMapping("/heli/master") -@Validated -public class MasterController { - - @Resource - private MasterService masterService; - - @PostMapping("/create") - @Operation(summary = "创建借用主") - @PreAuthorize("@ss.hasPermission('heli:master:create')") - public CommonResult createMaster(@Valid @RequestBody MasterSaveReqVO createReqVO) { - return success(masterService.createMaster(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新借用主") - @PreAuthorize("@ss.hasPermission('heli:master:update')") - public CommonResult updateMaster(@Valid @RequestBody MasterSaveReqVO updateReqVO) { - masterService.updateMaster(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除借用主") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('heli:master:delete')") - public CommonResult deleteMaster(@RequestParam("id") Integer id) { - masterService.deleteMaster(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得借用主") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('heli:master:query')") - public CommonResult getMaster(@RequestParam("id") Integer id) { - MasterDO master = masterService.getMaster(id); - return success(BeanUtils.toBean(master, MasterRespVO.class)); - } - - @GetMapping("/page") - @Operation(summary = "获得借用主分页") - @PreAuthorize("@ss.hasPermission('heli:master:query')") - public CommonResult> getMasterPage(@Valid MasterPageReqVO pageReqVO) { - PageResult pageResult = masterService.getMasterPage(pageReqVO); - return success(BeanUtils.toBean(pageResult, MasterRespVO.class)); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出借用主 Excel") - @PreAuthorize("@ss.hasPermission('heli:master:export')") - @OperateLog(type = EXPORT) - public void exportMasterExcel(@Valid MasterPageReqVO pageReqVO, - HttpServletResponse response) throws IOException { - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); - List list = masterService.getMasterPage(pageReqVO).getList(); - // 导出 Excel - ExcelUtils.write(response, "借用主.xls", "数据", MasterRespVO.class, - BeanUtils.toBean(list, MasterRespVO.class)); - } - -} \ No newline at end of file +package com.chanko.yunxi.mes.module.heli.controller.admin.master; + +import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.security.access.prepost.PreAuthorize; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + +import javax.validation.constraints.*; +import javax.validation.*; +import javax.servlet.http.*; +import java.util.*; +import java.io.IOException; + +import com.chanko.yunxi.mes.framework.common.pojo.PageParam; +import com.chanko.yunxi.mes.framework.common.pojo.PageResult; +import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; +import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; +import static com.chanko.yunxi.mes.framework.common.pojo.CommonResult.success; + +import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils; + +import com.chanko.yunxi.mes.framework.operatelog.core.annotations.OperateLog; +import static com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum.*; + +import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO; +import com.chanko.yunxi.mes.module.heli.service.master.MasterService; + +@Tag(name = "管理后台 - 借用主") +@RestController +@RequestMapping("/heli/master") +@Validated +public class MasterController { + + @Resource + private MasterService masterService; + + @PostMapping("/create") + @Operation(summary = "创建借用主") + @PreAuthorize("@ss.hasPermission('heli:master:create')") + public CommonResult createMaster(@Valid @RequestBody MasterSaveReqVO createReqVO) { + return success(masterService.createMaster(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新借用主") + @PreAuthorize("@ss.hasPermission('heli:master:update')") + public CommonResult updateMaster(@Valid @RequestBody MasterSaveReqVO updateReqVO) { + masterService.updateMaster(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除借用主") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('heli:master:delete')") + public CommonResult deleteMaster(@RequestParam("id") Integer id) { + masterService.deleteMaster(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得借用主") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('heli:master:query')") + public CommonResult getMaster(@RequestParam("id") Integer id) { + MasterDO master = masterService.getMaster(id); + return success(BeanUtils.toBean(master, MasterRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得借用主分页") + @PreAuthorize("@ss.hasPermission('heli:master:query')") + public CommonResult> getMasterPage(@Valid MasterPageReqVO pageReqVO) { + PageResult pageResult = masterService.getMasterPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, MasterRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出借用主 Excel") + @PreAuthorize("@ss.hasPermission('heli:master:export')") + @OperateLog(type = EXPORT) + public void exportMasterExcel(@Valid MasterPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = masterService.getMasterPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "借用主.xls", "数据", MasterRespVO.class, + BeanUtils.toBean(list, MasterRespVO.class)); + } + +} \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterPageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterPageReqVO.java index 673e705..10b16e1 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterPageReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterPageReqVO.java @@ -20,12 +20,6 @@ public class MasterPageReqVO extends PageParam { @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private LocalDateTime[] createTime; - @Schema(description = "借用人") - private Long jyUser; - - @Schema(description = "1借出2归还", example = "2") - private Integer jyType; - @Schema(description = "借用部门") private String jyBm; @@ -38,21 +32,13 @@ public class MasterPageReqVO extends PageParam { @Schema(description = "借用物料名称") private String jyMaster; - @Schema(description = "借用数量") - private BigDecimal jyNum; + @Schema(description = "借用人") + private String jyUser; - @Schema(description = "归还数量") - private BigDecimal ghNum; + @Schema(description = "借用类型", example = "1") + private Integer jyType; - @Schema(description = "借用时间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime[] jyTime; - - @Schema(description = "归还时间") - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - private LocalDateTime[] ghTime; - - @Schema(description = "是否归还完成1否 2 是", example = "1") - private Integer ghType; + @Schema(description = "数量") + private BigDecimal num; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterRespVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterRespVO.java index b790e3f..a5ab746 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterRespVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterRespVO.java @@ -22,17 +22,9 @@ public class MasterRespVO { @ExcelProperty("创建时间") private LocalDateTime createTime; - @Schema(description = "借用人") - @ExcelProperty("借用人") - private Long jyUser; - - @Schema(description = "1借出2归还", example = "2") - @ExcelProperty("1借出2归还") - private Integer jyType; - @Schema(description = "借用部门") @ExcelProperty("借用部门") - private String jyBm; + private Integer jyBm; @Schema(description = "借用用途") @ExcelProperty("借用用途") @@ -44,26 +36,30 @@ public class MasterRespVO { @Schema(description = "借用物料名称") @ExcelProperty("借用物料名称") - private String jyMaster; + private Integer jyMaster; - @Schema(description = "借用数量") - @ExcelProperty("借用数量") - private BigDecimal jyNum; + @Schema(description = "借用人") + @ExcelProperty("借用人") + private Long jyUser; - @Schema(description = "归还数量") - @ExcelProperty("归还数量") - private BigDecimal ghNum; + @Schema(description = "借用类型", example = "1") + @ExcelProperty("借用类型") + private String jyType; - @Schema(description = "借用时间") - @ExcelProperty("借用时间") - private LocalDateTime jyTime; - - @Schema(description = "归还时间") - @ExcelProperty("归还时间") - private LocalDateTime ghTime; - - @Schema(description = "是否归还完成1否 2 是", example = "1") - @ExcelProperty("是否归还完成1否 2 是") - private Integer ghType; + @Schema(description = "数量") + @ExcelProperty("数量") + private BigDecimal num; + @Schema(description = "借用日期") + @ExcelProperty("借用日期") + private LocalDateTime jyDate; + @Schema(description = "借用人") + @ExcelProperty("借用人") + private String jyUsers; + @Schema(description = "借用部门") + @ExcelProperty("借用部门") + private String jyBms; + @Schema(description = "借用物料名称") + @ExcelProperty("借用物料名称") + private String jyMasters; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterSaveReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterSaveReqVO.java index a701cc3..18ce49d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterSaveReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/master/vo/MasterSaveReqVO.java @@ -2,12 +2,12 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.master.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; + +import java.time.LocalDateTime; import java.util.*; import javax.validation.constraints.*; import java.util.*; import java.math.BigDecimal; -import org.springframework.format.annotation.DateTimeFormat; -import java.time.LocalDateTime; @Schema(description = "管理后台 - 借用主新增/修改 Request VO") @Data @@ -16,14 +16,8 @@ public class MasterSaveReqVO { @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31322") private Integer id; - @Schema(description = "借用人") - private Long jyUser; - - @Schema(description = "1借出2归还", example = "2") - private Integer jyType; - @Schema(description = "借用部门") - private String jyBm; + private Integer jyBm; @Schema(description = "借用用途") private String jyYt; @@ -32,25 +26,18 @@ public class MasterSaveReqVO { private String rem; @Schema(description = "借用物料名称") - private String jyMaster; + private Integer jyMaster; - @Schema(description = "借用数量") - private BigDecimal jyNum; + @Schema(description = "借用人") + private Long jyUser; - @Schema(description = "归还数量") - private BigDecimal ghNum; + @Schema(description = "借用类型") + private String jyType; + @Schema(description = "数量") + private BigDecimal num; @Schema(description = "借用时间") - private LocalDateTime jyTime; - - @Schema(description = "归还时间") - private LocalDateTime ghTime; - - @Schema(description = "是否归还完成1否 2 是", example = "1") - private Integer ghType; - - @Schema(description = "是否归还完成1否 2 是", example = "1") - private int gh; + private LocalDateTime jyDate; -} +} \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/PricequoterecordController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/PricequoterecordController.java index 5392db6..5e86bc3 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/PricequoterecordController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/PricequoterecordController.java @@ -1,5 +1,8 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord; +import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum; +import com.chanko.yunxi.mes.framework.operatelog.core.service.OperateLogFrameworkService; +import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -8,9 +11,9 @@ import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Operation; -import javax.validation.constraints.*; import javax.validation.*; import javax.servlet.http.*; +import java.time.LocalDateTime; import java.util.*; import java.io.IOException; @@ -37,19 +40,38 @@ public class PricequoterecordController { @Resource private PricequoterecordService pricequoterecordService; + @Resource + private HttpServletRequest request; + @Resource + private OperateLogFrameworkService operateLogFrameworkService; @PostMapping("/create") @Operation(summary = "创建基础信息-报价记录") @PreAuthorize("@ss.hasPermission('heli:pricequoterecord:create')") public CommonResult createPricequoterecord(@Valid @RequestBody PricequoterecordSaveReqVO createReqVO) { - return success(pricequoterecordService.createPricequoterecord(createReqVO)); + LocalDateTime startTime = LocalDateTime.now(); + Integer pricequoterecord = pricequoterecordService.createPricequoterecord(createReqVO); + operateLogFrameworkService.createOperateLog(request, + startTime, + BusinesTypeEnum.QUOTATION_RECORD.name(), + Long.valueOf(pricequoterecord), + OperateTypeEnum.valueOf("SAVE").getType(), + createReqVO.getActiveOpinion()); + return success(pricequoterecord); } //测试 @PutMapping("/update") @Operation(summary = "更新基础信息-报价记录") @PreAuthorize("@ss.hasPermission('heli:pricequoterecord:update')") public CommonResult updatePricequoterecord(@Valid @RequestBody PricequoterecordSaveReqVO updateReqVO) { + LocalDateTime startTime = LocalDateTime.now(); pricequoterecordService.updatePricequoterecord(updateReqVO); + operateLogFrameworkService.createOperateLog(request, + startTime, + BusinesTypeEnum.QUOTATION_RECORD.name(), + Long.valueOf(updateReqVO.getId()), + OperateTypeEnum.valueOf("UPDATE").getType(), + updateReqVO.getActiveOpinion()); return success(true); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/vo/PricequoterecordSaveReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/vo/PricequoterecordSaveReqVO.java index 30505c0..16dd796 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/vo/PricequoterecordSaveReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/pricequoterecord/vo/PricequoterecordSaveReqVO.java @@ -2,10 +2,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; -import java.util.*; -import javax.validation.constraints.*; -import java.util.*; -import org.springframework.format.annotation.DateTimeFormat; + import java.time.LocalDateTime; @Schema(description = "管理后台 - 基础信息-报价记录新增/修改 Request VO") @@ -30,9 +27,6 @@ public class PricequoterecordSaveReqVO { @Schema(description = "客户现状(0:潜在客户 1:已有客户)") private Integer clientActuality; - @Schema(description = "确定中标时间") - private LocalDateTime winTheBiddingTime; - @Schema(description = "中标结果(0:中标 1:落标 2流标)") private Integer winTheResult; @@ -42,8 +36,16 @@ public class PricequoterecordSaveReqVO { @Schema(description = "报价次数") private Integer baojiacishu; + @Schema(description = "操作意见") + private String activeOpinion; + @Schema(description = "精整对手") private String jingzhengduishou; @Schema(description = "是否生成启动单(0:生成 1:不生成)") private Integer flag; + + @Schema(description = "确定中标时间") + private LocalDateTime winTheBiddingTime; + + } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/ProcessDesignController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/ProcessDesignController.java index b770f67..a31881f 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/ProcessDesignController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/ProcessDesignController.java @@ -48,8 +48,8 @@ public class ProcessDesignController { @Operation(summary = "报工") @PreAuthorize("@ss.hasPermission('heli:process-design:create')") public CommonResult updateBaoGong(@Valid @RequestBody ProcessDesignSaveReqSubVO processDesignSaveReqSubVO) { - - return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink())); + return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO)); + // return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink(),processDesignSaveReqSubVO.getRemark())); } @PostMapping("/create") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignRespVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignRespVO.java index 203b4ec..ee02aee 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignRespVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignRespVO.java @@ -89,7 +89,8 @@ public class ProcessDesignRespVO { @Schema(description = "毛坯结束日期") private LocalDateTime blankDate; - + @Schema(description = "毛坯开始日期") + private LocalDateTime startBlankDate; @Schema(description = "毛坯负责人名称") private String blankOwnerName; @@ -98,7 +99,8 @@ public class ProcessDesignRespVO { @Schema(description = "2D结束日期") private LocalDateTime twoDimDate; - + @Schema(description = "2D开始日期") + private LocalDateTime startTwoDimDate; @Schema(description = "2D负责人名称") private String twoDimOwnerName; @@ -107,7 +109,8 @@ public class ProcessDesignRespVO { @Schema(description = "3D结束日期") private LocalDateTime threeDimDate; - + @Schema(description = "3D结束日期") + private LocalDateTime startThreeDimDate; @Schema(description = "3D负责人名称") private String threeDimOwnerName; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignSaveReqSubVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignSaveReqSubVO.java index 37d4bc7..17e385f 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignSaveReqSubVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/processdesign/vo/ProcessDesignSaveReqSubVO.java @@ -22,7 +22,8 @@ public class ProcessDesignSaveReqSubVO { @Schema(description = "图纸链接", example = "随便") private String imageLink; - + @Schema(description = "备注", example = "随便") + private String remark; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/projectorder/ProjectOrderController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/projectorder/ProjectOrderController.java index c46eebc..6e92f28 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/projectorder/ProjectOrderController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/projectorder/ProjectOrderController.java @@ -150,6 +150,13 @@ public class ProjectOrderController { PageResult pageResult = projectOrderService.getProjectOrderPage(pageReqVO); return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class)); } + @GetMapping("/pageWX") + @Operation(summary = "获得项目订单分页") + @PreAuthorize("@ss.hasPermission('heli:project-order:query')") + public CommonResult> getProjectOrderPageWX(@Valid ProjectOrderPageReqVO pageReqVO) { + PageResult pageResult = projectOrderService.getProjectOrderPageWx(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class)); + } @GetMapping("/export-excel") @Operation(summary = "导出项目订单 Excel") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskPlanJDBaoBiaoPageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskPlanJDBaoBiaoPageReqVO.java index d463e02..2f81c8f 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskPlanJDBaoBiaoPageReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/taskdispatch/vo/TaskPlanJDBaoBiaoPageReqVO.java @@ -40,6 +40,8 @@ public class TaskPlanJDBaoBiaoPageReqVO extends PageParam { @Schema(description = "工序名称") private String procdureName; + @Schema(description = "类型") + private String type; @Schema(description = "总预计工时") private BigDecimal workTime; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/master/MasterDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/master/MasterDO.java index 72f1516..63a6b9e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/master/MasterDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/master/MasterDO.java @@ -5,9 +5,6 @@ import java.util.*; import java.time.LocalDateTime; import java.time.LocalDateTime; import java.math.BigDecimal; -import java.math.BigDecimal; -import java.time.LocalDateTime; -import java.time.LocalDateTime; import com.baomidou.mybatisplus.annotation.*; import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO; @@ -31,18 +28,10 @@ public class MasterDO extends BaseDO { */ @TableId private Integer id; - /** - * 借用人 - */ - private Long jyUser; - /** - * 1借出2归还 - */ - private Integer jyType; /** * 借用部门 */ - private String jyBm; + private Integer jyBm; /** * 借用用途 */ @@ -54,26 +43,28 @@ public class MasterDO extends BaseDO { /** * 借用物料名称 */ - private String jyMaster; + private Integer jyMaster; /** - * 借用数量 + * 借用人 */ - private BigDecimal jyNum; + private Long jyUser; /** - * 归还数量 + * 借用类型 */ - private BigDecimal ghNum; + private String jyType; + /** + * 数量 + */ + private BigDecimal num; /** * 借用时间 */ - private LocalDateTime jyTime; - /** - * 归还时间 - */ - private LocalDateTime ghTime; - /** - * 是否归还完成1否 2 是 - */ - private Integer ghType; + private LocalDateTime jyDate; + @TableField(exist = false) + private String jyUsers; + @TableField(exist = false) + private String jyBms; + @TableField(exist = false) + private String jyMasters; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java index 1808d45..0895962 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/materialplandetail/MaterialPlanDetailDO.java @@ -75,4 +75,6 @@ public class MaterialPlanDetailDO extends BaseDO { @TableField(exist = false) private String named; + private String creator; + } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java index 99a140f..9150970 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pgmaster/PgMasterLineDO.java @@ -156,4 +156,6 @@ public class PgMasterLineDO extends BaseDO { @TableField(exist = false) private String nickName; + private String creator; + } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java index 7888d64..7f95d0e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/plan/PlanDO.java @@ -200,6 +200,8 @@ public class PlanDO extends BaseDO { @TableField(exist = false) private String processDesignType; + private String creator; + diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pricequoterecord/PricequoterecordDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pricequoterecord/PricequoterecordDO.java index 608bd71..800dd30 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pricequoterecord/PricequoterecordDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/pricequoterecord/PricequoterecordDO.java @@ -31,42 +31,58 @@ public class PricequoterecordDO extends BaseDO { /** * 客户全称 */ + @TableField(updateStrategy= FieldStrategy.IGNORED) private String clientName; /** * 客户简称 */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private String clientNameJc; /** * 项目名称 */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private String projectName; /** * 业务员 */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private Long salesman; /** * 客户现状(0:潜在客户 1:已有客户) */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private Integer clientActuality; - /** - * 确定中标时间 - */ - private LocalDateTime winTheBiddingTime; /** * 中标结果(0:中标 1:落标 2流标) */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private Integer winTheResult; /** * 把握(0-4 :二成-四成-六成-八成-十成) */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private Integer winTheGrasp; /** * 报价次数 */ + @TableField(updateStrategy= FieldStrategy.IGNORED) private Integer baojiacishu; /** * 精整对手 */ + @TableField(updateStrategy= FieldStrategy.IGNORED) private String jingzhengduishou; + /** + * 确定中标时间 + */ + @TableField(updateStrategy= FieldStrategy.IGNORED) + private LocalDateTime winTheBiddingTime; } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processdesign/ProcessDesignDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processdesign/ProcessDesignDO.java index 8491924..06fe207 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processdesign/ProcessDesignDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/processdesign/ProcessDesignDO.java @@ -95,7 +95,8 @@ public class ProcessDesignDO extends BaseDO { @TableField(exist = false) private LocalDateTime blankDate; - + @TableField(exist = false) + private LocalDateTime startBlankDate; @TableField(exist = false) private String blankOwnerName; @@ -104,7 +105,8 @@ public class ProcessDesignDO extends BaseDO { @TableField(exist = false) private LocalDateTime twoDimDate; - + @TableField(exist = false) + private LocalDateTime startTwoDimDate; @TableField(exist = false) private String twoDimOwnerName; @@ -113,7 +115,8 @@ public class ProcessDesignDO extends BaseDO { @TableField(exist = false) private LocalDateTime threeDimDate; - + @TableField(exist = false) + private LocalDateTime startThreeDimDate; @TableField(exist = false) private String threeDimOwnerName; diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderDO.java index 96b328c..a02e754 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/projectorder/ProjectOrderDO.java @@ -269,7 +269,8 @@ public class ProjectOrderDO extends BaseDO { @TableField(exist = false) private String projectSubName; - + @TableField(exist = false) + private String unitName; /** * 变更的字段列表 * */ diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java index 83be88d..9677eec 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/storagelogNow/StorageLogNowDO.java @@ -50,7 +50,7 @@ public class StorageLogNowDO extends BaseDO { private Long pnId; private String pnName; - private Long sumKcMoney; + private BigDecimal sumKcMoney; @TableField(exist = false) @@ -58,4 +58,6 @@ public class StorageLogNowDO extends BaseDO { @TableField(exist = false) private Long matUnitId; + + private String creator; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java index aba7142..945dabb 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDO.java @@ -134,6 +134,8 @@ public class TaskDispatchDO extends BaseDO { @TableField(exist = false) private Long requiredEndDate; + private String creator; + @TableField(exist = false) private String craftContent; @TableField(exist = false) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java index d31856d..8f61b7e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/taskdispatch/TaskDispatchDetailDO.java @@ -51,7 +51,6 @@ public class TaskDispatchDetailDO extends BaseDO { /** * 派工数量 */ - @TableField(exist = false) private Integer beforeAmount; /** * 工序要点 @@ -126,7 +125,8 @@ public class TaskDispatchDetailDO extends BaseDO { private String planCode; @TableField(exist = false) private String procdureName; - + @TableField(exist = false) + private String type; /** * 预计工时 */ diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java index 0d293d5..a8abf8c 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/zjpgmaster/ZjPgMasterLineDO.java @@ -131,6 +131,9 @@ public class ZjPgMasterLineDO extends BaseDO { @TableField(exist = false) private String nickName; + @TableField(exist = false) + private String creator; + } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java index 7dffb47..30cae18 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/attentiontodo/AttentiontodoMapper.java @@ -71,4 +71,5 @@ public interface AttentiontodoMapper extends BaseMapperX { int deleteall(AttentiontodoSaveReqVO createReqVO); List selectByIdlist(Integer id); + List getAttentiontodolistdaiban(Integer id); } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java index 6a7ceb2..bbc0e5f 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/deliverorder/DeliverOrderMapper.java @@ -64,6 +64,7 @@ public interface DeliverOrderMapper extends BaseMapperX { List selectPagemyn(Long id); + List selectPagemyn1(); void showendmoney(Long id); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/master/MasterMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/master/MasterMapper.java index cc85ea3..3c29ee2 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/master/MasterMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/master/MasterMapper.java @@ -2,12 +2,19 @@ package com.chanko.yunxi.mes.module.heli.dal.mysql.master; import java.util.*; +import cn.hutool.core.util.ObjectUtil; import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX; import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; +import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO; +import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; +import com.github.yulichang.wrapper.MPJLambdaWrapper; import org.apache.ibatis.annotations.Mapper; import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*; +import org.springframework.util.StringUtils; /** * 借用主 Mapper @@ -18,21 +25,18 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*; public interface MasterMapper extends BaseMapperX { default PageResult selectPage(MasterPageReqVO reqVO) { - return selectPage(reqVO, new LambdaQueryWrapperX() - .betweenIfPresent(MasterDO::getCreateTime, reqVO.getCreateTime()) - .eqIfPresent(MasterDO::getJyUser, reqVO.getJyUser()) - .eqIfPresent(MasterDO::getJyType, reqVO.getJyType()) - .eqIfPresent(MasterDO::getJyBm, reqVO.getJyBm()) - .eqIfPresent(MasterDO::getJyYt, reqVO.getJyYt()) - .eqIfPresent(MasterDO::getRem, reqVO.getRem()) - .eqIfPresent(MasterDO::getJyMaster, reqVO.getJyMaster()) - .eqIfPresent(MasterDO::getJyNum, reqVO.getJyNum()) - .eqIfPresent(MasterDO::getGhNum, reqVO.getGhNum()) - .betweenIfPresent(MasterDO::getJyTime, reqVO.getJyTime()) - .betweenIfPresent(MasterDO::getGhTime, reqVO.getGhTime()) - .eqIfPresent(MasterDO::getGhType, reqVO.getGhType()) - .orderByDesc(MasterDO::getId)); + MPJLambdaWrapper query = new MPJLambdaWrapper<>(); + query.selectAll(MasterDO.class) + .select("b.nickname as jyUsers,c.name as jyBms,d.name as jyMasters") + .leftJoin(AdminUserDO.class,"b",AdminUserDO::getId,MasterDO::getJyUser) + .leftJoin(DeptDO.class,"c",DeptDO::getId,MasterDO::getJyBm) + .leftJoin(MaterialDO.class,"d",MaterialDO::getId,MasterDO::getJyMaster); + query.eq(!ObjectUtil.isEmpty(reqVO.getJyYt()), MasterDO::getJyYt, reqVO.getJyYt()) + .eq(!ObjectUtil.isEmpty(reqVO.getJyType()), MasterDO::getJyType, reqVO.getJyType()) + .like(!ObjectUtil.isEmpty(reqVO.getJyBm()), DeptDO::getName, reqVO.getJyBm()) + .like(!ObjectUtil.isEmpty(reqVO.getJyMaster()), MaterialDO::getName, reqVO.getJyMaster()) + .like(!ObjectUtil.isEmpty(reqVO.getJyUser()), AdminUserDO::getNickname, reqVO.getJyUser()); + return selectPage(reqVO,query); } - } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java index b6d7c23..004db6d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/materialplandetail/MaterialPlanDetailMapper.java @@ -79,5 +79,6 @@ public interface MaterialPlanDetailMapper extends BaseMapperX selectafterten(Long id); + List selectafterten1(); } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java index 9ec81e7..7583c39 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterLineMapper.java @@ -80,10 +80,15 @@ public interface PgMasterLineMapper extends BaseMapperX { .leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id") .leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,PgMasterLineDO::getProjectSubId) .leftJoin(PlanDO.class,"pl",PlanDO::getProjectId,ProjectOrderSubDO::getProjectOrderId) - .eq(PlanDO::getStatus,2) - .orderByDesc(PlanDO::getId) - .disableSubLogicDel(); + .eq(PlanDO::getStatus,2) + .disableSubLogicDel(); + if (reqVO.getPgType() == 1){ + query.orderByDesc(PgMasterLineDO::getPgNumber); + }else{ + query.orderByAsc(PgMasterLineDO::getPgNumber); + // query.orderByDesc(PlanDO::getId); + } query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser()) .eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType()) .eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java index 7244528..245deab 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/pgmaster/PgMasterMapper.java @@ -74,5 +74,7 @@ public interface PgMasterMapper extends BaseMapperX { } List selectgcjinsert(Long id); + List selectgcjinsert1(); List selectgcjinsertzj(Long id); + List selectgcjinsertzj1(); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java index cc5f7a8..f0fef4e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/plan/PlanMapper.java @@ -122,5 +122,6 @@ public interface PlanMapper extends BaseMapperX { // .orderByDesc(PlanDO::getId)); // } List selectfhtj(Long txrid); +List selectfhtj1(); } \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java index 926b6f6..8cde572 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/processdesign/ProcessDesignMapper.java @@ -30,7 +30,7 @@ public interface ProcessDesignMapper extends BaseMapperX { .select("a.plan_no as planCode","a.has_craft as hasCraft", "a.craft_start_date as craftStartDate", "a.craft_end_date as craftEndDate", "e.name as customerName") .select("d.code as projectCode", "d.project_name as projectName", "d.business_line as businessLine", "d.property","d.is_urgency as isUrgency") .select("u1.nickname as projectOwnerName", "u2.nickname as craftOwnerName") - .select("b.blank_date as blankDate", "b.two_dim_date as twoDimDate", "b.three_dim_date as threeDimDate") + .select("b.blank_date as blankDate","b.start_blank_date as startBlankDate", "b.two_dim_date as twoDimDate","b.start_two_dim_date as startTwoDimDate", "b.three_dim_date as threeDimDate", "b.start_three_dim_date as startThreeDimDate") .select("u3.nickname as blankOwnerName", "u4.nickname as twoDimOwnerName", "u5.nickname as threeDimOwnerName") .select("c.name as projectSubName", "b.project_sub_code as projectSubCode") .select("z.progress,z.blueprint_link as blueprintLink ") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/projectorder/ProjectOrderMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/projectorder/ProjectOrderMapper.java index be324c6..d2718ca 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/projectorder/ProjectOrderMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/projectorder/ProjectOrderMapper.java @@ -6,6 +6,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX; import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderCostPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO; import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO; @@ -79,7 +80,34 @@ public interface ProjectOrderMapper extends BaseMapperX { ; return selectPage(reqVO, query); } - + default PageResult selectPageWx(ProjectOrderPageReqVO reqVO) { + MPJLambdaWrapper query = new MPJLambdaWrapper<>(); + query.selectAll(ProjectOrderDO.class) + .select("u.nickname as businessManName", "d.name as businessDeptName", "e.name as customerName") + .leftJoin(AdminUserDO.class, "u", AdminUserDO::getId, ProjectOrderDO::getBusinessMan) + .leftJoin(DeptDO.class, "d", DeptDO::getId, ProjectOrderDO::getBusinessDeptId) + .leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId) + .leftJoin(PlanDO.class,"p",PlanDO::getProjectId,ProjectOrderDO::getId) + .eq(PlanDO::getStatus,2) + .disableSubLogicDel() + .orderByDesc(ProjectOrderDO::getId); + query.like(!StringUtils.isEmpty(reqVO.getCode()), ProjectOrderDO::getCode, reqVO.getCode()) + .like(!StringUtils.isEmpty(reqVO.getCustomerName()), "e.name", reqVO.getCustomerName()) + .like(!StringUtils.isEmpty(reqVO.getBusinessManName()), "u.nickname", reqVO.getBusinessManName()) + .like(!StringUtils.isEmpty(reqVO.getProjectName()), ProjectOrderDO::getProjectName, reqVO.getProjectName()) + .like(!StringUtils.isEmpty(reqVO.getContractNo()), ProjectOrderDO::getContractNo, reqVO.getContractNo()) + .eq(reqVO.getHasPrice() != null, ProjectOrderDO::getHasPrice, reqVO.getHasPrice()) + .eq(reqVO.getOrderStatus() != null, ProjectOrderDO::getOrderStatus, reqVO.getOrderStatus()) + .eq(reqVO.getDeliveryStatus() != null, ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatus()) + .in(reqVO.getOrderStatusList() != null && !reqVO.getOrderStatusList().isEmpty(), ProjectOrderDO::getOrderStatus, reqVO.getOrderStatusList()) + .in(reqVO.getDeliveryStatusList() != null && !reqVO.getDeliveryStatusList().isEmpty(), ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatusList()) + .eq(reqVO.getIsSnapshot() != null, ProjectOrderDO::getIsSnapshot, reqVO.getIsSnapshot()) + .eq(reqVO.getHasAlter() != null, ProjectOrderDO::getHasAlter, reqVO.getHasAlter()) + .like(!StringUtils.isEmpty(reqVO.getSnapshotCode()), ProjectOrderDO::getSnapshotCode, reqVO.getSnapshotCode()) + .in(CollUtil.isNotEmpty(reqVO.getIdList()), ProjectOrderDO::getId, reqVO.getIdList()) + ; + return selectPage(reqVO, query); + } default ProjectOrderDO selectById(Long id) { MPJLambdaWrapper query = new MPJLambdaWrapper<>(); query.selectAll(ProjectOrderDO.class) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java index bb223d9..49129fc 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/storagelog/StorageLogNowMapper.java @@ -27,6 +27,7 @@ import java.util.List; public interface StorageLogNowMapper extends BaseMapperX { List selectPagesmall(Long id); + List selectPagesmall1(); List selectPagesmallbyid(String id); default PageResult selectPage(StorageLogPageReqVO reqVO) { MPJLambdaWrapper query = new MPJLambdaWrapper<>(); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java index 4bd31c6..beda93d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/taskdispatch/TaskDispatchDetailMapper.java @@ -6,7 +6,6 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchDetailTotalVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskPlanJDBaoBiaoPageReqVO; -import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO; @@ -37,34 +36,36 @@ import java.util.Set; public interface TaskDispatchDetailMapper extends BaseMapperX { public int updateOwnerAndPostIdById(@Param("id") Long id,@Param("type") Integer type); - default PageResult planBbPage(TaskPlanJDBaoBiaoPageReqVO reqVO) { - MPJLambdaWrapper query = new MPJLambdaWrapper<>(); - query.select("MAX(d.code)as projectCode,MAX(d.project_name)as projectName,MAX(g.task_no) as taskNo,0 as planType," + - " MAX(e.name) as projectSubName, MAX(c.material_name) as materialName , MAX(f.name) as procdureName ,t.work_time as workTime,t.owner," + - "t.amount as amount ,SUM(h.work_time) as bgWorkTime,SUM(h.amount) as bgAmount, t.procedure_status as wgType ,t.end_time as endTime") - .leftJoin(TaskDispatchDO.class,"b",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId) - .leftJoin(ProcessBomDetailDO.class,"c",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId) - .leftJoin(ProjectOrderDO.class,"d",ProjectOrderDO::getId,TaskDispatchDO::getProjectId) - .leftJoin(ProjectOrderSubDO.class,"e",ProjectOrderSubDO::getId,TaskDispatchDO::getProjectSubId) - .leftJoin(ProcedureDO.class,"f",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId) - .leftJoin(PlanTaskDO.class,"g",PlanTaskDO::getId,TaskDispatchDO::getTaskId) - .leftJoin(TaskReportDO.class,"h",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId) - - .groupBy("b.project_id,b.project_sub_id,b.bom_detail_id,t.procedure_id,t.owner") - ; - query.eq(TaskDispatchDO::getDispatchType,"PRODUCTION") - .eq(reqVO.getProjectCode() !=null,ProjectOrderDO::getCode,reqVO.getProjectCode()) - .eq(reqVO.getProjectName() !=null,ProjectOrderDO::getProjectName,reqVO.getProjectName()) - .eq(reqVO.getTaskNo()!=null,PlanTaskDO::getTaskNo,reqVO.getTaskNo()) - .eq(reqVO.getProjectSubName()!=null,ProjectOrderSubDO::getName, reqVO.getProjectSubName()) - .eq(reqVO.getMaterialName()!=null,ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName()) - .eq(reqVO.getOwner()!=null,TaskDispatchDetailDO::getOwner,reqVO.getOwner()) - ; - - - - return selectPage(reqVO, query); - } + List planBbPage(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO); + List planBb(@Param("reqVO")TaskPlanJDBaoBiaoPageReqVO reqVO); +// default PageResult planBbPage(TaskPlanJDBaoBiaoPageReqVO reqVO) { +// MPJLambdaWrapper query = new MPJLambdaWrapper<>(); +// query.select("MAX(d.code)as projectCode,MAX(d.project_name)as projectName,MAX(g.task_no) as taskNo,0 as planType," + +// " MAX(e.name) as projectSubName, MAX(c.material_name) as materialName , MAX(f.name) as procdureName ,t.work_time as workTime,t.owner," + +// "t.amount as amount ,COALESCE(SUM(h.work_time), 0) as bgWorkTime,COALESCE(SUM(h.amount), 0) as bgAmount, t.procedure_status as wgType ,t.end_time as endTime") +// .leftJoin(TaskDispatchDO.class,"b",TaskDispatchDO::getId,TaskDispatchDetailDO::getDispatchId) +// .leftJoin(ProcessBomDetailDO.class,"c",ProcessBomDetailDO::getId,TaskDispatchDO::getBomDetailId) +// .leftJoin(ProjectOrderDO.class,"d",ProjectOrderDO::getId,TaskDispatchDO::getProjectId) +// .leftJoin(ProjectOrderSubDO.class,"e",ProjectOrderSubDO::getId,TaskDispatchDO::getProjectSubId) +// .leftJoin(ProcedureDO.class,"f",ProcedureDO::getId,TaskDispatchDetailDO::getProcedureId) +// .leftJoin(PlanTaskDO.class,"g",PlanTaskDO::getId,TaskDispatchDO::getTaskId) +// .leftJoin(TaskReportDO.class,"h",TaskReportDO::getDispatchDetailId,TaskDispatchDetailDO::getId) +// +// .groupBy("b.project_id,b.project_sub_id,b.bom_detail_id,t.procedure_id,t.owner") +// ; +// query.eq(TaskDispatchDO::getDispatchType,"PRODUCTION") +// .eq(ObjectUtil.isNotEmpty(reqVO.getProjectCode()),ProjectOrderDO::getCode,reqVO.getProjectCode()) +// .eq(reqVO.getProjectName() !=null,ProjectOrderDO::getProjectName,reqVO.getProjectName()) +// .eq(reqVO.getTaskNo()!=null,PlanTaskDO::getTaskNo,reqVO.getTaskNo()) +// .eq(reqVO.getProjectSubName()!=null,ProjectOrderSubDO::getName, reqVO.getProjectSubName()) +// .eq(reqVO.getMaterialName()!=null,ProcessBomDetailDO::getMaterialName, reqVO.getMaterialName()) +// .eq(reqVO.getOwner()!=null,TaskDispatchDetailDO::getOwner,reqVO.getOwner()) +// ; +// +// +// +// return selectPage(reqVO, query); +// } default boolean judgeHasOver(Long id){ MPJLambdaWrapper query = new MPJLambdaWrapper<>(); query.eq(TaskDispatchDetailDO::getDispatchId,id) @@ -168,7 +169,9 @@ public interface TaskDispatchDetailMapper extends BaseMapperX { List getzplist(Long id); + List getzplist1(); List getsclist(Long id); + List getsclist1(); public int deleteDetailByIds(List ids); default PageResult selectPage(TaskDispatchPageReqVO reqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/unqualifiednotification/UnqualifiedNotificationMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/unqualifiednotification/UnqualifiedNotificationMapper.java index 94e7a33..7a0cd5a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/unqualifiednotification/UnqualifiedNotificationMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/unqualifiednotification/UnqualifiedNotificationMapper.java @@ -5,6 +5,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX; import com.chanko.yunxi.mes.module.heli.controller.admin.unqualifiednotification.vo.UnqualifiedNotificationPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO; @@ -35,6 +36,7 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX { query.selectAll(ZjPgMasterLineDO.class) .select("d.amounts,d.workTime") .leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_zj_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id") - .orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber) .disableSubLogicDel(); + if(reqVO.getPgType() == 1){ + query.orderByDesc(ZjPgMasterLineDO::getPgNumber); + }else { + query.orderByAsc(ZjPgMasterLineDO::getPgNumber); + // query.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber); + } query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser()) .eq(reqVO.getPgType() != null, ZjPgMasterLineDO::getPgType, reqVO.getPgType()) .eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus()) diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java index 8048096..00d1df8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoService.java @@ -45,6 +45,7 @@ public interface AttentiontodoService { */ AttentiontodoDO getAttentiontodo(Integer id); List getAttentiontodolist(Integer id); + List getAttentiontodolistdaiban(Integer id); /** * 获得待办关注分页 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java index 4108437..2f529b1 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/attentiontodo/AttentiontodoServiceImpl.java @@ -96,6 +96,10 @@ public class AttentiontodoServiceImpl implements AttentiontodoService { public List getAttentiontodolist(Integer id) { return attentiontodoMapper.selectByIdlist(id); } + @Override + public List getAttentiontodolistdaiban(Integer id) { + return attentiontodoMapper.getAttentiontodolistdaiban(id); + } @Override public PageResult getAttentiontodoPage(AttentiontodoPageReqVO pageReqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java index f358722..cb39f8e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/bdgzsomthing/bdgzsomthingServiceImpl.java @@ -1,9 +1,12 @@ package com.chanko.yunxi.mes.module.heli.service.bdgzsomthing; import cn.hutool.core.collection.CollUtil; +import cn.hutool.http.useragent.UserAgentUtil; +import cn.hutool.system.SystemUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.TaskDispatchPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO; @@ -27,6 +30,9 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper; import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; +import com.chanko.yunxi.mes.module.system.controller.admin.user.UserController; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; import com.chanko.yunxi.mes.module.system.service.user.AdminUserService; import com.fasterxml.jackson.databind.ObjectMapper; @@ -39,6 +45,7 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -71,6 +78,11 @@ import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExcept @Service @Validated public class bdgzsomthingServiceImpl implements bdgzsomthingService { + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private TaskDispatchDetailMapper taskDispatchDetailMapper; @Resource @@ -217,6 +229,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { // PageResult pageResult = processBomService.getProcessBomPagesall(); //库存低于安全库存 List attentiontodook = attentiontodoMapper.selectByIdlist(2);//查找该类型的待办和关注人 改 +// String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(2); + if (attentiontodook1.size()<1){ + + List pageResult = storageLogNowMapper.selectPagesmall1();//查询符合条件的值 + for (StorageLogNowDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("库存低于安全库存"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + + } + + + + + } + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { List pageResult = storageLogNowMapper.selectPagesmall(attentiontodoRespVO.getTxrid());//查询符合条件的值 @@ -267,6 +300,30 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { List attentiontodookddfh = attentiontodoMapper.selectByIdlist(3);//查找该类型的待办和关注人 改 // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 + List attentiontodook3 = attentiontodoService.getAttentiontodolistdaiban(3); + if (attentiontodook3.size()<1){ + + List pageResult = deliverOrderMapper.selectPagemyn1();//查询符合条件的值 + for (DeliverOrderDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("订单发货满一年"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( storageLogNowDO.getCustomerId()).getNickname()); + attentiontodoDO.setLevel("1"); + attentiontodookddfh.add(attentiontodoDO); + + + } + + } + + + + + + + + for (AttentiontodoDO attentiontodoRespVO : attentiontodookddfh) { List deliverOrderDOS = deliverOrderMapper.selectPagemyn(attentiontodoRespVO.getTxrid()); { @@ -315,6 +372,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //生产任务派工单 到期当天逾期 List attentiontodookddfh6 = attentiontodoMapper.selectByIdlist(6);//查找该类型的待办和关注人 改 + + List attentiontodook6 = attentiontodoService.getAttentiontodolistdaiban(6);//改两个数字 + if (attentiontodook6.size()<1){ //改对应 + + List pageResult = taskDispatchMapper.getsclist1();//复制条件+改 + for (TaskDispatchDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("生产任务到期"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh6.add(attentiontodoDO); + + + } + + } + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 TaskDispatchPageReqVO taskDispatchPageReqVO = new TaskDispatchPageReqVO(); @@ -396,6 +473,26 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { List attentiontodookddfh5 = attentiontodoMapper.selectByIdlist(5);//查找该类型的待办和关注人 改 // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 + List attentiontodook5 = attentiontodoService.getAttentiontodolistdaiban(5);//改两个数字 + if (attentiontodook5.size()<1){ //改对应 + + List pageResult = taskDispatchMapper.getzplist1();//复制条件+改 + for (TaskDispatchDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("装配任务到期"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh5.add(attentiontodoDO); + + + } + + } + + + + //获取今天日期 @@ -461,6 +558,32 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //过程检查-质检 到期当天逾期 List attentiontodookddfh7 = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改 + + + List attentiontodook7 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字 + if (attentiontodook7.size()<1){ //改对应 + + List pageResult = pgMasterMapper.selectgcjinsert1();//复制条件+改 + for (PgMasterLineDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("质检任务到期前"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh7.add(attentiontodoDO); + + + } + + } + + + + + + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); @@ -532,6 +655,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //终检-质检 到期当天逾期 List attentiontodookddfh7o = attentiontodoMapper.selectByIdlist(7);//查找该类型的待办和关注人 改 + + + + List attentiontodook70 = attentiontodoService.getAttentiontodolistdaiban(7);//改两个数字 + if (attentiontodook70.size()<1){ //改对应 + + List pageResult = pgMasterMapper.selectgcjinsertzj1();//复制条件+改 + for (ZjPgMasterLineDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("质检任务到期前"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh7o.add(attentiontodoDO); + + + } + + } + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); @@ -604,6 +749,27 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //生产工艺 到期当天逾期 List attentiontodookddfh4 = attentiontodoMapper.selectByIdlist(4);//查找该类型的待办和关注人 改 + + + + List attentiontodook4 = attentiontodoService.getAttentiontodolistdaiban(4);//改两个数字 + if (attentiontodook4.size()<1){ //改对应 + + List pageResult = planMapper.selectfhtj1();//复制条件+改 + for (PlanDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("设计任务到期"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh4.add(attentiontodoDO); + + + } + + } + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); @@ -689,6 +855,28 @@ public class bdgzsomthingServiceImpl implements bdgzsomthingService { //物料需求计划到期前十天 到期当天逾期 List attentiontodookddfh9 = attentiontodoMapper.selectByIdlist(9);//查找该类型的待办和关注人 改 + + List attentiontodook9 = attentiontodoService.getAttentiontodolistdaiban(9);//改两个数字 + if (attentiontodook9.size()<1){ //改对应 + + List pageResult = materialPlanDetailMapper.selectafterten1();//复制条件+改 + for (MaterialPlanDetailDO storageLogNowDO : pageResult) { + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("《物料需求计划》的采购"); //改内容 + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(userApi.getUser( Long.parseLong(storageLogNowDO.getCreator())).getNickname()); //改对应 + attentiontodoDO.setLevel("1"); + attentiontodookddfh9.add(attentiontodoDO); + + + } + + } + + + + + // List pageResult = storageLogNowMapper.selectPagesmall();//查询符合条件的值 //查数据 // TaskDispatchPageReqVO taskDispatchPageReqVO5 = new TaskDispatchPageReqVO(); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterService.java index 0c9c8a3..981381e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterService.java @@ -1,55 +1,55 @@ -package com.chanko.yunxi.mes.module.heli.service.master; - -import java.util.*; -import javax.validation.*; -import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*; -import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO; -import com.chanko.yunxi.mes.framework.common.pojo.PageResult; -import com.chanko.yunxi.mes.framework.common.pojo.PageParam; - -/** - * 借用主 Service 接口 - * - * @author 管理员 - */ -public interface MasterService { - - /** - * 创建借用主 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Integer createMaster(@Valid MasterSaveReqVO createReqVO); - - /** - * 更新借用主 - * - * @param updateReqVO 更新信息 - */ - void updateMaster(@Valid MasterSaveReqVO updateReqVO); - - /** - * 删除借用主 - * - * @param id 编号 - */ - void deleteMaster(Integer id); - - /** - * 获得借用主 - * - * @param id 编号 - * @return 借用主 - */ - MasterDO getMaster(Integer id); - - /** - * 获得借用主分页 - * - * @param pageReqVO 分页查询 - * @return 借用主分页 - */ - PageResult getMasterPage(MasterPageReqVO pageReqVO); - -} \ No newline at end of file +package com.chanko.yunxi.mes.module.heli.service.master; + +import java.util.*; +import javax.validation.*; +import com.chanko.yunxi.mes.module.heli.controller.admin.master.vo.*; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.master.MasterDO; +import com.chanko.yunxi.mes.framework.common.pojo.PageResult; +import com.chanko.yunxi.mes.framework.common.pojo.PageParam; + +/** + * 借用主 Service 接口 + * + * @author 管理员 + */ +public interface MasterService { + + /** + * 创建借用主 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Integer createMaster(@Valid MasterSaveReqVO createReqVO); + + /** + * 更新借用主 + * + * @param updateReqVO 更新信息 + */ + void updateMaster(@Valid MasterSaveReqVO updateReqVO); + + /** + * 删除借用主 + * + * @param id 编号 + */ + void deleteMaster(Integer id); + + /** + * 获得借用主 + * + * @param id 编号 + * @return 借用主 + */ + MasterDO getMaster(Integer id); + + /** + * 获得借用主分页 + * + * @param pageReqVO 分页查询 + * @return 借用主分页 + */ + PageResult getMasterPage(MasterPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterServiceImpl.java index 0f38651..0efab02 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/master/MasterServiceImpl.java @@ -44,14 +44,6 @@ public class MasterServiceImpl implements MasterService { validateMasterExists(updateReqVO.getId()); // 更新 MasterDO updateObj = BeanUtils.toBean(updateReqVO, MasterDO.class); - if(updateReqVO.getGh()==1){ - System.out.println("借用数量"+updateReqVO.getJyNum()); - System.out.println("归还数量"+updateReqVO.getGhNum()); - if(updateReqVO.getJyNum().compareTo(updateReqVO.getGhNum())==0){ - updateObj.setGhType(2); - } - } - masterMapper.updateById(updateObj); } @@ -79,4 +71,4 @@ public class MasterServiceImpl implements MasterService { return masterMapper.selectPage(pageReqVO); } -} +} \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java index 6e8ef59..ceac9a5 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/materialplandetail/MaterialPlanDetailServiceImpl.java @@ -1,5 +1,6 @@ package com.chanko.yunxi.mes.module.heli.service.materialplandetail; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLogPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO; @@ -7,6 +8,8 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlan import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO; import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -33,6 +36,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; @Service @Validated public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService { + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private MaterialPlanMapper materialPlanMapper; @Resource @@ -62,6 +70,21 @@ public class MaterialPlanDetailServiceImpl implements MaterialPlanDetailService List attentiontodook = attentiontodoMapper.selectByIdlist(8);//查找该类型的待办和关注人 改 + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(8); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("《物料需求计划》提交后"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordService.java index 772086d..a84acb6 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordService.java @@ -1,18 +1,18 @@ package com.chanko.yunxi.mes.module.heli.service.pricequoterecord; -import java.util.*; import javax.validation.*; + +import com.baomidou.mybatisplus.extension.service.IService; import com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo.*; import com.chanko.yunxi.mes.module.heli.dal.dataobject.pricequoterecord.PricequoterecordDO; import com.chanko.yunxi.mes.framework.common.pojo.PageResult; -import com.chanko.yunxi.mes.framework.common.pojo.PageParam; /** * 基础信息-报价记录 Service 接口 * * @author 管理员 */ -public interface PricequoterecordService { +public interface PricequoterecordService extends IService { /** * 创建基础信息-报价记录 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordServiceImpl.java index 690bcfd..ed92d36 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/pricequoterecord/PricequoterecordServiceImpl.java @@ -1,19 +1,20 @@ package com.chanko.yunxi.mes.module.heli.service.pricequoterecord; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO; import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderMapper; import org.springframework.stereotype.Service; import javax.annotation.Resource; +import javax.validation.Valid; + import org.springframework.validation.annotation.Validated; -import org.springframework.transaction.annotation.Transactional; import java.time.LocalDate; import java.time.LocalDateTime; -import java.util.*; + import com.chanko.yunxi.mes.module.heli.controller.admin.pricequoterecord.vo.*; import com.chanko.yunxi.mes.module.heli.dal.dataobject.pricequoterecord.PricequoterecordDO; import com.chanko.yunxi.mes.framework.common.pojo.PageResult; -import com.chanko.yunxi.mes.framework.common.pojo.PageParam; import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; import com.chanko.yunxi.mes.module.heli.dal.mysql.pricequoterecord.PricequoterecordMapper; @@ -28,7 +29,7 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; */ @Service @Validated -public class PricequoterecordServiceImpl implements PricequoterecordService { +public class PricequoterecordServiceImpl extends ServiceImpl implements PricequoterecordService { @Resource private PricequoterecordMapper pricequoterecordMapper; @@ -74,7 +75,6 @@ public class PricequoterecordServiceImpl implements PricequoterecordService { // 更新 PricequoterecordDO updateObj = BeanUtils.toBean(updateReqVO, PricequoterecordDO.class); pricequoterecordMapper.updateById(updateObj); - if(updateObj.getWinTheResult()!=null && updateObj.getWinTheResult() == 0&& updateReqVO.getFlag() == 0){ //生成启动单 ProjectOrderDO projectOrderDO = new ProjectOrderDO(); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java index 32a4bac..6c80b95 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processbom/ProcessBomServiceImpl.java @@ -12,6 +12,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; import com.chanko.yunxi.mes.framework.dict.core.util.DictFrameworkUtils; import com.chanko.yunxi.mes.framework.excel.core.util.ExcelUtils; import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO; import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomSaveReqVO; @@ -33,13 +34,16 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMap import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper; import com.chanko.yunxi.mes.module.heli.enums.ProcessBomStatusEnum; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService; import com.chanko.yunxi.mes.module.heli.service.material.MaterialService; import com.chanko.yunxi.mes.module.heli.service.plantaskbom.PlanTaskBomService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO; import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO; import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper; import org.apache.poi.ss.formula.functions.T; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -78,6 +82,11 @@ public class ProcessBomServiceImpl implements ProcessBomService { @Resource private ProcessBomMapper processBomMapper; @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; + @Resource private ProcessBomDetailMapper processBomDetailMapper; @Resource private MaterialService materialService; @@ -515,6 +524,23 @@ public class ProcessBomServiceImpl implements ProcessBomService { if (hasBomType4) { PlanDO getplanid = processBomMapper.getplanid(updateObj.getPlanId()); List attentiontodook = attentiontodoMapper.selectByIdlist(13);// 改 + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(13); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("BOM变更审核通过后"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { @@ -686,6 +712,24 @@ public class ProcessBomServiceImpl implements ProcessBomService { .anyMatch(bomDetail -> bomDetail.getBomType() == 4); if (hasBomType4) { List attentiontodook = attentiontodoMapper.selectByIdlist(14);// 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(14); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("BOM变更通知"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { @@ -733,6 +777,24 @@ public class ProcessBomServiceImpl implements ProcessBomService { if(hasBomType4){ List attentiontodook = attentiontodoMapper.selectByIdlist(12);// 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(12); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("BOM变更审核"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignService.java index 6bb252f..ff939e5 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignService.java @@ -31,8 +31,8 @@ public interface ProcessDesignService { */ Long createProcessDesign(@Valid ProcessDesignSaveReqVO createReqVO); - - Long updateBaoGong(Long zid, BigDecimal progress, String imageLink); + Long updateBaoGong( ProcessDesignSaveReqSubVO processDesignSaveReqSubVO); + Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark); /** * 更新工艺设计 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignServiceImpl.java index 2e88a1a..7562523 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/processdesign/ProcessDesignServiceImpl.java @@ -7,6 +7,7 @@ import com.chanko.yunxi.mes.framework.common.util.object.ObjectUtils; import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignPageReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignProgressPageReqVO; +import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqSubVO; import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO; @@ -51,9 +52,57 @@ public class ProcessDesignServiceImpl implements ProcessDesignService { public PageResult getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) { return processDesignProgressMapper.selectPage(pageReqVO); } - @Override - public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink){ + public Long updateBaoGong(ProcessDesignSaveReqSubVO reqVO){ + //先取出主ID下的所有报工百分比判断不能报工不能超过100 + ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(reqVO.getZid()); + BigDecimal value1 = reqVO.getProgress(); + BigDecimal threshold = new BigDecimal("100"); + if(processDesignProgressDOS != null){ + //相加判断是否大于100,大于时返回前端并给用户提示 + + BigDecimal value2 = processDesignProgressDOS.getProgress(); + BigDecimal sum = value1.add(value2); + + if (value1.compareTo(threshold) > 0) { + //大于100时不执行,并返回给用户,提示设计进度不能超过100 + throw exception(TASK_REPORT_PARAMS_ERRORJD); + } else { + if(processDesignProgressDOS.getProgress().compareTo(value1)>0){ + throw exception(TASK_REPORT_PARAMS_ERRORSJBG); + }else{ + //反之插入数据库数据 + ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO(); + processDesignProgressDO.setProcessDesignId(reqVO.getZid()); + processDesignProgressDO.setProgress(reqVO.getProgress()); + processDesignProgressDO.setBlueprintLink(reqVO.getImageLink()); + if (reqVO.getRemark() != null && !reqVO.getRemark().trim().equals("")){ + processDesignProgressDO.setRemark(reqVO.getRemark()); + } + + processDesignProgressMapper.insert(processDesignProgressDO); + } + } + }else{ + if(value1.compareTo(threshold) > 0){ + throw exception(TASK_REPORT_PARAMS_ERRORJD); + }else{ + //反之插入数据库数据 + ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO(); + processDesignProgressDO.setProcessDesignId(reqVO.getZid()); + processDesignProgressDO.setProgress(reqVO.getProgress()); + processDesignProgressDO.setBlueprintLink(reqVO.getImageLink()); + processDesignProgressMapper.insert(processDesignProgressDO); + } + + } + + + + return null; + } + @Override + public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark){ //先取出主ID下的所有报工百分比判断不能报工不能超过100 ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(zid); BigDecimal value1 = progress; @@ -76,6 +125,7 @@ public class ProcessDesignServiceImpl implements ProcessDesignService { processDesignProgressDO.setProcessDesignId(zid); processDesignProgressDO.setProgress(progress); processDesignProgressDO.setBlueprintLink(imageLink); + processDesignProgressDO.setRemark(remark); processDesignProgressMapper.insert(processDesignProgressDO); } } @@ -167,14 +217,17 @@ public class ProcessDesignServiceImpl implements ProcessDesignService { detailResult.getList().forEach(processDesign -> { if(ProcessDesignTypeEnum.BLUEPRINT_WORKBLANK.name().equals(processDesign.getProcessDesignType())){ processDesignDO.setBlankDate(processDesign.getBlankDate()) + .setStartBlankDate(processDesign.getStartBlankDate()) .setBlankOwnerName(processDesign.getBlankOwnerName()) .setProgressBlank(processDesign.getProgress()); }else if(ProcessDesignTypeEnum.BLUEPRINT_3D.name().equals(processDesign.getProcessDesignType())){ processDesignDO.setThreeDimDate(processDesign.getThreeDimDate()) + .setStartThreeDimDate(processDesign.getStartThreeDimDate()) .setThreeDimOwnerName(processDesign.getThreeDimOwnerName()) .setProgress3d(processDesign.getProgress()); }else if(ProcessDesignTypeEnum.BLUEPRINT_2D.name().equals(processDesign.getProcessDesignType())){ processDesignDO.setTwoDimDate(processDesign.getTwoDimDate()) + .setStartTwoDimDate(processDesign.getStartTwoDimDate()) .setTwoDimOwnerName(processDesign.getTwoDimOwnerName()) .setProgress2d(processDesign.getProgress()); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderService.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderService.java index 9c1d05f..4e584f6 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderService.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderService.java @@ -55,6 +55,7 @@ public interface ProjectOrderService { * @return 项目订单分页 */ PageResult getProjectOrderPage(ProjectOrderPageReqVO pageReqVO); + PageResult getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO); PageResult getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO); ProjectOrderDO getProjectOrderCost(Long id,Long projectSubId); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java index b5c75b4..56bc0f8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/projectorder/ProjectOrderServiceImpl.java @@ -367,7 +367,10 @@ public class ProjectOrderServiceImpl implements ProjectOrderService { return projectOrderMapper.selectPage(pageReqVO); } - + @Override + public PageResult getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO) { + return projectOrderMapper.selectPageWx(pageReqVO); + } @Override public PageResult getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO) { @@ -441,32 +444,41 @@ public class ProjectOrderServiceImpl implements ProjectOrderService { createProjectOrder(operateReqVO); if(operateReqVO.getHasPrice().equals(1)&&(operateReqVO.getPrice()==null)){ //订单有价格但是没录价格 - String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook = attentiontodoService.getAttentiontodolist(1);//查找该类型的待办和关注人 改 - AttentiontodoDO attentiontodoDO = attentiontodook.get(0); - boolean containsAaa = attentiontodook.stream() - .anyMatch(item -> nickname.equals(item.getAttr4())); - if (!containsAaa){ + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(1); + if (attentiontodook1.size()<1){ { - // for (StorageLogNowDO storageLogNowDO : pageResult) { - bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO(); - BdgzsomthingDO.setThingname(attentiontodoDO.getEvent());//事件名称 - BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称 - BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null -// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期 -// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写 - BdgzsomthingDO.setDborgz("待办"); - BdgzsomthingDO.setClick(nickname);//提醒人 - BdgzsomthingDO.setLevel("紧急"); -// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人 - BdgzsomthingDO.setYesorno("0");//是否点击 - BdgzsomthingDO.setAttr4("0");//是否已处理 - BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id -// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改 - bdgzsomthingMapper.insert(BdgzsomthingDO); + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("订单有价格"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + + + // for (StorageLogNowDO storageLogNowDO : pageResult) { +// bdgzsomthingDO BdgzsomthingDO = new bdgzsomthingDO(); +// BdgzsomthingDO.setThingname("订单有价格");//事件名称 +// BdgzsomthingDO.setThings(operateReqVO.getProjectName()+operateReqVO.getContractNo()+"价格没有录入系统");//事件名称 +// BdgzsomthingDO.setAttr2(operateReqVO.getCode());//因为不用跳转所以为null +//// BdgzsomthingDO.setClicktime(attentiontodoRespVO.getRemindtime());//提醒周期 +//// BdgzsomthingDO.setShowname(new Date());比较创建时间,不用单独填写 +// BdgzsomthingDO.setDborgz("待办"); +// BdgzsomthingDO.setClick(nickname);//提醒人 +// BdgzsomthingDO.setLevel("紧急"); +//// BdgzsomthingDO.setClick(attentiontodoRespVO.getRemindman());//提醒人 +// BdgzsomthingDO.setYesorno("0");//是否点击 +// BdgzsomthingDO.setAttr4("0");//是否已处理 +// +// BdgzsomthingDO.setAttr3(operateReqVO.getId().toString());//获取数据当前表的id +//// BdgzsomthingDO.setShowname(operateReqVO.getCreateTime());//获取数据当前表的创建事件 改 +// bdgzsomthingMapper.insert(BdgzsomthingDO); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java index 15113a8..801009b 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/purchaseorder/PurchaseOrderServiceImpl.java @@ -2,6 +2,7 @@ package com.chanko.yunxi.mes.module.heli.service.purchaseorder; import cn.hutool.core.util.ObjectUtil; import com.chanko.yunxi.mes.framework.security.core.LoginUser; +import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils; import com.chanko.yunxi.mes.module.heli.controller.admin.orderyf.vo.OrderYfSaveReqVO; import com.chanko.yunxi.mes.module.heli.controller.admin.plan.vo.PlanPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.attentiontodo.AttentiontodoDO; @@ -14,9 +15,12 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMap import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.supplier.SupplierMapper; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; import com.chanko.yunxi.mes.module.heli.service.orderyf.OrderYfService; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -47,6 +51,12 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*; @Service @Validated public class PurchaseOrderServiceImpl implements PurchaseOrderService { + + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper; @Resource @@ -141,6 +151,25 @@ public class PurchaseOrderServiceImpl implements PurchaseOrderService { bdgzsomthingMapper.updateokone(abc); //采购订单收货完成 List attentiontodook = attentiontodoMapper.selectByIdlist(10);//查找该类型的待办和关注人 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(10); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("《采购订单》到货时通知检验"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/storagelog/StorageLogServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/storagelog/StorageLogServiceImpl.java index dd7d71d..044e35d 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/storagelog/StorageLogServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/storagelog/StorageLogServiceImpl.java @@ -97,6 +97,7 @@ public class StorageLogServiceImpl implements StorageLogService { @Override public PageResult getStorageNowPage(StorageLogPageReqVO pageReqVO) { + PageResult storageLogNowDOPageResult = storageLogNowMapper.selectPage(pageReqVO); return storageLogNowMapper.selectPage(pageReqVO); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java index ff504d1..30bf443 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/taskdispatch/TaskDispatchServiceImpl.java @@ -3,16 +3,12 @@ package com.chanko.yunxi.mes.module.heli.service.taskdispatch; import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; import com.chanko.yunxi.mes.framework.common.exception.ErrorCode; import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils; import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX; import com.chanko.yunxi.mes.framework.operatelog.core.enums.OperateTypeEnum; -import com.chanko.yunxi.mes.module.heli.controller.admin.processbom.vo.ProcessBomImportExcelVO; import com.chanko.yunxi.mes.module.heli.controller.admin.taskdispatch.vo.*; import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO; @@ -22,10 +18,8 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatch import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO; import com.chanko.yunxi.mes.module.heli.dal.mysql.equipmanufacture.EquipManufactureMapper; -import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuser.FpUserMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuserdetail.FpUserDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper; -import com.chanko.yunxi.mes.module.heli.dal.mysql.plansub.PlanSubMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper; @@ -34,21 +28,15 @@ import com.chanko.yunxi.mes.module.heli.enums.*; import com.chanko.yunxi.mes.module.heli.manager.CrossOrderManager; import com.chanko.yunxi.mes.module.heli.service.pgmaster.PgMasterService; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; -import com.chanko.yunxi.mes.module.heli.service.zjbgmasterline.ZjBgMasterLineService; import com.chanko.yunxi.mes.module.heli.service.zjpgmaster.ZjPgMasterService; import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; import com.chanko.yunxi.mes.module.system.service.user.AdminUserService; -import org.apache.commons.lang3.SerializationUtils; -import org.apache.poi.ss.formula.functions.T; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Isolation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.io.ByteArrayOutputStream; -import java.io.ObjectOutputStream; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.SimpleDateFormat; @@ -127,7 +115,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { throw exception(PROCESS_BOM_DETAIL_NOT_EXISTS); } } - // 更新 TaskDispatchDO updateObj = BeanUtils.toBean(updateReqVO, TaskDispatchDO.class); if(!updateObj.canOperate(operateTypeEnum)){ @@ -136,11 +123,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { // 明细工序状态更新 if(operateTypeEnum == OperateTypeEnum.SUBMIT){ updateReqVO.getTaskDispatchDetails().forEach(taskDispatchDetailDO -> { - if(taskDispatchDetailDO.getProcedureStatus().intValue() == 0 || - (taskDispatchDetailDO.getBeforeAmount()!=null && taskDispatchDetailDO.getAmount()!=null && taskDispatchDetailDO.getAmount() != taskDispatchDetailDO.getBeforeAmount()) - || (taskDispatchDetailDO.getBeforeAmount() == null && taskDispatchDetailDO.getAmount() != null) - || (taskDispatchDetailDO.getBeforeAmount() != null && taskDispatchDetailDO.getAmount() == null) + if(taskDispatchDetailDO.getProcedureStatus().intValue() == 0||taskDispatchDetailDO.getBeforeAmount()!=taskDispatchDetailDO.getAmount() ){ + taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount()); taskDispatchDetailDO.setProcedureStatus(TaskDispatchProcedureStatusEnum.SUBMITTED.getCode()); } }); @@ -155,12 +140,15 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { taskDispatchDetailDO.setProcedureStatus(TaskDispatchProcedureStatusEnum.DEFAULT.getCode()); } - }); + }); } updateObj.setDispatchStatus(TaskDispatchStatusEnum.valueOf(updateReqVO.getActive()).getCode()); taskDispatchMapper.updateById(updateObj); // 更新子表 - updateTaskDispatchDetailList(updateReqVO.getId(), updateReqVO.getTaskDispatchDetails()); + if(operateTypeEnum != OperateTypeEnum.CANCEL_SUBMIT){ + updateTaskDispatchDetailList(updateReqVO.getId(), updateReqVO.getTaskDispatchDetails()); + } + } @Override @@ -221,7 +209,11 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { @Override public PageResult planBbPage(TaskPlanJDBaoBiaoPageReqVO pageReqVO) { - PageResult taskDispatchDOPageResult = taskDispatchDetailMapper.planBbPage(pageReqVO); + pageReqVO.setPageNo((pageReqVO.getPageNo()-1)*pageReqVO.getPageSize()); + List taskDispatchDOList = taskDispatchDetailMapper.planBb(pageReqVO); + List taskDispatchDOList1 = taskDispatchDetailMapper.planBbPage(pageReqVO); + int totalPage = new BigDecimal(taskDispatchDOList.size()).divide(new BigDecimal(pageReqVO.getPageSize()), 0, RoundingMode.CEILING).intValue(); + PageResult taskDispatchDOPageResult = new PageResult<>(taskDispatchDOList1, Long.parseLong(String.valueOf(taskDispatchDOList.size())), totalPage); return taskDispatchDOPageResult; } @Override @@ -317,10 +309,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { List taskDispatchDetailDOS = taskDispatchDetailMapper.selectListByDispatchId(dispatchId); for (TaskDispatchDetailDO taskDispatchDetailDO : taskDispatchDetailDOS) { taskDispatchDetailDO.setBeginProduce(taskReportMapper.hasReport(taskDispatchDetailDO.getId())) ; - if (taskDispatchDetailDO.getAmount()!=null){ - - taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount()); - } } return taskDispatchDetailDOS; } @@ -357,31 +345,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { postIds.add(fpUserDetailDO.getPostId()); } PageResult taskDispatchDetailDOPageResult = taskDispatchDetailMapper.selectPageWx(pageReqVO, postIds); -// List list = taskDispatchDetailDOPageResult.getList(); -// List afterList = new ArrayList<>(); -// if (CollUtil.isNotEmpty(list)){ -// Map> collect ; -// if(pageReqVO.getProcedureStatusList().size()==1 && pageReqVO.getProcedureStatusList().get(0)==2){ -// collect = list.stream() -// .collect(Collectors.groupingBy( -// TaskDispatchDetailDO::getDispatchCode, -// () -> new TreeMap<>(Comparator.reverseOrder()), -// Collectors.toList() -// )); -// -// }else { -// collect = list.stream() -// .collect(Collectors.groupingBy( -// TaskDispatchDetailDO::getDispatchCode, -// TreeMap::new, -// Collectors.toList() -// )); -// } -// collect.forEach((code,list2)->{ -// afterList.addAll(list2); -// }); -// } -// taskDispatchDetailDOPageResult.setList(afterList); return taskDispatchDetailDOPageResult; } @Override @@ -451,12 +414,15 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { } // 不能超额报工 - if(operate == TaskReportOperateEnum.SUBMIT){ + if(operate==TaskReportOperateEnum.START || operate == TaskReportOperateEnum.SUBMIT){ List historyReportList = taskReportMapper.selectList(new LambdaQueryWrapper() {{ eq(TaskReportDO::getDispatchDetailId, taskDispatchDetailDO.getId()) .ne(TaskReportDO::getAmount, 0); }}); int historyReportAmount = historyReportList.stream().mapToInt(TaskReportDO::getAmount).sum(); + if (taskDispatchDetailDO.getAmount() <= historyReportAmount){ + throw exception(TASK_DISPATCH_TASK_IS_OVER); + } if(taskDispatchDetailDO.getAmount() < (historyReportAmount + operateReqVO.getAmount())){ throw exception(TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS); } @@ -652,6 +618,9 @@ public class TaskDispatchServiceImpl implements TaskDispatchService { taskDispatchDetailMapper.updateBatch(updateList); } if(!insertList.isEmpty()) { + for (TaskDispatchDetailDO taskDispatchDetailDO : insertList) { + taskDispatchDetailDO.setBeforeAmount(taskDispatchDetailDO.getAmount()); + } taskDispatchDetailMapper.insertBatch(insertList); //如果插入不为空区分是按人还是按岗位 // Map> groupedByType = insertList.stream().collect(Collectors.groupingBy(vo -> vo.getDispatchType() == null ? 0: vo.getDispatchType())); diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java index 35d3e24..cbd8e2a 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/unqualifiednotification/UnqualifiedNotificationServiceImpl.java @@ -17,8 +17,11 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.unqualifiednotification.Unqual import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum; import com.chanko.yunxi.mes.module.heli.enums.CodeEnum; import com.chanko.yunxi.mes.module.heli.enums.UnqualifiedNotificationStatusEnum; +import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; import com.chanko.yunxi.mes.module.heli.service.unqualifiednotificationfile.UnqualifiedNotificationFileService; +import com.chanko.yunxi.mes.module.system.api.user.AdminUserApi; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.annotation.Validated; @@ -42,6 +45,11 @@ import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.UNQUALIF @Service @Validated public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificationService { + @Resource + private AdminUserApi userApi; + + @Autowired + private AttentiontodoService attentiontodoService; @Resource private com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMapper bdgzsomthingMapper; @Resource @@ -69,6 +77,24 @@ public class UnqualifiedNotificationServiceImpl implements UnqualifiedNotificati //质检通知单预警 { List attentiontodook = attentiontodoMapper.selectByIdlist(15);// 改 + + String nickname = userApi.getUser( SecurityFrameworkUtils.getLoginUser().getId()).getNickname(); + List attentiontodook1 = attentiontodoService.getAttentiontodolistdaiban(15); + if (attentiontodook1.size()<1){ + { + + AttentiontodoDO attentiontodoDO = new AttentiontodoDO(); + attentiontodoDO.setEvent("质检通知单"); + attentiontodoDO.setAttr5("1"); + attentiontodoDO.setAttr4(nickname); + attentiontodoDO.setLevel("1"); + attentiontodook.add(attentiontodoDO); + + } + + } + + for (AttentiontodoDO attentiontodoRespVO : attentiontodook) { { // for (StorageLogNowDO storageLogNowDO : pageResult) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java index ef3e249..d790a47 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/zjpgmaster/ZjPgMasterServiceImpl.java @@ -12,6 +12,8 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper; import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum; import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService; +import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO; +import com.chanko.yunxi.mes.module.system.dal.mysql.user.AdminUserMapper; import org.springframework.stereotype.Service; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -57,11 +59,15 @@ public class ZjPgMasterServiceImpl implements ZjPgMasterService { @Resource private MouldTypeMapper mouldTypeMapper; - + @Resource + private AdminUserMapper adminUserMapper; @Override public ZjPgMasterLineDO getLine(Integer id) { - return zjPgMasterLineMapper.selectById(id); + ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(id); + AdminUserDO adminUserDO = adminUserMapper.selectById(zjPgMasterLineDO.getDetilUser()); + zjPgMasterLineDO.setNickName(adminUserDO.getNickname()); + return zjPgMasterLineDO; } @Override public ZjPgMasterLineDO getTaskDispatchDetail(ZjPgMasterLinePageReqVO pageReqVO){ diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml index 489d617..e0f7432 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/attentiontodo/AttentiontodoMapper.xml @@ -26,5 +26,16 @@ FROM db_attentiontodo a WHERE a.attr2 = #{param1} + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml index 2da8b54..22e1ca3 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/deliverorder/DeliverOrderMapper.xml @@ -40,6 +40,35 @@ t.id ORDER BY t.id DESC + + + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml index c87a676..6de4a09 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/pgmaster/PgMasterMapper.xml @@ -31,6 +31,29 @@ FROM quality_bg_master_line WHERE zj_mx_id = b.zj_mx_id GROUP BY zj_mx_id ) +) + + + @@ -60,5 +83,32 @@ GROUP BY zj_mx_id + + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml index 6d37cd5..018b113 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/plan/PlanMapper.xml @@ -155,5 +155,151 @@ where a.progress not like '%100%' + \ No newline at end of file diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml index 818c3ca..d1da2f8 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/storagelog/StorageLogNowMapper.xml @@ -109,12 +109,13 @@ b.mat_code id, b.create_time, b.mat_name, - b.total_storage_ok_qty + b.total_storage_ok_qty, + b.creator FROM (SELECT mat_code, create_time, - mat_name, + mat_name,creator, id, SUM(storage_ok_qty) AS total_storage_ok_qty FROM @@ -123,13 +124,45 @@ mat_code, create_time, mat_name, - id) b + id,creator) b JOIN base_material a ON b.mat_code = a.code WHERE b.total_storage_ok_qty < a.inv_safe and a.tenant_id =#{param1} + + + SELECT d.code AS projectCode, + d.project_name AS projectName, + g.task_no AS taskNo, 0 AS planType, + e.name AS projectSubName, + c.material_name AS materialName, + f.name AS procdureName, + t.work_time AS workTime, + t.owner, + b.dispatch_type as type, + t.amount AS amount, + COALESCE(SUM(CASE WHEN h.work_time IS NULL THEN 0 ELSE h.work_time END), 0) AS bgWorkTime, + COALESCE(SUM(CASE WHEN h.amount IS NULL THEN 0 ELSE h.amount END), 0) AS bgAmount, + t.procedure_status AS wgType, t.end_time AS endTime + FROM pro_task_dispatch_detail t + LEFT JOIN pro_task_dispatch b ON (b.id = t.dispatch_id AND b.tenant_id = 2 AND b.deleted = 0) + LEFT JOIN pro_task_report h ON (h.dispatch_detail_id = t.id AND h.tenant_id = 2 AND h.deleted = 0) + LEFT JOIN pro_process_bom_detail c ON (c.id = b.bom_detail_id AND c.tenant_id = 2 AND c.deleted = 0) + LEFT JOIN project_sale_order d ON (d.id = b.project_id AND d.tenant_id = 2 AND d.deleted = 0) + LEFT JOIN project_sale_order_sub e ON (e.id = b.project_sub_id AND e.tenant_id = 2 AND e.deleted = 0) + LEFT JOIN base_procedure f ON (f.id = t.procedure_id AND f.tenant_id = 2 AND f.deleted = 0) + LEFT JOIN project_plan_task g ON (g.id = b.task_id AND g.tenant_id = 2 AND g.deleted = 0) + WHERE t.deleted = 0 AND t.tenant_id = 2 + + AND d.code = #{reqVO.projectCode} + + + AND d.project_name = #{reqVO.projectName} + + + AND g.task_no = #{reqVO.taskNo} + + + AND e.name = #{reqVO.projectSubName} + + + AND c.material_name = #{reqVO.materialName} + + + AND t.owner = #{reqVO.owner} + + GROUP BY t.id + limit #{reqVO.pageNo},#{reqVO.pageSize} + + diff --git a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/taskdispatch/TaskDispatchMapper.xml b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/taskdispatch/TaskDispatchMapper.xml index 920ef4c..718ec07 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/taskdispatch/TaskDispatchMapper.xml +++ b/mes-module-heli/mes-module-heli-biz/src/main/resources/mapper/taskdispatch/TaskDispatchMapper.xml @@ -28,6 +28,24 @@ where d.dispatch_id =c.id and c.dispatch_type ='ASSEMBLE' + + + + + + + select c.code,d.end_time project_end_time,d.creator from pro_task_dispatch c,(SELECT b.*, COALESCE(SUM(a.amount), 0) AS total_amount + FROM pro_task_dispatch_detail b + LEFT JOIN pro_task_report a ON a.dispatch_detail_id = b.id + WHERE b.end_time <= DATE_ADD(CURDATE(), INTERVAL 1 DAY) + GROUP BY b.id + HAVING COALESCE(SUM(a.amount), 0) < b.amount) d + where d.dispatch_id =c.id and c.dispatch_type ='PRODUCTION' + + DELETE FROM pro_task_dispatch_detail WHERE dispatch_id IN diff --git a/mes-ui/mes-ui-admin-vue3/src/api/heli/master/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/heli/master/index.ts index 08cc80f..1cbdc7f 100644 --- a/mes-ui/mes-ui-admin-vue3/src/api/heli/master/index.ts +++ b/mes-ui/mes-ui-admin-vue3/src/api/heli/master/index.ts @@ -1,46 +1,43 @@ -import request from '@/config/axios' - -export interface MasterVO { - id: number - jyUser: string - jyType: number - jyBm: string - jyYt: string - rem: string - jyMaster: string - jyNum: number - ghNum: number - jyTime: Date - ghTime: Date - ghType: number -} - -// 查询借用主分页 -export const getMasterPage = async (params) => { - return await request.get({ url: `/heli/master/page`, params }) -} - -// 查询借用主详情 -export const getMaster = async (id: number) => { - return await request.get({ url: `/heli/master/get?id=` + id }) -} - -// 新增借用主 -export const createMaster = async (data: MasterVO) => { - return await request.post({ url: `/heli/master/create`, data }) -} - -// 修改借用主 -export const updateMaster = async (data: MasterVO) => { - return await request.put({ url: `/heli/master/update`, data }) -} - -// 删除借用主 -export const deleteMaster = async (id: number) => { - return await request.delete({ url: `/heli/master/delete?id=` + id }) -} - -// 导出借用主 Excel -export const exportMaster = async (params) => { - return await request.download({ url: `/heli/master/export-excel`, params }) -} \ No newline at end of file +import request from '@/config/axios' + +export interface MasterVO { + id: number + jyBm: string + jyYt: string + rem: string + jyMaster: string + jyUser: number + jyType: number + num: number + jyDate:Date +} + +// 查询借用主分页 +export const getMasterPage = async (params) => { + return await request.get({ url: `/heli/master/page`, params }) +} + +// 查询借用主详情 +export const getMaster = async (id: number) => { + return await request.get({ url: `/heli/master/get?id=` + id }) +} + +// 新增借用主 +export const createMaster = async (data: MasterVO) => { + return await request.post({ url: `/heli/master/create`, data }) +} + +// 修改借用主 +export const updateMaster = async (data: MasterVO) => { + return await request.put({ url: `/heli/master/update`, data }) +} + +// 删除借用主 +export const deleteMaster = async (id: number) => { + return await request.delete({ url: `/heli/master/delete?id=` + id }) +} + +// 导出借用主 Excel +export const exportMaster = async (params) => { + return await request.download({ url: `/heli/master/export-excel`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/components/Form/src/Form.vue b/mes-ui/mes-ui-admin-vue3/src/components/Form/src/Form.vue index 3acc10a..83ba8eb 100644 --- a/mes-ui/mes-ui-admin-vue3/src/components/Form/src/Form.vue +++ b/mes-ui/mes-ui-admin-vue3/src/components/Form/src/Form.vue @@ -35,7 +35,7 @@ export default defineComponent({ type: Array as PropType, default: () => [] }, - // 是否需要栅格布局 + // 需要栅格布局 // update by 芋艿:将 true 改成 false,因为项目更常用这种方式 isCol: propTypes.bool.def(false), // 表单数据对象 diff --git a/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts b/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts index da1f712..8bce072 100644 --- a/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts +++ b/mes-ui/mes-ui-admin-vue3/src/utils/dict.ts @@ -266,6 +266,8 @@ export enum DICT_TYPE { HELI_SHENHE='heli_shenhe',//审核类型 PICKCAR='pickcar',//审核类型 + HELI_BORROW_TYPE='heli_borrow_type',//员工借用物料类型 + HELI_USE='heli_use',//员工借用物料用途 PICKMODE='pickmode',//领料模式 DB_LEVEL='db_level',//代办级别 diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/PriceQuoteRecord/detail.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/PriceQuoteRecord/detail.vue index 4b43bb8..2682f62 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/PriceQuoteRecord/detail.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/PriceQuoteRecord/detail.vue @@ -43,7 +43,7 @@ - + @@ -54,8 +54,8 @@ v-for="dict in getIntDictOptions(DICT_TYPE.HELI_KEHUXIANZHUANG)" :key="dict.valu - - + + - + @@ -86,7 +86,7 @@ v-for="dicts in getIntDictOptions(DICT_TYPE.HELI_TOUBIAOJIEGUO)" :key="dicts.val - +