更新
This commit is contained in:
@ -72,6 +72,17 @@ public class BusCailiaoshebeiController extends BaseController {
|
|||||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设计-批次号详细信息
|
||||||
|
*
|
||||||
|
* @param batchNumber 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:cailiaoshebei:spQuery")
|
||||||
|
@GetMapping("/spQuery/{batchNumber}")
|
||||||
|
public R<BusCailiaoshebeiPici> spQuery(@NotNull(message = "主键不能为空") @PathVariable String batchNumber) {
|
||||||
|
return R.ok(busCailiaoshebeiPiciService.queryByBatchNumber(batchNumber));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设计-删除批次号
|
* 设计-删除批次号
|
||||||
*/
|
*/
|
||||||
@ -168,6 +179,17 @@ public class BusCailiaoshebeiController extends BaseController {
|
|||||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计划-批次号详细信息
|
||||||
|
*
|
||||||
|
* @param batchNumber 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:cailiaoshebei:spQueryPlan")
|
||||||
|
@GetMapping("/spQueryPlan/{batchNumber}")
|
||||||
|
public R<BusCailiaoshebeiPici> spQueryPlan(@NotNull(message = "主键不能为空") @PathVariable String batchNumber) {
|
||||||
|
return R.ok(busCailiaoshebeiPiciService.queryByBatchNumber(batchNumber));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划-材料设备清单列表
|
* 计划-材料设备清单列表
|
||||||
*/
|
*/
|
||||||
|
@ -67,11 +67,22 @@ public class BusMaterialbatchdemandplanController extends BaseController {
|
|||||||
@GetMapping("/pcList")
|
@GetMapping("/pcList")
|
||||||
public TableDataInfo<BusCailiaoshebeiPiciVo> pcList(BusCailiaoshebeiPiciPcListReq bo, PageQuery pageQuery) {
|
public TableDataInfo<BusCailiaoshebeiPiciVo> pcList(BusCailiaoshebeiPiciPcListReq bo, PageQuery pageQuery) {
|
||||||
BusCailiaoshebeiPiciBo busCailiaoshebeiPiciBo = BeanUtil.copyProperties(bo, BusCailiaoshebeiPiciBo.class);
|
BusCailiaoshebeiPiciBo busCailiaoshebeiPiciBo = BeanUtil.copyProperties(bo, BusCailiaoshebeiPiciBo.class);
|
||||||
busCailiaoshebeiPiciBo.setCxsj("2"); //计划完成,才能展示需求
|
// busCailiaoshebeiPiciBo.setCxsj("2"); //计划完成,才能展示需求
|
||||||
busCailiaoshebeiPiciBo.setBatchType("2");
|
busCailiaoshebeiPiciBo.setBatchType("2");
|
||||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求-批次号详细信息
|
||||||
|
*
|
||||||
|
* @param batchNumber 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:materialbatchdemandplan:spQuery")
|
||||||
|
@GetMapping("/spQuery/{batchNumber}")
|
||||||
|
public R<BusCailiaoshebeiPici> spQuery(@NotNull(message = "主键不能为空") @PathVariable String batchNumber) {
|
||||||
|
return R.ok(busCailiaoshebeiPiciService.queryByBatchNumber(batchNumber));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需求-删除物资批次号
|
* 需求-删除物资批次号
|
||||||
*/
|
*/
|
||||||
|
@ -29,6 +29,7 @@ import org.dromara.common.excel.utils.ExcelUtil;
|
|||||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialsorderVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMaterialsorderVo;
|
||||||
import org.dromara.cailiaoshebei.service.IBusMaterialsorderService;
|
import org.dromara.cailiaoshebei.service.IBusMaterialsorderService;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物资-设备订货
|
* 物资-设备订货
|
||||||
@ -71,6 +72,17 @@ public class BusMaterialsorderController extends BaseController {
|
|||||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货-批次号详细信息
|
||||||
|
*
|
||||||
|
* @param batchNumber 主键
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:materialsorder:spQuery")
|
||||||
|
@GetMapping("//{batchNumber}")
|
||||||
|
public R<BusCailiaoshebeiPici> spQuery(@NotNull(message = "主键不能为空") @PathVariable String batchNumber) {
|
||||||
|
return R.ok(busCailiaoshebeiPiciService.queryByBatchNumber(batchNumber));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订货-修改订货信息
|
* 订货-修改订货信息
|
||||||
*/
|
*/
|
||||||
@ -96,8 +108,8 @@ public class BusMaterialsorderController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 订货-修改订货信息(供货商修改版)
|
* 订货-修改订货信息(供货商修改版)
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:materialsorder:modifyTheOrderFormGYS")
|
// @SaCheckPermission("cailiaoshebei:materialsorder:modifyTheOrderFormGYS")
|
||||||
@Log(title = "订货-修改订货信息(供货商修改版)", businessType = BusinessType.UPDATE)
|
// @Log(title = "订货-修改订货信息(供货商修改版)", businessType = BusinessType.UPDATE)
|
||||||
@RepeatSubmit()
|
@RepeatSubmit()
|
||||||
@PutMapping("/modifyTheOrderFormGYS")
|
@PutMapping("/modifyTheOrderFormGYS")
|
||||||
public R<Void> modifyTheOrderFormGYS(@Validated(EditGroup.class) @RequestBody ModifyTheOrderFormGYSReq req) {
|
public R<Void> modifyTheOrderFormGYS(@Validated(EditGroup.class) @RequestBody ModifyTheOrderFormGYSReq req) {
|
||||||
@ -111,7 +123,7 @@ public class BusMaterialsorderController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 订货-查询物资设备订货列表(供货商修改版)
|
* 订货-查询物资设备订货列表(供货商修改版)
|
||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:materialsorder:listGYS")
|
// @SaCheckPermission("cailiaoshebei:materialsorder:listGYS")
|
||||||
@GetMapping("/listGYS")
|
@GetMapping("/listGYS")
|
||||||
public TableDataInfo<BusMaterialsorderVo> listGYS(BusMaterialsorderListReq req, PageQuery pageQuery) {
|
public TableDataInfo<BusMaterialsorderVo> listGYS(BusMaterialsorderListReq req, PageQuery pageQuery) {
|
||||||
BusMaterialsorderBo bo = BeanUtil.copyProperties(req, BusMaterialsorderBo.class);
|
BusMaterialsorderBo bo = BeanUtil.copyProperties(req, BusMaterialsorderBo.class);
|
||||||
@ -130,6 +142,7 @@ public class BusMaterialsorderController extends BaseController {
|
|||||||
public TableDataInfo<BusCailiaoshebeiPiciVo> trackPcPlanList(BusCailiaoshebeiPiciPcListReq bo, PageQuery pageQuery) {
|
public TableDataInfo<BusCailiaoshebeiPiciVo> trackPcPlanList(BusCailiaoshebeiPiciPcListReq bo, PageQuery pageQuery) {
|
||||||
BusCailiaoshebeiPiciBo busCailiaoshebeiPiciBo = BeanUtil.copyProperties(bo, BusCailiaoshebeiPiciBo.class);
|
BusCailiaoshebeiPiciBo busCailiaoshebeiPiciBo = BeanUtil.copyProperties(bo, BusCailiaoshebeiPiciBo.class);
|
||||||
busCailiaoshebeiPiciBo.setBatchType("3");
|
busCailiaoshebeiPiciBo.setBatchType("3");
|
||||||
|
busCailiaoshebeiPiciBo.setCxsj("4");
|
||||||
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
return busCailiaoshebeiPiciService.queryPageList(busCailiaoshebeiPiciBo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,6 +156,19 @@ public class BusMaterialsorderController extends BaseController {
|
|||||||
return busMaterialsorderService.queryPageList(bo, pageQuery);
|
return busMaterialsorderService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跟踪-变更物资设备执行状态
|
||||||
|
*/
|
||||||
|
@SaCheckPermission("cailiaoshebei:materialsorder:changeTheStatusOfTheMaterials")
|
||||||
|
@Log(title = "跟踪-变更物资设备执行状态", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit()
|
||||||
|
@PostMapping("/changeTheStatusOfTheMaterials")
|
||||||
|
public R<Void> changeTheStatusOfTheMaterials(ChangeTheStatusOfTheMaterialsReq bo,@RequestPart("file") MultipartFile file) {
|
||||||
|
System.out.println("------------"+bo.toString());
|
||||||
|
BusMaterialsorderBo busMaterialsorderBo = BeanUtil.copyProperties(bo, BusMaterialsorderBo.class);
|
||||||
|
return toAjax(busMaterialsorderService.updateByBo(busMaterialsorderBo,file));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
@ -6,6 +6,8 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import jakarta.validation.constraints.*;
|
import jakarta.validation.constraints.*;
|
||||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.RepertoryDetailsListReq;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.RepertoryDetailsListRes;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||||
@ -41,7 +43,7 @@ public class BusRepertoryDetailsController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@SaCheckPermission("cailiaoshebei:repertoryDetails:list")
|
@SaCheckPermission("cailiaoshebei:repertoryDetails:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo<BusRepertoryDetailsVo> list(BusRepertoryDetailsBo bo, PageQuery pageQuery) {
|
public TableDataInfo<RepertoryDetailsListRes> list(RepertoryDetailsListReq bo, PageQuery pageQuery) {
|
||||||
return busRepertoryDetailsService.queryPageList(bo, pageQuery);
|
return busRepertoryDetailsService.queryPageList(bo, pageQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
package org.dromara.cailiaoshebei.controller;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 铁憨憨
|
||||||
|
* @Date 2025/8/8 11:15
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
public class constant {
|
||||||
|
public static final String MaterialDesign = "materialDesign"; //设计
|
||||||
|
public static final String MaterialsPlans = "materialsPlans"; //计划
|
||||||
|
public static final String BatchRequirements = "batchRequirements"; //需求
|
||||||
|
public static final String EquipmentOrdering = "equipmentOrdering"; //订货
|
||||||
|
}
|
@ -31,12 +31,14 @@ public class BusCailiaoshebeiBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次号
|
* 批次号
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "批次号不能为空")
|
||||||
private String batchNumber;
|
private String batchNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.dromara.cailiaoshebei.domain.bo;
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@ -17,10 +19,12 @@ public class BusCailiaoshebeiPiciPcListReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次号(模糊查询)
|
* 批次号(模糊查询)
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "批次号不能为空")
|
||||||
private String batchNumber;
|
private String batchNumber;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,7 @@ public class BusMaterialbatchdemandplanBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 批次号
|
* 批次号
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "批次号不能为空")
|
||||||
private String batchNumber;
|
private String batchNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,7 +31,7 @@ public class BusMaterialsorderBo extends BaseEntity {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次ID
|
* 批次号
|
||||||
*/
|
*/
|
||||||
private String batchNumber;
|
private String batchNumber;
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ public class BusMaterialsorderBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 需求数量
|
* 需求数量
|
||||||
*/
|
*/
|
||||||
private Long demandQuantity;
|
private int demandQuantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计划到场时间
|
* 计划到场时间
|
||||||
@ -100,5 +100,73 @@ public class BusMaterialsorderBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收数量
|
||||||
|
*/
|
||||||
|
private int acceptanceQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际到货时间
|
||||||
|
*/
|
||||||
|
private LocalDate actualArrival;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求提交时间
|
||||||
|
*/
|
||||||
|
private LocalDate requiredTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货时间
|
||||||
|
*/
|
||||||
|
private LocalDate orderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收时间
|
||||||
|
*/
|
||||||
|
private LocalDate receptionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资执行状态(字典)
|
||||||
|
*/
|
||||||
|
private String materialStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资预期类型(字典)
|
||||||
|
*/
|
||||||
|
private String overdueType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逾期原因
|
||||||
|
*/
|
||||||
|
private String cause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收单(到货必填,pdf或图片)
|
||||||
|
*/
|
||||||
|
private String signatureForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退货单(退货必填,pdf或图片)
|
||||||
|
*/
|
||||||
|
private String returnedSalesReport;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作状态(字典operation_status)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "操作状态不能为空")
|
||||||
|
private String operationStatus;
|
||||||
|
/**
|
||||||
|
* 单据类型(0:无单据 1:签收单,2:退货单 )
|
||||||
|
*/
|
||||||
|
private String billType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package org.dromara.cailiaoshebei.domain.bo;
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@ -14,15 +16,16 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class BusMaterialsorderListReq implements Serializable {
|
public class BusMaterialsorderListReq implements Serializable {
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "项目ID不能为空")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次号
|
* 批次号
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "批次号不能为空")
|
||||||
private String batchNumber;
|
private String batchNumber;
|
||||||
|
|
||||||
/**
|
|
||||||
* 项目ID
|
|
||||||
*/
|
|
||||||
private Long projectId;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,6 @@ public class BusRepertoryDetailsBo extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 数据来源ID
|
* 数据来源ID
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "数据来源ID不能为空")
|
|
||||||
private Long materialsorderId;
|
private Long materialsorderId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,7 +64,7 @@ public class BusRepertoryDetailsBo extends BaseEntity {
|
|||||||
* 变更数量
|
* 变更数量
|
||||||
*/
|
*/
|
||||||
@NotNull(message = "变更数量不能为空")
|
@NotNull(message = "变更数量不能为空")
|
||||||
private Long changeQuantity;
|
private int changeQuantity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最终数量
|
* 最终数量
|
||||||
|
@ -0,0 +1,82 @@
|
|||||||
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 铁憨憨
|
||||||
|
* @Date 2025/8/7 18:58
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ChangeTheStatusOfTheMaterialsReq implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@NotNull(message = "主键不能为空")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收数量
|
||||||
|
*/
|
||||||
|
private int acceptanceQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际到货时间
|
||||||
|
*/
|
||||||
|
private LocalDate actualArrival;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求提交时间
|
||||||
|
*/
|
||||||
|
private LocalDate requiredTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货时间
|
||||||
|
*/
|
||||||
|
private LocalDate orderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收时间
|
||||||
|
*/
|
||||||
|
private LocalDate receptionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作状态(字典operation_status)
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "操作状态不能为空")
|
||||||
|
private String operationStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
@NotNull(message = "状态不能为空")
|
||||||
|
private String materialStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逾期类型
|
||||||
|
*/
|
||||||
|
private String overdueType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逾期原因
|
||||||
|
*/
|
||||||
|
private String cause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据类型(0:无单据 1:签收单,2:退货单)
|
||||||
|
*/
|
||||||
|
private String billType;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
package org.dromara.cailiaoshebei.domain.bo;
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@ -18,11 +20,13 @@ public class MasterDataListReq implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 项目id(必填)
|
* 项目id(必填)
|
||||||
*/
|
*/
|
||||||
|
@NotNull(message = "项目id不能为空")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批次号
|
* 批次号
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "批次号不能为空")
|
||||||
private String batchNumber;
|
private String batchNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.cailiaoshebei.domain.bo;
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
@ -14,16 +15,18 @@ import java.io.Serializable;
|
|||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class PlanExecutionTrackingListReq implements Serializable {
|
public class PlanExecutionTrackingListReq implements Serializable {
|
||||||
/**
|
|
||||||
* 批次号
|
|
||||||
*/
|
|
||||||
private String batchNumber;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目ID
|
* 项目ID
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "项目ID不能为空")
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批次号
|
||||||
|
*/
|
||||||
|
@NotBlank(message = "批次号不能为空")
|
||||||
|
private String batchNumber;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设备材料名称
|
* 设备材料名称
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
package org.dromara.cailiaoshebei.domain.bo;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 铁憨憨
|
||||||
|
* @Date 2025/8/8 16:46
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class RepertoryDetailsListReq implements Serializable {
|
||||||
|
/**
|
||||||
|
* 库存ID
|
||||||
|
*/
|
||||||
|
@NotNull(message = "库存ID不能为空")
|
||||||
|
private Long repertoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料编码
|
||||||
|
*/
|
||||||
|
@NotNull(message = "物料编码不能为空")
|
||||||
|
private String materialCode;
|
||||||
|
}
|
@ -52,6 +52,12 @@ public class BusCailiaoshebeiPiciVo implements Serializable {
|
|||||||
@ExcelProperty(value = "审批计划")
|
@ExcelProperty(value = "审批计划")
|
||||||
private String approvalPlan;
|
private String approvalPlan;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审批计划
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "订货计划")
|
||||||
|
private String approvalOrder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 审批项目
|
* 审批项目
|
||||||
*/
|
*/
|
||||||
|
@ -122,4 +122,54 @@ public class BusMaterialsorderVo implements Serializable {
|
|||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收数量
|
||||||
|
*/
|
||||||
|
private Integer acceptanceQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际到货时间
|
||||||
|
*/
|
||||||
|
private LocalDate actualArrival;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 需求提交时间
|
||||||
|
*/
|
||||||
|
private LocalDate requiredTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订货时间
|
||||||
|
*/
|
||||||
|
private LocalDate orderTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 验收时间
|
||||||
|
*/
|
||||||
|
private LocalDate receptionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资执行状态(字典)
|
||||||
|
*/
|
||||||
|
private String materialStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物资预期类型(字典)
|
||||||
|
*/
|
||||||
|
private String overdueType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 逾期原因
|
||||||
|
*/
|
||||||
|
private String cause;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签收单据
|
||||||
|
*/
|
||||||
|
private String signatureForm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退货单据
|
||||||
|
*/
|
||||||
|
private String returnedSalesReport;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,98 @@
|
|||||||
|
package org.dromara.cailiaoshebei.domain.vo;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||||
|
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author 铁憨憨
|
||||||
|
* @Date 2025/8/8 16:49
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class RepertoryDetailsListRes implements Serializable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "ID")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 项目ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "项目ID")
|
||||||
|
private Long projectId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "库存ID")
|
||||||
|
private Long repertoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备材料名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格型号
|
||||||
|
*/
|
||||||
|
private String specification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据来源ID
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "数据来源ID")
|
||||||
|
private Long materialsorderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料编码
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "物料编码")
|
||||||
|
private String materialCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 原始数量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "原始数量")
|
||||||
|
private Long originalQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更原因
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "变更原因")
|
||||||
|
private String changeReasons;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变更数量
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "变更数量")
|
||||||
|
private Long changeQuantity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作状态(字典)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作状态(字典)", converter = ExcelDictConvert.class)
|
||||||
|
@ExcelDictFormat(dictType = "operation_status")
|
||||||
|
private String operationStatus;
|
||||||
|
private String operationStatusName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作人")
|
||||||
|
private String operationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作人联系电话
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "操作人联系电话")
|
||||||
|
private String operationPhone;
|
||||||
|
}
|
@ -1,7 +1,14 @@
|
|||||||
package org.dromara.cailiaoshebei.mapper;
|
package org.dromara.cailiaoshebei.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.dromara.cailiaoshebei.domain.BusRepertoryDetails;
|
import org.dromara.cailiaoshebei.domain.BusRepertoryDetails;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.BusRepertoryDetailsBo;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.MasterDataListReq;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.RepertoryDetailsListReq;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusRepertoryDetailsVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusRepertoryDetailsVo;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.MasterDataListRes;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.RepertoryDetailsListRes;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -11,5 +18,5 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||||||
* @date 2025-08-04
|
* @date 2025-08-04
|
||||||
*/
|
*/
|
||||||
public interface BusRepertoryDetailsMapper extends BaseMapperPlus<BusRepertoryDetails, BusRepertoryDetailsVo> {
|
public interface BusRepertoryDetailsMapper extends BaseMapperPlus<BusRepertoryDetails, BusRepertoryDetailsVo> {
|
||||||
|
Page<RepertoryDetailsListRes> queryPageList(@Param("bo") RepertoryDetailsListReq bo, @Param("page") Page<RepertoryDetailsListReq> page);
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ public interface IBusCailiaoshebeiPiciService extends IService<BusCailiaoshebeiP
|
|||||||
* @return 物资-批次号
|
* @return 物资-批次号
|
||||||
*/
|
*/
|
||||||
BusCailiaoshebeiPiciVo queryById(Long id);
|
BusCailiaoshebeiPiciVo queryById(Long id);
|
||||||
|
BusCailiaoshebeiPici queryByBatchNumber(String batchNumber);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询物资-批次号列表
|
* 分页查询物资-批次号列表
|
||||||
|
@ -8,6 +8,7 @@ import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -60,7 +61,7 @@ public interface IBusMaterialsorderService extends IService<BusMaterialsorder>{
|
|||||||
* @param bo 物资-设备订货
|
* @param bo 物资-设备订货
|
||||||
* @return 是否修改成功
|
* @return 是否修改成功
|
||||||
*/
|
*/
|
||||||
Boolean updateByBo(BusMaterialsorderBo bo);
|
Boolean updateByBo(BusMaterialsorderBo bo, MultipartFile file);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验并批量删除物资-设备订货信息
|
* 校验并批量删除物资-设备订货信息
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package org.dromara.cailiaoshebei.service;
|
package org.dromara.cailiaoshebei.service;
|
||||||
|
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.RepertoryDetailsListReq;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.BusRepertoryDetailsVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusRepertoryDetailsVo;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusRepertoryDetailsBo;
|
import org.dromara.cailiaoshebei.domain.bo.BusRepertoryDetailsBo;
|
||||||
import org.dromara.cailiaoshebei.domain.BusRepertoryDetails;
|
import org.dromara.cailiaoshebei.domain.BusRepertoryDetails;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.RepertoryDetailsListRes;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||||
|
|
||||||
@ -33,7 +35,7 @@ public interface IBusRepertoryDetailsService extends IService<BusRepertoryDetail
|
|||||||
* @param pageQuery 分页参数
|
* @param pageQuery 分页参数
|
||||||
* @return 物资-库存分页列表
|
* @return 物资-库存分页列表
|
||||||
*/
|
*/
|
||||||
TableDataInfo<BusRepertoryDetailsVo> queryPageList(BusRepertoryDetailsBo bo, PageQuery pageQuery);
|
TableDataInfo<RepertoryDetailsListRes> queryPageList(RepertoryDetailsListReq bo, PageQuery pageQuery);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询符合条件的物资-库存列表
|
* 查询符合条件的物资-库存列表
|
||||||
|
@ -44,6 +44,13 @@ public class BusCailiaoshebeiPiciServiceImpl extends ServiceImpl<BusCailiaoshebe
|
|||||||
return baseMapper.selectVoById(id);
|
return baseMapper.selectVoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BusCailiaoshebeiPici queryByBatchNumber(String batchNumber) {
|
||||||
|
LambdaQueryWrapper<BusCailiaoshebeiPici> lqw = Wrappers.lambdaQuery();
|
||||||
|
lqw.eq(BusCailiaoshebeiPici::getBatchNumber, batchNumber);
|
||||||
|
return baseMapper.selectOne(lqw);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询物资-批次号列表
|
* 分页查询物资-批次号列表
|
||||||
*
|
*
|
||||||
@ -56,14 +63,15 @@ public class BusCailiaoshebeiPiciServiceImpl extends ServiceImpl<BusCailiaoshebe
|
|||||||
LambdaQueryWrapper<BusCailiaoshebeiPici> lqw = buildQueryWrapper(bo);
|
LambdaQueryWrapper<BusCailiaoshebeiPici> lqw = buildQueryWrapper(bo);
|
||||||
//查询设计为已经完成的数据
|
//查询设计为已经完成的数据
|
||||||
if (StringUtils.isNotBlank(bo.getCxsj())) {
|
if (StringUtils.isNotBlank(bo.getCxsj())) {
|
||||||
if ("1".equals(bo.getCxsj())){ //设计
|
if ("1".equals(bo.getCxsj())){ //设计 ok
|
||||||
lqw.eq(BusCailiaoshebeiPici::getApprovalDesign, "finish");
|
lqw.eq(BusCailiaoshebeiPici::getApprovalDesign, "finish");
|
||||||
}else if ("2".equals(bo.getCxsj())){ //计划
|
}else if ("2".equals(bo.getCxsj())){ //计划 ok
|
||||||
lqw.eq(BusCailiaoshebeiPici::getApprovalPlan, "finish");
|
lqw.eq(BusCailiaoshebeiPici::getApprovalPlan, "finish");
|
||||||
}else if ("3".equals(bo.getCxsj())){ //需求
|
}else if ("3".equals(bo.getCxsj())){ //需求
|
||||||
lqw.eq(BusCailiaoshebeiPici::getApprovalPlan, "finish");
|
lqw.eq(BusCailiaoshebeiPici::getApprovalProject, "finish");
|
||||||
|
}else if ("4".equals(bo.getCxsj())){ //订货 ok
|
||||||
|
lqw.eq(BusCailiaoshebeiPici::getApprovalOrder, "finish");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Page<BusCailiaoshebeiPiciVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
Page<BusCailiaoshebeiPiciVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
|
@ -5,6 +5,7 @@ import cn.hutool.core.convert.Convert;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.cailiaoshebei.controller.constant;
|
||||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||||
import org.dromara.cailiaoshebei.domain.BusSuppliesprice;
|
import org.dromara.cailiaoshebei.domain.BusSuppliesprice;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.*;
|
import org.dromara.cailiaoshebei.domain.bo.*;
|
||||||
@ -309,15 +310,14 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
|||||||
*
|
*
|
||||||
* @param processEvent 参数
|
* @param processEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('materialDesign')")
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('"+ constant.MaterialDesign+"')")
|
||||||
public void processHandler(ProcessEvent processEvent) {
|
public void processHandler(ProcessEvent processEvent) {
|
||||||
log.info("物资设计审核任务执行了{}", processEvent.toString());
|
log.info("物资设计审核任务执行了{}", processEvent.toString());
|
||||||
String businessId = processEvent.getBusinessId();
|
String batchNumber = processEvent.getBusinessId().split("_")[0];
|
||||||
//1、根据批次ID改编审核状态
|
//1、根据批次ID改编审核状态
|
||||||
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici();
|
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici().setApprovalDesign(processEvent.getStatus());
|
||||||
busCailiaoshebeiPici.setId(Long.valueOf(businessId));
|
busCailiaoshebeiPiciService.update(busCailiaoshebeiPici, new LambdaQueryWrapper<BusCailiaoshebeiPici>()
|
||||||
busCailiaoshebeiPici.setApprovalDesign(processEvent.getStatus());
|
.eq(BusCailiaoshebeiPici::getBatchNumber, batchNumber));
|
||||||
busCailiaoshebeiPiciService.updateById(busCailiaoshebeiPici);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -330,7 +330,7 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
|||||||
*
|
*
|
||||||
* @param processTaskEvent 参数
|
* @param processTaskEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('materialDesign')")
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('"+ constant.MaterialDesign+"')")
|
||||||
public void processTaskHandler(ProcessTaskEvent processTaskEvent) {
|
public void processTaskHandler(ProcessTaskEvent processTaskEvent) {
|
||||||
log.info("物资设计审核任务创建了{}", processTaskEvent.toString());
|
log.info("物资设计审核任务创建了{}", processTaskEvent.toString());
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
|||||||
*
|
*
|
||||||
* @param processDeleteEvent 参数
|
* @param processDeleteEvent 参数
|
||||||
*/
|
*/
|
||||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('materialDesign')")
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('"+ constant.MaterialDesign+"')")
|
||||||
public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) {
|
public void processDeleteHandler(ProcessDeleteEvent processDeleteEvent) {
|
||||||
log.info("监听物资设计删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
log.info("监听物资设计删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
}
|
}
|
||||||
@ -354,15 +354,14 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
|||||||
*
|
*
|
||||||
* @param processEvent 参数
|
* @param processEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('materialsPlans')")
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('"+ constant.MaterialsPlans+"')")
|
||||||
public void processPlansHandler(ProcessEvent processEvent) {
|
public void processPlansHandler(ProcessEvent processEvent) {
|
||||||
log.info("物资计划审核任务执行了{}", processEvent.toString());
|
log.info("物资计划审核任务执行了{}", processEvent.toString());
|
||||||
String businessId = processEvent.getBusinessId();
|
String batchNumber = processEvent.getBusinessId().split("_")[0];
|
||||||
//1、根据批次ID改编审核状态
|
//1、根据批次ID改编审核状态
|
||||||
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici();
|
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici().setApprovalPlan(processEvent.getStatus());
|
||||||
busCailiaoshebeiPici.setId(Long.valueOf(businessId));
|
busCailiaoshebeiPiciService.update(busCailiaoshebeiPici, new LambdaQueryWrapper<BusCailiaoshebeiPici>()
|
||||||
busCailiaoshebeiPici.setApprovalPlan(processEvent.getStatus());
|
.eq(BusCailiaoshebeiPici::getBatchNumber, batchNumber));
|
||||||
busCailiaoshebeiPiciService.updateById(busCailiaoshebeiPici);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -375,7 +374,7 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
|||||||
*
|
*
|
||||||
* @param processTaskEvent 参数
|
* @param processTaskEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('materialsPlans')")
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('"+ constant.MaterialsPlans+"')")
|
||||||
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
||||||
log.info("物资计划审核任务创建了{}", processTaskEvent.toString());
|
log.info("物资计划审核任务创建了{}", processTaskEvent.toString());
|
||||||
}
|
}
|
||||||
@ -387,7 +386,7 @@ public class BusCailiaoshebeiServiceImpl extends ServiceImpl<BusCailiaoshebeiMap
|
|||||||
*
|
*
|
||||||
* @param processDeleteEvent 参数
|
* @param processDeleteEvent 参数
|
||||||
*/
|
*/
|
||||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('materialsPlans')")
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('"+ constant.MaterialsPlans+"')")
|
||||||
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
||||||
log.info("监听物资计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
log.info("监听物资计划删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.cailiaoshebei.controller.constant;
|
||||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanAddReq;
|
import org.dromara.cailiaoshebei.domain.bo.BusMaterialbatchdemandplanAddReq;
|
||||||
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
||||||
@ -201,19 +202,19 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
|||||||
*
|
*
|
||||||
* @param processEvent 参数
|
* @param processEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('batchRequirements')")
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('"+ constant.BatchRequirements+"')")
|
||||||
public void processPlansHandler(ProcessEvent processEvent) {
|
public void processPlansHandler(ProcessEvent processEvent) {
|
||||||
log.info("批次需求审核任务执行了{}", processEvent.toString());
|
log.info("批次需求审核任务执行了{}", processEvent.toString());
|
||||||
String businessId = processEvent.getBusinessId();
|
String batchNumber = processEvent.getBusinessId().split("_")[0];
|
||||||
|
LambdaQueryWrapper<BusCailiaoshebeiPici> eq = new LambdaQueryWrapper<BusCailiaoshebeiPici>()
|
||||||
|
.eq(BusCailiaoshebeiPici::getBatchNumber, batchNumber);
|
||||||
//1、根据批次ID改编审核状态
|
//1、根据批次ID改编审核状态
|
||||||
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici();
|
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici().setApprovalProject(processEvent.getStatus());
|
||||||
busCailiaoshebeiPici.setId(Long.valueOf(businessId));
|
busCailiaoshebeiPiciService.update(busCailiaoshebeiPici, eq);
|
||||||
busCailiaoshebeiPici.setApprovalProject(processEvent.getStatus());
|
|
||||||
busCailiaoshebeiPiciService.updateById(busCailiaoshebeiPici);
|
|
||||||
//2、如果状态为已完成
|
//2、如果状态为已完成
|
||||||
if (processEvent.getStatus().equals("finish")){
|
if (processEvent.getStatus().equals("finish")){
|
||||||
//2-1、根据批次ID获取到批次数据
|
//2-1、根据批次ID获取到批次数据
|
||||||
BusCailiaoshebeiPici req = busCailiaoshebeiPiciService.getById(Long.valueOf(businessId));
|
BusCailiaoshebeiPici req = busCailiaoshebeiPiciService.getOne(eq);
|
||||||
if (req == null){
|
if (req == null){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -233,7 +234,7 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
|||||||
*
|
*
|
||||||
* @param processTaskEvent 参数
|
* @param processTaskEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('batchRequirements')")
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('"+ constant.BatchRequirements+"')")
|
||||||
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
||||||
log.info("批次需求审核任务创建了{}", processTaskEvent.toString());
|
log.info("批次需求审核任务创建了{}", processTaskEvent.toString());
|
||||||
}
|
}
|
||||||
@ -245,7 +246,7 @@ public class BusMaterialbatchdemandplanServiceImpl extends ServiceImpl<BusMateri
|
|||||||
*
|
*
|
||||||
* @param processDeleteEvent 参数
|
* @param processDeleteEvent 参数
|
||||||
*/
|
*/
|
||||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('batchRequirements')")
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('"+ constant.BatchRequirements+"')")
|
||||||
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
||||||
log.info("监听批次需求删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
log.info("监听批次需求删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
}
|
}
|
||||||
|
@ -6,16 +6,19 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.cailiaoshebei.controller.constant;
|
||||||
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
import org.dromara.cailiaoshebei.domain.BusCailiaoshebeiPici;
|
||||||
import org.dromara.cailiaoshebei.domain.BusMaterialbatchdemandplan;
|
import org.dromara.cailiaoshebei.domain.BusMaterialbatchdemandplan;
|
||||||
|
import org.dromara.cailiaoshebei.domain.BusRepertory;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.BusRepertoryDetailsBo;
|
||||||
import org.dromara.cailiaoshebei.domain.bo.MaterialsorderPcPlanEditReq;
|
import org.dromara.cailiaoshebei.domain.bo.MaterialsorderPcPlanEditReq;
|
||||||
import org.dromara.cailiaoshebei.domain.vo.GrossOutputRes;
|
import org.dromara.cailiaoshebei.domain.vo.GrossOutputRes;
|
||||||
import org.dromara.cailiaoshebei.service.IBusCailiaoshebeiPiciService;
|
import org.dromara.cailiaoshebei.service.*;
|
||||||
import org.dromara.cailiaoshebei.service.IBusMaterialbatchdemandplanService;
|
|
||||||
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
import org.dromara.common.core.domain.event.ProcessDeleteEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessEvent;
|
import org.dromara.common.core.domain.event.ProcessEvent;
|
||||||
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
import org.dromara.common.core.domain.event.ProcessTaskEvent;
|
||||||
import org.dromara.common.core.domain.model.LoginUser;
|
import org.dromara.common.core.domain.model.LoginUser;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -26,6 +29,8 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.dromara.common.satoken.utils.LoginHelper;
|
import org.dromara.common.satoken.utils.LoginHelper;
|
||||||
import org.dromara.common.utils.BatchNumberGenerator;
|
import org.dromara.common.utils.BatchNumberGenerator;
|
||||||
|
import org.dromara.system.domain.vo.SysOssUploadVo;
|
||||||
|
import org.dromara.system.service.ISysOssService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.context.event.EventListener;
|
import org.springframework.context.event.EventListener;
|
||||||
@ -34,12 +39,14 @@ import org.dromara.cailiaoshebei.domain.bo.BusMaterialsorderBo;
|
|||||||
import org.dromara.cailiaoshebei.domain.vo.BusMaterialsorderVo;
|
import org.dromara.cailiaoshebei.domain.vo.BusMaterialsorderVo;
|
||||||
import org.dromara.cailiaoshebei.domain.BusMaterialsorder;
|
import org.dromara.cailiaoshebei.domain.BusMaterialsorder;
|
||||||
import org.dromara.cailiaoshebei.mapper.BusMaterialsorderMapper;
|
import org.dromara.cailiaoshebei.mapper.BusMaterialsorderMapper;
|
||||||
import org.dromara.cailiaoshebei.service.IBusMaterialsorderService;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
import static org.dromara.common.constant.MinioPathConstant.ContactNoticeTemplate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 物资-设备订货Service业务层处理
|
* 物资-设备订货Service业务层处理
|
||||||
*
|
*
|
||||||
@ -61,6 +68,15 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IBusMaterialbatchdemandplanService busMaterialbatchdemandplanService;
|
private IBusMaterialbatchdemandplanService busMaterialbatchdemandplanService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBusRepertoryDetailsService busRepertoryDetailsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBusRepertoryService busRepertoryService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysOssService ossService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询物资-设备订货
|
* 查询物资-设备订货
|
||||||
@ -111,7 +127,6 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
lqw.like(StringUtils.isNotBlank(bo.getName()), BusMaterialsorder::getName, bo.getName());
|
lqw.like(StringUtils.isNotBlank(bo.getName()), BusMaterialsorder::getName, bo.getName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), BusMaterialsorder::getUnit, bo.getUnit());
|
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), BusMaterialsorder::getUnit, bo.getUnit());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), BusMaterialsorder::getSpecification, bo.getSpecification());
|
lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), BusMaterialsorder::getSpecification, bo.getSpecification());
|
||||||
lqw.eq(bo.getDemandQuantity() != null, BusMaterialsorder::getDemandQuantity, bo.getDemandQuantity());
|
|
||||||
lqw.eq(bo.getArrivalTime() != null, BusMaterialsorder::getArrivalTime, bo.getArrivalTime());
|
lqw.eq(bo.getArrivalTime() != null, BusMaterialsorder::getArrivalTime, bo.getArrivalTime());
|
||||||
lqw.eq(bo.getOrderQuantity() != null, BusMaterialsorder::getOrderQuantity, bo.getOrderQuantity());
|
lqw.eq(bo.getOrderQuantity() != null, BusMaterialsorder::getOrderQuantity, bo.getOrderQuantity());
|
||||||
lqw.eq(bo.getExpectedArrival() != null, BusMaterialsorder::getExpectedArrival, bo.getExpectedArrival());
|
lqw.eq(bo.getExpectedArrival() != null, BusMaterialsorder::getExpectedArrival, bo.getExpectedArrival());
|
||||||
@ -143,9 +158,50 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
* @return 是否修改成功
|
* @return 是否修改成功
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateByBo(BusMaterialsorderBo bo) {
|
public Boolean updateByBo(BusMaterialsorderBo bo, MultipartFile file) {
|
||||||
BusMaterialsorder update = MapstructUtils.convert(bo, BusMaterialsorder.class);
|
BusMaterialsorder update = MapstructUtils.convert(bo, BusMaterialsorder.class);
|
||||||
validEntityBeforeSave(update);
|
validEntityBeforeSave(update);
|
||||||
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
|
assert loginUser != null;
|
||||||
|
//查询数据
|
||||||
|
BusMaterialsorder materialsorder = baseMapper.selectById(bo.getId());
|
||||||
|
//得到对应库存的ID
|
||||||
|
LambdaQueryWrapper<BusRepertory> eq = Wrappers.lambdaQuery(BusRepertory.class)
|
||||||
|
.eq(BusRepertory::getProjectId, materialsorder.getProjectId())
|
||||||
|
.eq(BusRepertory::getName, materialsorder.getName())
|
||||||
|
.eq(BusRepertory::getSpecification, materialsorder.getSpecification());
|
||||||
|
BusRepertory repertory = busRepertoryService.getOne(eq);
|
||||||
|
if (repertory == null){
|
||||||
|
throw new ServiceException("未查询到对应库存");
|
||||||
|
}
|
||||||
|
//初始数据
|
||||||
|
String operationStatus = bo.getOperationStatus();
|
||||||
|
BusRepertoryDetailsBo rq = new BusRepertoryDetailsBo();
|
||||||
|
rq.setProjectId(bo.getProjectId());
|
||||||
|
rq.setRepertoryId(repertory.getId());
|
||||||
|
rq.setMaterialsorderId(bo.getId());
|
||||||
|
rq.setMaterialCode(bo.getMaterialCode());
|
||||||
|
rq.setChangeQuantity(bo.getAcceptanceQuantity());
|
||||||
|
rq.setOperationStatus(operationStatus);
|
||||||
|
rq.setOperationName(loginUser.getUsername());
|
||||||
|
// rq.setOperationPhone(loginUser.getNickname());
|
||||||
|
if (bo.getBillType().equals("1")){
|
||||||
|
SysOssUploadVo wordEntity = ossService.uploadWithNoSave(file, ossService.minioFileName(ContactNoticeTemplate,file));
|
||||||
|
bo.setSignatureForm(wordEntity.getUrl());
|
||||||
|
}
|
||||||
|
if (bo.getBillType().equals("2")){
|
||||||
|
SysOssUploadVo wordEntity = ossService.uploadWithNoSave(file, ossService.minioFileName(ContactNoticeTemplate,file));
|
||||||
|
bo.setReturnedSalesReport(wordEntity.getUrl());
|
||||||
|
}
|
||||||
|
//入库
|
||||||
|
if (operationStatus.equals("1")){ //签收
|
||||||
|
//增加库存
|
||||||
|
rq.setChangeReasons("系统入库");
|
||||||
|
busRepertoryDetailsService.insertByBo(rq);
|
||||||
|
}else if(operationStatus.equals("2")){//退货
|
||||||
|
rq.setChangeReasons("系统出库");
|
||||||
|
busRepertoryDetailsService.insertByBo(rq);
|
||||||
|
}
|
||||||
return baseMapper.updateById(update) > 0;
|
return baseMapper.updateById(update) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,8 +236,6 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean extractDataNewAddition(String batchNumber,Long projectId) {
|
public Boolean extractDataNewAddition(String batchNumber,Long projectId) {
|
||||||
// LoginUser loginUser = LoginHelper.getLoginUser();
|
|
||||||
// assert loginUser != null;
|
|
||||||
//1、根据批次号查询主数据
|
//1、根据批次号查询主数据
|
||||||
List<BusMaterialbatchdemandplan> list = busMaterialbatchdemandplanService.list(
|
List<BusMaterialbatchdemandplan> list = busMaterialbatchdemandplanService.list(
|
||||||
new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
new LambdaQueryWrapper<BusMaterialbatchdemandplan>()
|
||||||
@ -227,6 +281,16 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public Boolean modifyTheOrderForm(MaterialsorderPcPlanEditReq req) {
|
public Boolean modifyTheOrderForm(MaterialsorderPcPlanEditReq req) {
|
||||||
|
//根据批次号查询审批状态,状态为草稿才允许修改或新增
|
||||||
|
BusCailiaoshebeiPici bi = busCailiaoshebeiPiciService.getOne(new LambdaQueryWrapper<BusCailiaoshebeiPici>().eq(BusCailiaoshebeiPici::getBatchNumber, req.getBatchNumber()));
|
||||||
|
if (bi == null){
|
||||||
|
throw new RuntimeException("未获取到订货批次数据");
|
||||||
|
}
|
||||||
|
if (!"0".equals(bi.getApprovalProject())){
|
||||||
|
throw new RuntimeException("非草稿状态,不允许修改");
|
||||||
|
}
|
||||||
|
|
||||||
|
//判断是否有数据
|
||||||
List<BusMaterialsorder> list = req.getList();
|
List<BusMaterialsorder> list = req.getList();
|
||||||
if (list.isEmpty()){
|
if (list.isEmpty()){
|
||||||
throw new RuntimeException("未获取到主体数据");
|
throw new RuntimeException("未获取到主体数据");
|
||||||
@ -270,15 +334,14 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
*
|
*
|
||||||
* @param processEvent 参数
|
* @param processEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('equipmentOrdering')")
|
@org.springframework.context.event.EventListener(condition = "#processEvent.flowCode.endsWith('"+ constant.EquipmentOrdering+"')")
|
||||||
public void processPlansHandler(ProcessEvent processEvent) {
|
public void processPlansHandler(ProcessEvent processEvent) {
|
||||||
log.info("批次需求审核任务执行了{}", processEvent.toString());
|
log.info("批次需求审核任务执行了{}", processEvent.toString());
|
||||||
String businessId = processEvent.getBusinessId();
|
String batchNumber = processEvent.getBusinessId().split("_")[0];
|
||||||
//1、根据批次ID改编审核状态
|
//1、根据批次ID改编审核状态
|
||||||
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici();
|
BusCailiaoshebeiPici busCailiaoshebeiPici = new BusCailiaoshebeiPici().setApprovalOrder(processEvent.getStatus());
|
||||||
busCailiaoshebeiPici.setId(Long.valueOf(businessId));
|
busCailiaoshebeiPiciService.update(busCailiaoshebeiPici, new LambdaQueryWrapper<BusCailiaoshebeiPici>()
|
||||||
busCailiaoshebeiPici.setApprovalOrder(processEvent.getStatus());
|
.eq(BusCailiaoshebeiPici::getBatchNumber, batchNumber));
|
||||||
busCailiaoshebeiPiciService.updateById(busCailiaoshebeiPici);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -291,7 +354,7 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
*
|
*
|
||||||
* @param processTaskEvent 参数
|
* @param processTaskEvent 参数
|
||||||
*/
|
*/
|
||||||
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('equipmentOrdering')")
|
@org.springframework.context.event.EventListener(condition = "#processTaskEvent.flowCode.endsWith('"+ constant.EquipmentOrdering+"')")
|
||||||
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
public void processTaskPlansHandler(ProcessTaskEvent processTaskEvent) {
|
||||||
log.info("批次需求审核任务创建了{}", processTaskEvent.toString());
|
log.info("批次需求审核任务创建了{}", processTaskEvent.toString());
|
||||||
// //1、先根据审批id获取到审批号
|
// //1、先根据审批id获取到审批号
|
||||||
@ -328,7 +391,7 @@ public class BusMaterialsorderServiceImpl extends ServiceImpl<BusMaterialsorderM
|
|||||||
*
|
*
|
||||||
* @param processDeleteEvent 参数
|
* @param processDeleteEvent 参数
|
||||||
*/
|
*/
|
||||||
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('equipmentOrdering')")
|
@EventListener(condition = "#processDeleteEvent.flowCode.endsWith('"+ constant.EquipmentOrdering+"')")
|
||||||
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
public void processDeletePlansHandler(ProcessDeleteEvent processDeleteEvent) {
|
||||||
log.info("监听批次需求删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
log.info("监听批次需求删除流程事件,技术标准文件审核任务执行了{}", processDeleteEvent.toString());
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package org.dromara.cailiaoshebei.service.impl;
|
package org.dromara.cailiaoshebei.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.dromara.cailiaoshebei.domain.bo.RepertoryDetailsListReq;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.MasterDataListRes;
|
||||||
|
import org.dromara.cailiaoshebei.domain.vo.RepertoryDetailsListRes;
|
||||||
import org.dromara.common.core.utils.MapstructUtils;
|
import org.dromara.common.core.utils.MapstructUtils;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||||
@ -52,9 +55,10 @@ public class BusRepertoryDetailsServiceImpl extends ServiceImpl<BusRepertoryDeta
|
|||||||
* @return 物资-库存分页列表
|
* @return 物资-库存分页列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public TableDataInfo<BusRepertoryDetailsVo> queryPageList(BusRepertoryDetailsBo bo, PageQuery pageQuery) {
|
public TableDataInfo<RepertoryDetailsListRes> queryPageList(RepertoryDetailsListReq bo, PageQuery pageQuery) {
|
||||||
LambdaQueryWrapper<BusRepertoryDetails> lqw = buildQueryWrapper(bo);
|
// LambdaQueryWrapper<BusRepertoryDetails> lqw = buildQueryWrapper(bo);
|
||||||
Page<BusRepertoryDetailsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
// Page<BusRepertoryDetailsVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||||
|
Page<RepertoryDetailsListRes> result = baseMapper.queryPageList(bo, pageQuery.build());
|
||||||
return TableDataInfo.build(result);
|
return TableDataInfo.build(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +84,6 @@ public class BusRepertoryDetailsServiceImpl extends ServiceImpl<BusRepertoryDeta
|
|||||||
lqw.eq(StringUtils.isNotBlank(bo.getMaterialCode()), BusRepertoryDetails::getMaterialCode, bo.getMaterialCode());
|
lqw.eq(StringUtils.isNotBlank(bo.getMaterialCode()), BusRepertoryDetails::getMaterialCode, bo.getMaterialCode());
|
||||||
lqw.eq(bo.getOriginalQuantity() != null, BusRepertoryDetails::getOriginalQuantity, bo.getOriginalQuantity());
|
lqw.eq(bo.getOriginalQuantity() != null, BusRepertoryDetails::getOriginalQuantity, bo.getOriginalQuantity());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getChangeReasons()), BusRepertoryDetails::getChangeReasons, bo.getChangeReasons());
|
lqw.eq(StringUtils.isNotBlank(bo.getChangeReasons()), BusRepertoryDetails::getChangeReasons, bo.getChangeReasons());
|
||||||
lqw.eq(bo.getChangeQuantity() != null, BusRepertoryDetails::getChangeQuantity, bo.getChangeQuantity());
|
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getOperationStatus()), BusRepertoryDetails::getOperationStatus, bo.getOperationStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getOperationStatus()), BusRepertoryDetails::getOperationStatus, bo.getOperationStatus());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getOperationName()), BusRepertoryDetails::getOperationName, bo.getOperationName());
|
lqw.like(StringUtils.isNotBlank(bo.getOperationName()), BusRepertoryDetails::getOperationName, bo.getOperationName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getOperationPhone()), BusRepertoryDetails::getOperationPhone, bo.getOperationPhone());
|
lqw.eq(StringUtils.isNotBlank(bo.getOperationPhone()), BusRepertoryDetails::getOperationPhone, bo.getOperationPhone());
|
||||||
@ -95,13 +98,13 @@ public class BusRepertoryDetailsServiceImpl extends ServiceImpl<BusRepertoryDeta
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean insertByBo(BusRepertoryDetailsBo bo) {
|
public Boolean insertByBo(BusRepertoryDetailsBo bo) {
|
||||||
BusRepertoryDetails entity = new BusRepertoryDetails();
|
|
||||||
BusRepertoryDetails add = MapstructUtils.convert(bo, BusRepertoryDetails.class);
|
BusRepertoryDetails add = MapstructUtils.convert(bo, BusRepertoryDetails.class);
|
||||||
validEntityBeforeSave(add);
|
validEntityBeforeSave(add);
|
||||||
//1、获取当前数据的最后一条数据,如果没有就直接新增,如果有就获取到上一条然后进行计算
|
//1、获取当前数据的最后一条数据,如果没有就直接新增,如果有就获取到上一条然后进行计算
|
||||||
LambdaQueryWrapper<BusRepertoryDetails> lwr = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<BusRepertoryDetails> lwr = new LambdaQueryWrapper<>();
|
||||||
lwr.eq(bo.getRepertoryId() != null, BusRepertoryDetails::getRepertoryId, bo.getRepertoryId());
|
lwr.eq(bo.getRepertoryId() != null, BusRepertoryDetails::getRepertoryId, bo.getRepertoryId());
|
||||||
lwr.orderByDesc(BusRepertoryDetails::getId);
|
lwr.orderByDesc(BusRepertoryDetails::getId);
|
||||||
|
lwr.last("limit 1");
|
||||||
BusRepertoryDetails busRepertoryDetails = baseMapper.selectOne(lwr);
|
BusRepertoryDetails busRepertoryDetails = baseMapper.selectOne(lwr);
|
||||||
//2、为空,直接新增
|
//2、为空,直接新增
|
||||||
if (busRepertoryDetails==null){
|
if (busRepertoryDetails==null){
|
||||||
|
@ -49,7 +49,7 @@ public class AttendanceJob {
|
|||||||
private IBusProjectService projectService;
|
private IBusProjectService projectService;
|
||||||
|
|
||||||
|
|
||||||
@Scheduled(cron = "0 0/10 * * * ?")
|
// @Scheduled(cron = "0 0/10 * * * ?")
|
||||||
public void clockInMiss() {
|
public void clockInMiss() {
|
||||||
log.info("执行定时任务:上班缺卡记录生成");
|
log.info("执行定时任务:上班缺卡记录生成");
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ public class AttendanceJob {
|
|||||||
log.info("执行定时任务:上班缺卡记录生成完成");
|
log.info("执行定时任务:上班缺卡记录生成完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 0/10 * * * ?")
|
// @Scheduled(cron = "0 0/10 * * * ?")
|
||||||
public void clockOutMiss() {
|
public void clockOutMiss() {
|
||||||
log.info("执行定时任务:下班缺卡记录生成");
|
log.info("执行定时任务:下班缺卡记录生成");
|
||||||
|
|
||||||
|
@ -4,4 +4,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.dromara.cailiaoshebei.mapper.BusRepertoryDetailsMapper">
|
<mapper namespace="org.dromara.cailiaoshebei.mapper.BusRepertoryDetailsMapper">
|
||||||
|
|
||||||
|
<select id="queryPageList" resultType="org.dromara.cailiaoshebei.domain.vo.RepertoryDetailsListRes">
|
||||||
|
select
|
||||||
|
bc.repertory_id as repertoryId,
|
||||||
|
bc.materialsorder_id as materialsorderId,
|
||||||
|
bc.material_code as materialCode,
|
||||||
|
bc.original_quantity as originalQuantity,
|
||||||
|
bc.change_reasons as changeReasons,
|
||||||
|
bc.change_quantity as changeQuantity,
|
||||||
|
bc.final_number as finalNumber,
|
||||||
|
bc.operation_status as operationStatus,
|
||||||
|
bc.operation_name as operationName,
|
||||||
|
bc.operation_phone as operationPhone,
|
||||||
|
bc.create_time as createTime,
|
||||||
|
bsp.name as name,
|
||||||
|
bsp.specification as specification,
|
||||||
|
dp.dict_label as operationStatusName
|
||||||
|
from
|
||||||
|
bus_repertory_details as bc
|
||||||
|
left join bus_repertory as bsp on bc.repertory_id = bsp.id
|
||||||
|
left join sys_dict_data as dp on bc.operation_status = dp.dict_value and dp.dict_type = 'operation_status'
|
||||||
|
<where>
|
||||||
|
<if test="bo.repertoryId != null">
|
||||||
|
and bc.repertory_id = #{bo.repertoryId}
|
||||||
|
</if>
|
||||||
|
<if test="bo.materialCode != null">
|
||||||
|
and bc.material_code like concat('%', #{bo.materialCode}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="bo.name != null">
|
||||||
|
and bsp.name like concat('%', #{bo.name}, '%')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Reference in New Issue
Block a user