diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansub/PlanSubController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansub/PlanSubController.java index 4196b605..2317fda4 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansub/PlanSubController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansub/PlanSubController.java @@ -1,5 +1,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.plansub; +import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailPageReqVO; +import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailRespVO; import com.chanko.yunxi.mes.module.heli.controller.admin.shopCalendar.vo.ShopCalendarRespVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.shopCalendar.ShopCalendarDO; import org.springframework.web.bind.annotation.*; @@ -74,7 +76,6 @@ public class PlanSubController { public CommonResult getSearchRlTs(@RequestParam("startDateTime") String startDateTime,@RequestParam("endDateTime") String endDateTime) { Integer planSubDOList = planSubService.getSearchRlTs(startDateTime,endDateTime); return success(planSubDOList); - } @GetMapping("/getOwnderMp") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/PlanSubDetailController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/PlanSubDetailController.java index 779cb1d8..788e4ca4 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/PlanSubDetailController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/PlanSubDetailController.java @@ -1,5 +1,6 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail; +import com.chanko.yunxi.mes.module.heli.service.plansub.PlanSubService; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import org.springframework.validation.annotation.Validated; @@ -37,14 +38,14 @@ public class PlanSubDetailController { @Resource private PlanSubDetailService planSubDetailService; - + @Resource + private PlanSubService planSubService; @PostMapping("/create") @Operation(summary = "创建生产计划子项目设计时间明细") @PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:create')") public CommonResult createPlanSubDetail(@Valid @RequestBody PlanSubDetailSaveReqVO createReqVO) { return success(planSubDetailService.createPlanSubDetail(createReqVO)); } - @PutMapping("/update") @Operation(summary = "更新生产计划子项目设计时间明细") @PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:update')") @@ -52,7 +53,6 @@ public class PlanSubDetailController { planSubDetailService.updatePlanSubDetail(updateReqVO); return success(true); } - @DeleteMapping("/delete") @Operation(summary = "删除生产计划子项目设计时间明细") @Parameter(name = "id", description = "编号", required = true) @@ -60,7 +60,6 @@ public class PlanSubDetailController { public CommonResult deletePlanSubDetail(@RequestParam("id") Long id) { return planSubDetailService.deletePlanSubDetail(id); } - @GetMapping("/get") @Operation(summary = "获得生产计划子项目设计时间明细") @Parameter(name = "id", description = "编号", required = true, example = "1024") @@ -69,9 +68,6 @@ public class PlanSubDetailController { PlanSubDetailDO planSubDetail = planSubDetailService.getPlanSubDetail(id); return success(BeanUtils.toBean(planSubDetail, PlanSubDetailRespVO.class)); } - - - @GetMapping("/page") @Operation(summary = "获得生产计划子项目设计时间明细分页") @PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')") @@ -103,7 +99,13 @@ public class PlanSubDetailController { public CommonResult getSearchRlTs(@RequestParam("startDateTime") String startDateTime) { Integer planSubDOList = planSubDetailService.getSearchRlTs(startDateTime); return success(planSubDOList); - + } + @PostMapping("/getSearchRlT") + @Operation(summary = "查询修改的时间是否大于前一个时间段时间") + @Parameter(name = "names", description = "负责人", required = true) + public CommonResult getSearchRlT(@RequestBody PlanSubDetailRespVO pageReqVO) { + Integer planSubDOList = planSubService.getSearchRlT(pageReqVO); + return success(planSubDOList); } @PostMapping("/modification") @Operation(summary = "修改生产计划子项目设计时间明细") @@ -135,8 +137,6 @@ public class PlanSubDetailController { } - - @PostMapping("/insertWork") @Operation(summary = "插活") public CommonResult insertWork(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) { diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailPageReqVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailPageReqVO.java index a40ac6ab..5c7ebc22 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailPageReqVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailPageReqVO.java @@ -78,4 +78,5 @@ public class PlanSubDetailPageReqVO extends PageParam { private String planNo; + } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailRespVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailRespVO.java index aedc2884..47a9afb6 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailRespVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/plansubdetail/vo/PlanSubDetailRespVO.java @@ -80,4 +80,6 @@ public class PlanSubDetailRespVO { private String projectCode; private String planNo; private String projectSubName ; + private String projectNameSim ; + private LocalDateTime time ; } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/PurchaseOrderMakeController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/PurchaseOrderMakeController.java index 4fd2513c..3c7be211 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/PurchaseOrderMakeController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/PurchaseOrderMakeController.java @@ -104,6 +104,17 @@ public class PurchaseOrderMakeController { BeanUtils.toBean(list, PurchaseOrderMakeRespVO.class)); } + @GetMapping("/exportOut") + @Operation(summary = "导出采购单审批") + @OperateLog(type = EXPORT) + public void exportOut(@Valid PurchaseOrderMakePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + + List list = purchaseOrderMakeService.getPurchaseOrderMakePages(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "采购单审批.xls", "数据", PurchaseOrderMakeRespVO.class, + BeanUtils.toBean(list, PurchaseOrderMakeRespVO.class)); + } @GetMapping("/getPartPurchaseOrderPage") @Operation(summary = "获得零件采购订单生成分页") // @PreAuthorize("@ss.hasPermission('heli:material-plan:query')") diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/vo/PurchaseOrderMakeRespVO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/vo/PurchaseOrderMakeRespVO.java index 59d573a3..ce282d1b 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/vo/PurchaseOrderMakeRespVO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/purchaseordermake/vo/PurchaseOrderMakeRespVO.java @@ -1,6 +1,8 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo; import com.baomidou.mybatisplus.annotation.TableField; +import com.chanko.yunxi.mes.framework.excel.core.annotations.DictFormat; +import com.chanko.yunxi.mes.framework.excel.core.convert.DictConvert; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -16,79 +18,107 @@ import com.alibaba.excel.annotation.*; public class PurchaseOrderMakeRespVO { @Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "29741") - @ExcelProperty("自增字段,唯一") +// @ExcelProperty("自增字段,唯一") private Long id; + @ExcelProperty("送审日期") + private String time; + @ExcelProperty("子项目编码") + private String projectSubCode; + @ExcelProperty("图号") + private String blueprintNo; + @ExcelProperty("零件名称") + private String boomName; + @ExcelProperty("规格") + private String boomSpec; + @ExcelProperty("材料") + private String composition; + @ExcelProperty("工序") + private String procedureName; + @ExcelProperty("需求数量") + private String boomAmount; + @ExcelProperty("采购数量") + private String purchaseAmount; + @ExcelProperty("供应商") + private String supplierName; + @ExcelProperty("单价") + private String unitPrice; @Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("采购单号") + private String purchaseNo; @Schema(description = "采购合同号") - @ExcelProperty("采购合同号") +// @ExcelProperty("采购合同号") private String contractNo; @Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "1") - @ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购") +// @ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购") private Integer purchaseType; @Schema(description = "采购物类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @ExcelProperty("采购物类型,1物料,2加工件") +// @ExcelProperty("采购物类型,1物料,2加工件") private Integer goodsType; @Schema(description = "结算币种", example = "2") - @ExcelProperty("结算币种") +// @ExcelProperty("结算币种") private Integer currencyType; @Schema(description = "税率") - @ExcelProperty("税率") +// @ExcelProperty("税率") private Integer taxRatio; @Schema(description = "暂估价金额", example = "13902") - @ExcelProperty("暂估价金额") + @ExcelProperty("总价") private BigDecimal estimatedPrice; - + @ExcelProperty("责任人") + private String duEmpName; + @ExcelProperty(value = "收货状态", converter = DictConvert.class) + @DictFormat("heli_receiving_status") + private String effectiveReceivingStatus; + @ExcelProperty("要求到货日期") + private String requir; @Schema(description = "实际价金额", example = "14735") - @ExcelProperty("实际价金额") +// @ExcelProperty("实际价金额") private BigDecimal actualPrice; @Schema(description = "单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1", example = "2") - @ExcelProperty("单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1") +// @ExcelProperty("单据状态,0 待送审,1已送审,2已审核,3已打回 ,默认是1") private Integer status; @Schema(description = "送审人", example = "17514") - @ExcelProperty("送审人") +// @ExcelProperty("送审人") private Long submitUserId; @Schema(description = "送审时间") - @ExcelProperty("送审时间") +// @ExcelProperty("送审时间") private LocalDateTime submitTime; @Schema(description = "审核人") - @ExcelProperty("审核人") +// @ExcelProperty("审核人") private Long auditor; @Schema(description = "审核时间") - @ExcelProperty("审核时间") +// @ExcelProperty("审核时间") private LocalDateTime auditTime; @Schema(description = "备注", example = "随便") - @ExcelProperty("备注") +// @ExcelProperty("备注") private String description; @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - @ExcelProperty("创建时间") +// @ExcelProperty("创建时间") private LocalDateTime createTime; @Schema(description = "订单id", example = "14178") - @ExcelProperty("订单id") +// @ExcelProperty("订单id") private Long projectId; @Schema(description = "生产计划id", example = "707") - @ExcelProperty("生产计划id") +// @ExcelProperty("生产计划id") private Long projectPlanId; @Schema(description = "客户id", example = "20356") - @ExcelProperty("客户id") +// @ExcelProperty("客户id") private Long customerId; @Schema(description = "客户简称") @@ -96,16 +126,16 @@ public class PurchaseOrderMakeRespVO { private String brief; @Schema(description = "项目名称", example = "芋艿") - @ExcelProperty("项目名称") +// @ExcelProperty("项目名称") private String projectName; @Schema(description = "项目名称简码") - @ExcelProperty("项目名称简码") +// @ExcelProperty("项目名称简码") private String projectNameSim; @Schema(description = "送审人姓名") - @ExcelProperty("送审人姓名") +// @ExcelProperty("送审人姓名") private String submitUserName; @Schema(description = "采购单类型") - @ExcelProperty("采购单类型") +// @ExcelProperty("采购单类型") private String purchaseOrderType; } \ 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/shenhe/ShenheController.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/shenhe/ShenheController.java index c2c83092..ccc3ba4e 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/shenhe/ShenheController.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/controller/admin/shenhe/ShenheController.java @@ -1,95 +1,106 @@ -package com.chanko.yunxi.mes.module.heli.controller.admin.shenhe; - -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.shenhe.vo.*; -import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO; -import com.chanko.yunxi.mes.module.heli.service.shenhe.ShenheService; - -@Tag(name = "管理后台 - 审核") -@RestController -@RequestMapping("/heli/shenhe") -@Validated -public class ShenheController { - - @Resource - private ShenheService shenheService; - - @PostMapping("/create") - @Operation(summary = "创建审核") - @PreAuthorize("@ss.hasPermission('heli:shenhe:create')") - public CommonResult createShenhe(@Valid @RequestBody ShenheSaveReqVO createReqVO) { - return success(shenheService.createShenhe(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新审核") - @PreAuthorize("@ss.hasPermission('heli:shenhe:update')") - public CommonResult updateShenhe(@Valid @RequestBody ShenheSaveReqVO updateReqVO) { - shenheService.updateShenhe(updateReqVO); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除审核") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('heli:shenhe:delete')") - public CommonResult deleteShenhe(@RequestParam("id") Long id) { - shenheService.deleteShenhe(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得审核") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('heli:shenhe:query')") - public CommonResult getShenhe(@RequestParam("id") Long id) { - ShenheDO shenhe = shenheService.getShenhe(id); - return success(BeanUtils.toBean(shenhe, ShenheRespVO.class)); - } - - @GetMapping("/page") - @Operation(summary = "获得审核分页") - @PreAuthorize("@ss.hasPermission('heli:shenhe:query')") - public CommonResult> getShenhePage(@Valid ShenhePageReqVO pageReqVO) { - PageResult pageResult = shenheService.getShenhePage(pageReqVO); - return success(BeanUtils.toBean(pageResult, ShenheRespVO.class)); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出审核 Excel") - @PreAuthorize("@ss.hasPermission('heli:shenhe:export')") - @OperateLog(type = EXPORT) - public void exportShenheExcel(@Valid ShenhePageReqVO pageReqVO, - HttpServletResponse response) throws IOException { - pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); - List list = shenheService.getShenhePage(pageReqVO).getList(); - // 导出 Excel - ExcelUtils.write(response, "审核.xls", "数据", ShenheRespVO.class, - BeanUtils.toBean(list, ShenheRespVO.class)); - } - -} \ No newline at end of file +package com.chanko.yunxi.mes.module.heli.controller.admin.shenhe; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.chanko.yunxi.mes.module.heli.dal.mysql.shenhe.ShenheMapper; +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.shenhe.vo.*; +import com.chanko.yunxi.mes.module.heli.dal.dataobject.shenhe.ShenheDO; +import com.chanko.yunxi.mes.module.heli.service.shenhe.ShenheService; + +@Tag(name = "管理后台 - 审核") +@RestController +@RequestMapping("/heli/shenhe") +@Validated +public class ShenheController { + + @Resource + private ShenheService shenheService; + @Resource + private ShenheMapper shenheMapper; + + @PostMapping("/create") + @Operation(summary = "创建审核") + @PreAuthorize("@ss.hasPermission('heli:shenhe:create')") + public CommonResult createShenhe(@Valid @RequestBody ShenheSaveReqVO createReqVO) { + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(ShenheDO::getShenheName, createReqVO.getShenheName()); + if (shenheMapper.selectCount(lambdaQueryWrapper) > 0) return CommonResult.error(400,"该审核类型已存在,不允许添加多个"); + return success(shenheService.createShenhe(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新审核") + @PreAuthorize("@ss.hasPermission('heli:shenhe:update')") + public CommonResult updateShenhe(@Valid @RequestBody ShenheSaveReqVO updateReqVO) { + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(ShenheDO::getShenheName, updateReqVO.getShenheName()); + lambdaQueryWrapper.ne(ShenheDO::getId, updateReqVO.getId()); + if (shenheMapper.selectCount(lambdaQueryWrapper) > 0) return CommonResult.error(400,"该审核类型已存在,不允许添加多个"); + shenheService.updateShenhe(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除审核") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('heli:shenhe:delete')") + public CommonResult deleteShenhe(@RequestParam("id") Long id) { + shenheService.deleteShenhe(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得审核") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('heli:shenhe:query')") + public CommonResult getShenhe(@RequestParam("id") Long id) { + ShenheDO shenhe = shenheService.getShenhe(id); + return success(BeanUtils.toBean(shenhe, ShenheRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得审核分页") + @PreAuthorize("@ss.hasPermission('heli:shenhe:query')") + public CommonResult> getShenhePage(@Valid ShenhePageReqVO pageReqVO) { + PageResult pageResult = shenheService.getShenhePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ShenheRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出审核 Excel") + @PreAuthorize("@ss.hasPermission('heli:shenhe:export')") + @OperateLog(type = EXPORT) + public void exportShenheExcel(@Valid ShenhePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = shenheService.getShenhePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "审核.xls", "数据", ShenheRespVO.class, + BeanUtils.toBean(list, ShenheRespVO.class)); + } + +} diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/purchaseordermakedetail/PurchaseOrderMakeDetailDO.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/purchaseordermakedetail/PurchaseOrderMakeDetailDO.java index a6ae5de1..e57110e9 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/purchaseordermakedetail/PurchaseOrderMakeDetailDO.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/dataobject/purchaseordermakedetail/PurchaseOrderMakeDetailDO.java @@ -193,6 +193,10 @@ public class PurchaseOrderMakeDetailDO extends BaseDO { @TableField(exist = false) private String duEmpName; @TableField(exist = false) + private String time; + @TableField(exist = false) + private String requir; + @TableField(exist = false) private Integer effectiveReceivingStatus; /** * 零件理论重量 diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordermakedetail/PurchaseOrderMakeDetailMapper.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordermakedetail/PurchaseOrderMakeDetailMapper.java index 4e9e99fb..6f693c59 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordermakedetail/PurchaseOrderMakeDetailMapper.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/dal/mysql/purchaseordermakedetail/PurchaseOrderMakeDetailMapper.java @@ -189,7 +189,8 @@ public interface PurchaseOrderMakeDetailMapper extends BaseMapperX getPlanSubPage(PlanSubPageReqVO pageReqVO); + Integer getSearchRlT(PlanSubDetailRespVO pageReqVO); } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansub/PlanSubServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansub/PlanSubServiceImpl.java index 3f83c309..6bb6164b 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansub/PlanSubServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansub/PlanSubServiceImpl.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.chanko.yunxi.mes.framework.common.exception.ErrorCode; import com.chanko.yunxi.mes.framework.common.pojo.CommonResult; import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX; +import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailPageReqVO; +import com.chanko.yunxi.mes.module.heli.controller.admin.plansubdetail.vo.PlanSubDetailRespVO; import com.chanko.yunxi.mes.module.heli.controller.admin.shopCalendar.vo.ShopCalendarPageReqVO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansubdetail.PlanSubDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO; @@ -26,6 +28,7 @@ import org.springframework.validation.annotation.Validated; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; +import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.*; import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.*; @@ -647,4 +650,19 @@ public class PlanSubServiceImpl implements PlanSubService { return planSubDOPageResult; } + @Override + public Integer getSearchRlT(PlanSubDetailRespVO pageReqVO) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(PlanSubDetailDO::getProjectSubId,pageReqVO.getProjectSubId()); + wrapper.eq(PlanSubDetailDO::getSubType,pageReqVO.getSubType()); + wrapper.eq(PlanSubDetailDO::getSeqNo,pageReqVO.getSeqNo()-1); + PlanSubDetailDO planSubDetailDO = planSubDetailMapper.selectOne(wrapper); + if (ObjectUtil.isNotEmpty(planSubDetailDO)){ + if (!pageReqVO.getTime().toLocalDate().isAfter(planSubDetailDO.getTwoDimDate().toLocalDate())) { + return 0; + } + } + return 1; + } + } diff --git a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansubdetail/PlanSubDetailServiceImpl.java b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansubdetail/PlanSubDetailServiceImpl.java index 6554a5f8..32624705 100644 --- a/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansubdetail/PlanSubDetailServiceImpl.java +++ b/mes-module-heli/mes-module-heli-biz/src/main/java/com/chanko/yunxi/mes/module/heli/service/plansubdetail/PlanSubDetailServiceImpl.java @@ -215,6 +215,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService { planSubDetailDO.setCustomerBrief(planSubDO.getCustomerName()); planSubDetailDO.setPlanNo(planSubDO.getPlanNo()); planSubDetailDO.setProjectName(planSubDO.getProjectNameSim()); + planSubDetailDO.setProjectNameSim(planSubDO.getProjectNameSim()); list.add(planSubDetailDO); } @@ -479,7 +480,12 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService { //该项目名称+子项目名称+类型没有保存,请先修改! return CommonResult.error(400, "该子项目"+planSubDetailDO.getName()+" 设计类型"+type+" ,没有保存请确认!"); }else { - + if (ObjectUtil.isEmpty(planSubDetailDO.getStartTwoDimDate())){ + return CommonResult.error(400, "请选择开始时间!"); + } + if (ObjectUtil.isEmpty(planSubDetailDO.getTwoDimDate())){ + return CommonResult.error(400, "请选择结束时间!"); + } planSubDetailDO.setDesignNum(calculateWorkDays(planSubDetailDO.getStartTwoDimDate(),planSubDetailDO.getTwoDimDate())); ownerSet.add(planSubDetailDO.getTwoDimOwner()); } diff --git a/mes-ui/mes-ui-admin-vue3/src/api/heli/partpurchaseorder/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/heli/partpurchaseorder/index.ts index e4060e80..46f5b3ae 100644 --- a/mes-ui/mes-ui-admin-vue3/src/api/heli/partpurchaseorder/index.ts +++ b/mes-ui/mes-ui-admin-vue3/src/api/heli/partpurchaseorder/index.ts @@ -76,3 +76,6 @@ export const rejects = async (id:number) => { export const approvals = async (data) => { return await request.post({ url: `/heli/purchase-order-make/approvals`,data }) } +export const exportOut = async (params) => { + return await request.download({ url: `/heli/purchase-order-make/exportOut`, params }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/api/heli/plansubdetail/index.ts b/mes-ui/mes-ui-admin-vue3/src/api/heli/plansubdetail/index.ts index fbcc0191..80621f28 100644 --- a/mes-ui/mes-ui-admin-vue3/src/api/heli/plansubdetail/index.ts +++ b/mes-ui/mes-ui-admin-vue3/src/api/heli/plansubdetail/index.ts @@ -69,3 +69,6 @@ export const exportPlanSubDetail = async (params) => { export const getSearchRlTsS = async (startDateTime: string ) => { return await request.get({ url: `/heli/plan-sub-detail/getSearchRlTs?startDateTime=` + startDateTime}) } +export const getSearchRlT = async (data) => { + return await request.post({ url: `/heli/plan-sub-detail/getSearchRlT`, data }) +} diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/interrupt/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/interrupt/index.vue index 822407e9..8e8bde28 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/interrupt/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/interrupt/index.vue @@ -489,7 +489,9 @@ const getAddList = async () => { const params = { projectCode: addQueryParams.projectCode, projectSubName: addQueryParams.projectSubName, - customerBrief:addQueryParams.customerBrief + customerBrief:addQueryParams.customerBrief, + pageNo:addQueryParams.pageNo, + pageSize:addQueryParams.pageSize } const res = await PlansubdetailApi.pageAddList(params) console.log(res) @@ -638,6 +640,14 @@ const currentRow = ref(null) const insertList = ref([]) const beforeList = ref([]) const modification = async (row) => { + if (row.subType==null|| row.subType==''){ + message.error('设计类型不能为空') + return + } + if (row.twoDimOwner==null|| row.twoDimOwner==''){ + message.error('负责人不能为空') + return + } beforeList.value = [] var data = row as unknown as PlansubdetailApi.PlanSubDetailVO const res = await PlansubdetailApi.modificationPlanSubDetail(data) @@ -796,9 +806,18 @@ const handleConfirm = async () => { } // 禁用过去日期 const disabledFutureDates = (time) => { - const today = new Date() - today.setHours(0, 0, 0, 0) - return time.getTime() < today.getTime() + // const today = new Date() + // today.setHours(0, 0, 0, 0) + // return time.getTime() < today.getTime() + const today = new Date(); + today.setHours(0, 0, 0, 0); + + // 计算一周前的日期 + const oneWeekAgo = new Date(today); + oneWeekAgo.setDate(today.getDate() - 7); + + // 禁用一周前的日期(允许选择一周前到以后的所有日期) + return time.getTime() < oneWeekAgo.getTime(); } // 修改删除方法,处理新增行的删除 const handleDelete = async (row) => { @@ -833,6 +852,17 @@ const change1 = async (row: any, type: number) => { isProcessingChange = true try { + if (row.twoDimOwner == null || row.twoDimOwner == '') { + setTimeout(() => { + message.error('负责人不能为空') + }, 100) + if (type === 0) { + row.startTwoDimDate = undefined + } else { + row.twoDimDate = undefined + } + return + } if (row.startTwoDimDate && row.twoDimDate) { const startTime = new Date(row.startTwoDimDate).getTime() const endTime = new Date(row.twoDimDate).getTime() @@ -856,7 +886,7 @@ const change1 = async (row: any, type: number) => { if (!time || isNaN(time.getTime()) || formatDate(time, 'YYYY-MM-DD') == '1970-01-01') return const data = await PlansubdetailApi.getSearchRlTsS(formatDate(time, 'YYYY-MM-DD')) - + row.time = time.getTime() if (data <= 0) { setTimeout(() => { message.error('选择的日期是节假日,请确认!') @@ -868,6 +898,20 @@ const change1 = async (row: any, type: number) => { row.twoDimDate = undefined } } + if (row.seqNo > 1) { + const flag = await PlansubdetailApi.getSearchRlT(row) + if (flag == 0) { + setTimeout(() => { + message.error('选择的日期不能小于等于上一段结束日期,请确认!') + }, 100) + + if (type === 0) { + row.startTwoDimDate = undefined + } else { + row.twoDimDate = undefined + } + } + } } finally { isProcessingChange = false } diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/partpurchasecheck/indexs.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/partpurchasecheck/indexs.vue index 8b5a715e..5fd781db 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/partpurchasecheck/indexs.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/partpurchasecheck/indexs.vue @@ -77,15 +77,15 @@ v-model="queryParams.ownerName" placeholder="请输入责任人" clearable @keyu 重置 - - - - - - - - - + + 导出 + @@ -160,6 +160,7 @@ import {ref} from "vue"; import {ElTable, ElTableColumn} from "element-plus"; import dayjs from "dayjs"; import Print from './print.vue' +import download from "@/utils/download"; const printRef = ref() defineOptions({ name: 'PartPurchaseCheck' }) const router = useRouter() @@ -260,7 +261,7 @@ const print = async () => { message.error("请选择要打印的采购订单,请确认"); return; } - formLoading.value = true; + formLoading.value = true; const printData = list.map((item,index)=>({ 编号:index+1, 日期:item.createTime, @@ -285,10 +286,10 @@ const print = async () => { return; } const printDataStr = JSON.parse(JSON.stringify(printData)); - // 生成打印模板 顺序分别为 编号 日期 客户名 模具名 件号 零件名称 材料 规格 数量 单价 总价格 要求日期 - // 将其放在table中 调用打印 + // 生成打印模板 顺序分别为 编号 日期 客户名 模具名 件号 零件名称 材料 规格 数量 单价 总价格 要求日期 + // 将其放在table中 调用打印 printRef.value.open(printDataStr) - + } catch (error) { console.error("打印失败:", error); @@ -435,19 +436,19 @@ const handleDelete = async (id: number) => { } catch { } } /** 导出按钮操作 */ -// const handleExport = async () => { -// try { -// // 导出的二次确认 -// await message.exportConfirm() -// // 发起导出 -// exportLoading.value = true -// const data = await PurchaseOrderNoDetailApi.exportOutsourcing(queryParams) -// download.excel(data, '外协费用查询.xlsx') -// } catch { -// } finally { -// exportLoading.value = false -// } -// } +const handleExport = async () => { + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出 + exportLoading.value = true + const data = await PartPurchaseOrderApi.exportOut(queryParams) + download.excel(data, '采购单审批.xlsx') + } catch { + } finally { + exportLoading.value = false + } +} const setDefaultDate = () => { queryParams.createTime = [ dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'), diff --git a/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/index.vue b/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/index.vue index d558fafa..0332816f 100644 --- a/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/index.vue +++ b/mes-ui/mes-ui-admin-vue3/src/views/heli/plan/index.vue @@ -47,6 +47,10 @@ 新增 + + 查看工作 @@ -169,6 +173,8 @@ + +