入库单管理页面
This commit is contained in:
parent
11893e4cd2
commit
fbab81db2c
@ -65,6 +65,8 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode STORAGE_CHECK_NOT_EXISTS = new ErrorCode(1_003_007, "库存盘点不存在");
|
||||
ErrorCode STORAGE_CHECK_MAT_NOT_EXISTS = new ErrorCode(1_003_008, "盘点物料不存在");
|
||||
ErrorCode BEFORE_STORAGE_NOT_EXISTS = new ErrorCode(1_003_009, "物料原仓库查询错误");
|
||||
ErrorCode STORAGE_IN_NOT_EXISTS = new ErrorCode(1_003_010, "入库单不存在");
|
||||
ErrorCode STORAGE_IN_DETAIL_NOT_EXISTS = new ErrorCode(1_003_011, "入库单明细不存在");
|
||||
/************订单管理***********/
|
||||
ErrorCode PROJECT_ORDER_NOT_EXISTS = new ErrorCode(1_004_001, "项目订单不存在");
|
||||
/************发货管理***********/
|
||||
|
@ -192,4 +192,11 @@ public class MaterialPlanController {
|
||||
public CommonResult<Boolean> supplement(@Valid @RequestBody List<StorageLogNowDO> list) {
|
||||
return success(materialPlanService.supplement(list));
|
||||
}
|
||||
@DeleteMapping("/delMaterial")
|
||||
@Operation(summary = "删除库存补充")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:material-plan:delete')")
|
||||
public CommonResult<Boolean> delMaterial(@RequestParam("id") Long id) {
|
||||
return materialPlanService.delMaterial(id);
|
||||
}
|
||||
}
|
||||
|
@ -66,5 +66,8 @@ public class MaterialPlanPageReqVO extends PageParam {
|
||||
private String matType;
|
||||
@Schema(description = "类型")
|
||||
private String type;
|
||||
@Schema(description = "制单日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] matPlanDate;
|
||||
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagein;
|
||||
|
||||
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.storagein.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.storagein.StorageInService;
|
||||
|
||||
@Tag(name = "管理后台 - 入库单")
|
||||
@RestController
|
||||
@RequestMapping("/heli/storage-in")
|
||||
@Validated
|
||||
public class StorageInController {
|
||||
|
||||
@Resource
|
||||
private StorageInService storageInService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建入库单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:create')")
|
||||
public CommonResult<Long> createStorageIn(@Valid @RequestBody StorageInSaveReqVO createReqVO) {
|
||||
return success(storageInService.createStorageIn(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新入库单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:update')")
|
||||
public CommonResult<Boolean> updateStorageIn(@Valid @RequestBody StorageInSaveReqVO updateReqVO) {
|
||||
storageInService.updateStorageIn(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除入库单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:delete')")
|
||||
public CommonResult<Boolean> deleteStorageIn(@RequestParam("id") Long id) {
|
||||
storageInService.deleteStorageIn(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得入库单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:query')")
|
||||
public CommonResult<StorageInRespVO> getStorageIn(@RequestParam("id") Long id) {
|
||||
StorageInDO storageIn = storageInService.getStorageIn(id);
|
||||
return success(BeanUtils.toBean(storageIn, StorageInRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得入库单分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:query')")
|
||||
public CommonResult<PageResult<StorageInRespVO>> getStorageInPage(@Valid StorageInPageReqVO pageReqVO) {
|
||||
PageResult<StorageInDO> pageResult = storageInService.getStorageInPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StorageInRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出入库单 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStorageInExcel(@Valid StorageInPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StorageInDO> list = storageInService.getStorageInPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "入库单.xls", "数据", StorageInRespVO.class,
|
||||
BeanUtils.toBean(list, StorageInRespVO.class));
|
||||
}
|
||||
@GetMapping("/isPrint")
|
||||
@Operation(summary = "打印")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:query')")
|
||||
public CommonResult<StorageInDO> isPrint(@RequestParam("id") Long id) {
|
||||
|
||||
return success(storageInService.isPrint(id));
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 入库单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class StorageInPageReqVO extends PageParam {
|
||||
@Schema(description = "入库id")
|
||||
private String storageId;
|
||||
@Schema(description = "入库单号")
|
||||
private String storageNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "2")
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "入库单类型,1物料,2加工件", example = "1")
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "9239")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "2208")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 未确认,1已确认", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] printDtime;
|
||||
|
||||
@Schema(description = "入库日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] ordDate;
|
||||
@Schema(description = "子项目名称")
|
||||
private String projectSubName;
|
||||
@Schema(description = "项目名称")
|
||||
private String projectName;
|
||||
@Schema(description = "供应商名称")
|
||||
private String supplierName;
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 入库单 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StorageInRespVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "7657")
|
||||
@ExcelProperty("自增字段,唯一")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入库单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("入库单号")
|
||||
private String storageNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "2")
|
||||
@ExcelProperty("采购单类型,1按物料需求计划采购,2备库采购")
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "入库单类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@ExcelProperty("入库单类型,1物料,2加工件")
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "9239")
|
||||
@ExcelProperty("暂估价金额")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "2208")
|
||||
@ExcelProperty("实际价金额")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 未确认,1已确认", example = "1")
|
||||
@ExcelProperty("单据状态,0 未确认,1已确认")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
@ExcelProperty("是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
@ExcelProperty("打印时间")
|
||||
private LocalDateTime printDtime;
|
||||
|
||||
@Schema(description = "入库日期")
|
||||
@ExcelProperty("入库日期")
|
||||
private Date ordDate;
|
||||
@Schema(description = "供应商")
|
||||
private String supplierName;
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 入库单新增/修改 Request VO")
|
||||
@Data
|
||||
public class StorageInSaveReqVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "7657")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入库单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "入库单号不能为空")
|
||||
private String storageNo;
|
||||
|
||||
@Schema(description = "采购单类型,1按物料需求计划采购,2备库采购", example = "2")
|
||||
private Integer purchaseType;
|
||||
|
||||
@Schema(description = "入库单类型,1物料,2加工件", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "入库单类型,1物料,2加工件不能为空")
|
||||
private Integer goodsType;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "9239")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "2208")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "单据状态,0 未确认,1已确认", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "是否打印")
|
||||
private String isPrint;
|
||||
|
||||
@Schema(description = "打印时间")
|
||||
private LocalDateTime printDtime;
|
||||
|
||||
@Schema(description = "入库日期")
|
||||
private LocalDate ordDate;
|
||||
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.purchaseordermake.vo.PartPurchaseOrderPageRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo.StorageInPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo.StorageInRespVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
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.storageindetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.service.storageindetail.StorageInDetailService;
|
||||
|
||||
@Tag(name = "管理后台 - 入库单明细")
|
||||
@RestController
|
||||
@RequestMapping("/heli/storage-in-detail")
|
||||
@Validated
|
||||
public class StorageInDetailController {
|
||||
|
||||
@Resource
|
||||
private StorageInDetailService storageInDetailService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建入库单明细")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in-detail:create')")
|
||||
public CommonResult<Long> createStorageInDetail(@Valid @RequestBody StorageInDetailSaveReqVO createReqVO) {
|
||||
return success(storageInDetailService.createStorageInDetail(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新入库单明细")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in-detail:update')")
|
||||
public CommonResult<Boolean> updateStorageInDetail(@Valid @RequestBody StorageInDetailSaveReqVO updateReqVO) {
|
||||
storageInDetailService.updateStorageInDetail(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除入库单明细")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in-detail:delete')")
|
||||
public CommonResult<Boolean> deleteStorageInDetail(@RequestParam("id") Long id) {
|
||||
storageInDetailService.deleteStorageInDetail(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得入库单明细")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in-detail:query')")
|
||||
public CommonResult<StorageInDetailRespVO> getStorageInDetail(@RequestParam("id") Long id) {
|
||||
StorageInDetailDO storageInDetail = storageInDetailService.getStorageInDetail(id);
|
||||
return success(BeanUtils.toBean(storageInDetail, StorageInDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得入库单明细分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in-detail:query')")
|
||||
public CommonResult<PageResult<StorageInDetailRespVO>> getStorageInDetailPage(@Valid StorageInDetailPageReqVO pageReqVO) {
|
||||
PageResult<StorageInDetailDO> pageResult = storageInDetailService.getStorageInDetailPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StorageInDetailRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出入库单明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in-detail:export')")
|
||||
@OperateLog(type = EXPORT)
|
||||
public void exportStorageInDetailExcel(@Valid StorageInDetailPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StorageInDetailDO> list = storageInDetailService.getStorageInDetailPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "入库单明细.xls", "数据", StorageInDetailRespVO.class,
|
||||
BeanUtils.toBean(list, StorageInDetailRespVO.class));
|
||||
}
|
||||
@GetMapping("/getByStorageId")
|
||||
@Operation(summary = "根据入库单id获取入库单明细")
|
||||
@PreAuthorize("@ss.hasPermission('heli:storage-in:query')")
|
||||
public CommonResult<PageResult<StorageInDetailRespVO>> getByStorageId(@Valid StorageInDetailPageReqVO pageReqVO) {
|
||||
PageResult<StorageInDetailDO> pageResult = storageInDetailService.getByStorageId(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, StorageInDetailRespVO.class));
|
||||
}
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 入库单明细分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class StorageInDetailPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "入库单id", example = "23487")
|
||||
private Long storageNoId;
|
||||
|
||||
@Schema(description = "加工件boom detail id", example = "32678")
|
||||
private Long boomDetailId;
|
||||
|
||||
@Schema(description = "零件名称", example = "张三")
|
||||
private String boomName;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String boomSpec;
|
||||
|
||||
@Schema(description = "系统单位")
|
||||
private String boomUnit;
|
||||
|
||||
@Schema(description = "材质")
|
||||
private String composition;
|
||||
|
||||
@Schema(description = "采购数量")
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "26185")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "14940")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "预计到货日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] arriveTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "需求数量")
|
||||
private BigDecimal boomAmount;
|
||||
|
||||
@Schema(description = "需求到货日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] requireTime;
|
||||
|
||||
@Schema(description = "物料需求计划id", example = "27752")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
@Schema(description = "物料需求计划子项目id", example = "18434")
|
||||
private Long projectMaterialPlanBoomId;
|
||||
|
||||
@Schema(description = "订单子项目id", example = "2100")
|
||||
private Long projectPlanSubId;
|
||||
|
||||
@Schema(description = "子项目名称,唯一", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "子项目简码")
|
||||
private String nameSim;
|
||||
|
||||
@Schema(description = "订单id", example = "17123")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "生产计划id", example = "31057")
|
||||
private Long projectPlanId;
|
||||
|
||||
@Schema(description = "客户id", example = "3397")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "客户简称")
|
||||
private String brief;
|
||||
|
||||
@Schema(description = "项目名称", example = "李四")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "项目名称简码")
|
||||
private String projectNameSim;
|
||||
|
||||
@Schema(description = "物料id", example = "6259")
|
||||
private Long materialId;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "2")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "供应商id", example = "24202")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "入库数量")
|
||||
private BigDecimal storageAmount;
|
||||
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import com.alibaba.excel.annotation.*;
|
||||
|
||||
@Schema(description = "管理后台 - 入库单明细 Response VO")
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
public class StorageInDetailRespVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "21640")
|
||||
@ExcelProperty("自增字段,唯一")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入库单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23487")
|
||||
@ExcelProperty("入库单id")
|
||||
private Long storageNoId;
|
||||
|
||||
@Schema(description = "加工件boom detail id", example = "32678")
|
||||
@ExcelProperty("加工件boom detail id")
|
||||
private Long boomDetailId;
|
||||
|
||||
@Schema(description = "零件名称", example = "张三")
|
||||
@ExcelProperty("零件名称")
|
||||
private String boomName;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
@ExcelProperty("规格型号")
|
||||
private String boomSpec;
|
||||
|
||||
@Schema(description = "系统单位")
|
||||
@ExcelProperty("系统单位")
|
||||
private String boomUnit;
|
||||
|
||||
@Schema(description = "材质")
|
||||
@ExcelProperty("材质")
|
||||
private String composition;
|
||||
|
||||
@Schema(description = "采购数量")
|
||||
@ExcelProperty("采购数量")
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "26185")
|
||||
@ExcelProperty("暂估价金额")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "14940")
|
||||
@ExcelProperty("实际价金额")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "预计到货日期")
|
||||
@ExcelProperty("预计到货日期")
|
||||
private LocalDateTime arriveTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
@ExcelProperty("备注")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@ExcelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "需求数量")
|
||||
@ExcelProperty("需求数量")
|
||||
private BigDecimal boomAmount;
|
||||
|
||||
@Schema(description = "需求到货日期")
|
||||
@ExcelProperty("需求到货日期")
|
||||
private LocalDateTime requireTime;
|
||||
|
||||
@Schema(description = "物料需求计划id", example = "27752")
|
||||
@ExcelProperty("物料需求计划id")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
@Schema(description = "物料需求计划子项目id", example = "18434")
|
||||
@ExcelProperty("物料需求计划子项目id")
|
||||
private Long projectMaterialPlanBoomId;
|
||||
|
||||
@Schema(description = "订单子项目id", example = "2100")
|
||||
@ExcelProperty("订单子项目id")
|
||||
private Long projectPlanSubId;
|
||||
|
||||
@Schema(description = "子项目名称,唯一", example = "张三")
|
||||
@ExcelProperty("子项目名称,唯一")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "子项目简码")
|
||||
@ExcelProperty("子项目简码")
|
||||
private String nameSim;
|
||||
|
||||
@Schema(description = "订单id", example = "17123")
|
||||
@ExcelProperty("订单id")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "生产计划id", example = "31057")
|
||||
@ExcelProperty("生产计划id")
|
||||
private Long projectPlanId;
|
||||
|
||||
@Schema(description = "客户id", example = "3397")
|
||||
@ExcelProperty("客户id")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "客户简称")
|
||||
@ExcelProperty("客户简称")
|
||||
private String brief;
|
||||
|
||||
@Schema(description = "项目名称", example = "李四")
|
||||
@ExcelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "项目名称简码")
|
||||
@ExcelProperty("项目名称简码")
|
||||
private String projectNameSim;
|
||||
|
||||
@Schema(description = "物料id", example = "6259")
|
||||
@ExcelProperty("物料id")
|
||||
private Long materialId;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "2")
|
||||
@ExcelProperty("收货状态 未收货/收货中/收货完成 1/2/3")
|
||||
private Integer receivingStatus;
|
||||
|
||||
@Schema(description = "供应商id", example = "24202")
|
||||
@ExcelProperty("供应商id")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "入库数量")
|
||||
@ExcelProperty("入库数量")
|
||||
private BigDecimal storageAmount;
|
||||
@Schema(description = "供应商名称")
|
||||
private String supplierName;
|
||||
@Schema(description = "物料编码")
|
||||
private String materialCode;
|
||||
@Schema(description = "子项目编码")
|
||||
@ExcelProperty("子项目编码")
|
||||
private String projectSubCode;
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 入库单明细新增/修改 Request VO")
|
||||
@Data
|
||||
public class StorageInDetailSaveReqVO {
|
||||
|
||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "21640")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "入库单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23487")
|
||||
@NotNull(message = "入库单id不能为空")
|
||||
private Long storageNoId;
|
||||
|
||||
@Schema(description = "加工件boom detail id", example = "32678")
|
||||
private Long boomDetailId;
|
||||
|
||||
@Schema(description = "零件名称", example = "张三")
|
||||
private String boomName;
|
||||
|
||||
@Schema(description = "规格型号")
|
||||
private String boomSpec;
|
||||
|
||||
@Schema(description = "系统单位")
|
||||
private String boomUnit;
|
||||
|
||||
@Schema(description = "材质")
|
||||
private String composition;
|
||||
|
||||
@Schema(description = "采购数量")
|
||||
private BigDecimal purchaseAmount;
|
||||
|
||||
@Schema(description = "暂估价金额", example = "26185")
|
||||
private BigDecimal estimatedPrice;
|
||||
|
||||
@Schema(description = "实际价金额", example = "14940")
|
||||
private BigDecimal actualPrice;
|
||||
|
||||
@Schema(description = "预计到货日期")
|
||||
private LocalDateTime arriveTime;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String description;
|
||||
|
||||
@Schema(description = "需求数量")
|
||||
private BigDecimal boomAmount;
|
||||
|
||||
@Schema(description = "需求到货日期")
|
||||
private LocalDateTime requireTime;
|
||||
|
||||
@Schema(description = "物料需求计划id", example = "27752")
|
||||
private Long projectMaterialPlanId;
|
||||
|
||||
@Schema(description = "物料需求计划子项目id", example = "18434")
|
||||
private Long projectMaterialPlanBoomId;
|
||||
|
||||
@Schema(description = "订单子项目id", example = "2100")
|
||||
private Long projectPlanSubId;
|
||||
|
||||
@Schema(description = "子项目名称,唯一", example = "张三")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "子项目简码")
|
||||
private String nameSim;
|
||||
|
||||
@Schema(description = "订单id", example = "17123")
|
||||
private Long projectId;
|
||||
|
||||
@Schema(description = "生产计划id", example = "31057")
|
||||
private Long projectPlanId;
|
||||
|
||||
@Schema(description = "客户id", example = "3397")
|
||||
private Long customerId;
|
||||
|
||||
@Schema(description = "客户简称")
|
||||
private String brief;
|
||||
|
||||
@Schema(description = "项目名称", example = "李四")
|
||||
private String projectName;
|
||||
|
||||
@Schema(description = "项目名称简码")
|
||||
private String projectNameSim;
|
||||
|
||||
@Schema(description = "物料id", example = "6259")
|
||||
private Long materialId;
|
||||
|
||||
@Schema(description = "收货状态 未收货/收货中/收货完成 1/2/3", example = "2")
|
||||
private Boolean receivingStatus;
|
||||
|
||||
@Schema(description = "供应商id", example = "24202")
|
||||
private Long supplierId;
|
||||
|
||||
@Schema(description = "入库数量")
|
||||
private BigDecimal storageAmount;
|
||||
|
||||
}
|
@ -142,6 +142,12 @@ public class PurchaseOrderNoDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String contactMobile;
|
||||
@TableField(exist = false)
|
||||
private String buyer;
|
||||
@TableField(exist = false)
|
||||
private String postalCode;
|
||||
@TableField(exist = false)
|
||||
private String deliveryAddress;
|
||||
@TableField(exist = false)
|
||||
private Integer receivingStatus1;
|
||||
@TableField(exist = false)
|
||||
private List<PurchaseOrderNoDetailDO> PurchaseOrderNoDetailList;
|
||||
|
@ -0,0 +1,83 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 入库单 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("project_storage_in")
|
||||
@KeySequence("project_storage_in_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StorageInDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 自增字段,唯一
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 入库单号
|
||||
*/
|
||||
private String storageNo;
|
||||
/**
|
||||
* 采购单类型,1按物料需求计划采购,2备库采购
|
||||
*/
|
||||
private Integer purchaseType;
|
||||
/**
|
||||
* 入库单类型,1物料,2加工件
|
||||
*/
|
||||
private Integer goodsType;
|
||||
/**
|
||||
* 暂估价金额
|
||||
*/
|
||||
private BigDecimal estimatedPrice;
|
||||
/**
|
||||
* 实际价金额
|
||||
*/
|
||||
private BigDecimal actualPrice;
|
||||
/**
|
||||
* 单据状态,0 未确认,1已确认
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 是否打印
|
||||
*/
|
||||
private String isPrint;
|
||||
/**
|
||||
* 打印时间
|
||||
*/
|
||||
private LocalDateTime printDtime;
|
||||
/**
|
||||
* 入库日期
|
||||
*/
|
||||
private Date ordDate;
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String supplierName;
|
||||
@TableField(exist = false)
|
||||
private List<StorageInDetailDO> storageInDetailDOList;
|
||||
}
|
@ -0,0 +1,163 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
/**
|
||||
* 入库单明细 DO
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@TableName("project_storage_in_detail")
|
||||
@KeySequence("project_storage_in_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class StorageInDetailDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 自增字段,唯一
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 入库单id
|
||||
*/
|
||||
private Long storageNoId;
|
||||
/**
|
||||
* 加工件boom detail id
|
||||
*/
|
||||
private Long boomDetailId;
|
||||
/**
|
||||
* 零件名称
|
||||
*/
|
||||
private String boomName;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
private String boomSpec;
|
||||
/**
|
||||
* 系统单位
|
||||
*/
|
||||
private String boomUnit;
|
||||
/**
|
||||
* 材质
|
||||
*/
|
||||
private String composition;
|
||||
/**
|
||||
* 采购数量
|
||||
*/
|
||||
private BigDecimal purchaseAmount;
|
||||
/**
|
||||
* 暂估价金额
|
||||
*/
|
||||
private BigDecimal estimatedPrice;
|
||||
/**
|
||||
* 实际价金额
|
||||
*/
|
||||
private BigDecimal actualPrice;
|
||||
/**
|
||||
* 预计到货日期
|
||||
*/
|
||||
private LocalDateTime arriveTime;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String description;
|
||||
/**
|
||||
* 需求数量
|
||||
*/
|
||||
private BigDecimal boomAmount;
|
||||
/**
|
||||
* 需求到货日期
|
||||
*/
|
||||
private LocalDateTime requireTime;
|
||||
/**
|
||||
* 物料需求计划id
|
||||
*/
|
||||
private Long projectMaterialPlanId;
|
||||
/**
|
||||
* 物料需求计划子项目id
|
||||
*/
|
||||
private Long projectMaterialPlanBoomId;
|
||||
/**
|
||||
* 订单子项目id
|
||||
*/
|
||||
private Long projectPlanSubId;
|
||||
/**
|
||||
* 子项目名称,唯一
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 子项目简码
|
||||
*/
|
||||
private String nameSim;
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
private Long projectId;
|
||||
/**
|
||||
* 生产计划id
|
||||
*/
|
||||
private Long projectPlanId;
|
||||
/**
|
||||
* 客户id
|
||||
*/
|
||||
private Long customerId;
|
||||
/**
|
||||
* 客户简称
|
||||
*/
|
||||
private String brief;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
/**
|
||||
* 项目名称简码
|
||||
*/
|
||||
private String projectNameSim;
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private Long materialId;
|
||||
/**
|
||||
* 收货状态 未收货/收货中/收货完成 1/2/3
|
||||
*/
|
||||
private Boolean receivingStatus;
|
||||
/**
|
||||
* 供应商id
|
||||
*/
|
||||
private Long supplierId;
|
||||
/**
|
||||
* 入库数量
|
||||
*/
|
||||
private BigDecimal storageAmount;
|
||||
private String projectSubCode;
|
||||
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String supplierName;
|
||||
/**
|
||||
* 物料编码
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String materialCode;
|
||||
|
||||
}
|
@ -11,6 +11,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlan
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskreport.TaskReportDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@ -54,8 +55,9 @@ public interface MaterialPlanMapper extends BaseMapperX<MaterialPlanDO> {
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getProjectSubName()), MaterialPlanDO::getName, pageReqVO.getProjectSubName())
|
||||
.like(!StringUtils.isEmpty(pageReqVO.getMaterialName()), MaterialPlanBoomDO::getMatName, pageReqVO.getMaterialName())
|
||||
.eq(!StringUtils.isEmpty(pageReqVO.getMatType()), MaterialPlanDO::getMatType, pageReqVO.getMatType());
|
||||
|
||||
|
||||
if (pageReqVO.getMatPlanDate() != null) {
|
||||
query.between( MaterialPlanDO::getMatPlanDate, pageReqVO.getMatPlanDate()[0], pageReqVO.getMatPlanDate()[1]);
|
||||
}
|
||||
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
|
@ -135,10 +135,12 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
|
||||
MPJLambdaWrapper<MaterialPlanBoomDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(MaterialPlanBoomDO.class)
|
||||
.select("a.nickname as nickname,b.spec as boomSpec,g.name as procedureName,bc.`name` as compositionName")
|
||||
.select("m.code as matCode,m.spec as matSpec,m.unit as matUnit")
|
||||
.leftJoin(AdminUserDO.class, "a", AdminUserDO::getId, MaterialPlanBoomDO::getDuEmpId)
|
||||
.leftJoin(ProcessBomDetailDO.class, "b", ProcessBomDetailDO::getId, MaterialPlanBoomDO::getBoomDetailId)
|
||||
.leftJoin(CompositionDO.class, "bc", CompositionDO::getId, ProcessBomDetailDO::getCompositionId)
|
||||
.leftJoin(ProcedureDO.class, "g", ProcedureDO::getId, MaterialPlanBoomDO::getProcedureId)
|
||||
.leftJoin(MaterialDO.class,"m",MaterialDO::getId, MaterialPlanBoomDO::getMaterialId)
|
||||
.orderByDesc(MaterialPlanBoomDO::getId)
|
||||
.disableSubLogicDel()
|
||||
;
|
||||
@ -173,7 +175,6 @@ public interface MaterialPlanBoomMapper extends BaseMapperX<MaterialPlanBoomDO>
|
||||
.leftJoin(MaterialPlanDO.class, "p", MaterialPlanDO::getId,MaterialPlanBoomDO::getProjectMaterialPlanId)
|
||||
.leftJoin(ProjectOrderDO.class,"b",ProjectOrderDO::getId,MaterialPlanDO::getProjectId)
|
||||
.leftJoin(ProcessBomDetailDO.class,"d",ProcessBomDetailDO::getId,MaterialPlanBoomDO::getBoomDetailId)
|
||||
// .leftJoin(MatReqDetailDO.class,"mat",MatReqDetailDO::getProjectMaterialPlanDetailId,MaterialPlanBoomDO::getId)
|
||||
.leftJoin("project_mat_req_detail mat on (t.id=mat.project_material_plan_detail_id and mat.deleted=0)")
|
||||
.leftJoin(MaterialDO.class,"m",MaterialDO::getId,MatReqDetailDO::getMaterialId)
|
||||
.disableSubLogicDel()
|
||||
|
@ -58,11 +58,11 @@ public interface PurchaseOrderNoDetailMapper extends BaseMapperX<PurchaseOrderNo
|
||||
MPJLambdaWrapper<PurchaseOrderNoDetailDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(PurchaseOrderNoDetailDO.class)
|
||||
.select("com.name as compositionName","t.purchase_rem_amount as purchaseRemAmounts","mat.code as matCode","pro.name as procedureName")
|
||||
.select("t.composition as compositionName","t.purchase_rem_amount as purchaseRemAmounts","mat.code as matCode","pro.name as procedureName")
|
||||
.leftJoin(PurchaseOrderNoDO.class, "pb", PurchaseOrderNoDO::getId, PurchaseOrderBoomDO::getPurchaseOrderId)
|
||||
.leftJoin(ProcessBomDetailDO.class,"bom", ProcessBomDetailDO::getId, PurchaseOrderNoDetailDO::getBoomDetailId)
|
||||
.leftJoin(MaterialPlanBoomDO.class,"plan", MaterialPlanBoomDO::getId, PurchaseOrderNoDetailDO::getProjectMaterialPlanBoomId)
|
||||
.leftJoin(ProcedureDO.class,"pro", ProcedureDO::getId, MaterialPlanBoomDO::getProcedureId)
|
||||
.leftJoin(ProcedureDO.class,"pro", ProcedureDO::getId, PurchaseOrderNoDetailDO::getProcedureId)
|
||||
.leftJoin(CompositionDO.class, "com", CompositionDO::getId, PurchaseOrderNoDetailDO::getComposition)
|
||||
.leftJoin(ProjectOrderSubDO.class,"sub",ProjectOrderSubDO::getId, PurchaseOrderNoDetailDO::getProjectPlanSubId)
|
||||
.leftJoin(MaterialDO.class,"mat",MaterialDO::getId,PurchaseOrderNoDetailDO::getMaterialId)
|
||||
|
@ -0,0 +1,45 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.storagein;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.supplier.SupplierDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageindetail.StorageInDetailMapper;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo.*;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 入库单 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface StorageInMapper extends BaseMapperX<StorageInDO> {
|
||||
|
||||
default PageResult<StorageInDO> selectPage(StorageInPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<StorageInDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(StorageInDO.class)
|
||||
.select("sup.name as supplierName")
|
||||
.leftJoin(StorageInDetailDO.class, "s", StorageInDetailDO::getStorageNoId, StorageInDO::getId)
|
||||
.leftJoin(SupplierDO.class,"sup", SupplierDO::getId, StorageInDetailDO::getSupplierId)
|
||||
.disableSubLogicDel()
|
||||
.groupBy(StorageInDO::getId)
|
||||
.orderByDesc(PurchaseOrderDO::getCreateTime);
|
||||
query.like(!StringUtils.isEmpty(reqVO.getStorageNo()), StorageInDO::getStorageNo, reqVO.getStorageNo());
|
||||
query.like(!StringUtils.isEmpty(reqVO.getProjectName()), StorageInDetailDO::getProjectName, reqVO.getProjectName());
|
||||
query.like(!StringUtils.isEmpty(reqVO.getProjectSubName()), StorageInDetailDO::getName, reqVO.getProjectSubName());
|
||||
query.like(!StringUtils.isEmpty(reqVO.getSupplierName()), SupplierDO::getName, reqVO.getSupplierName());
|
||||
query.eq(reqVO.getGoodsType() != null, StorageInDO::getGoodsType, reqVO.getGoodsType());
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.chanko.yunxi.mes.module.heli.dal.mysql.storageindetail;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.supplier.SupplierDO;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo.*;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* 入库单明细 Mapper
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Mapper
|
||||
public interface StorageInDetailMapper extends BaseMapperX<StorageInDetailDO> {
|
||||
|
||||
default PageResult<StorageInDetailDO> selectPage(StorageInDetailPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<StorageInDetailDO>()
|
||||
.eqIfPresent(StorageInDetailDO::getStorageNoId, reqVO.getStorageNoId())
|
||||
.eqIfPresent(StorageInDetailDO::getBoomDetailId, reqVO.getBoomDetailId())
|
||||
.likeIfPresent(StorageInDetailDO::getBoomName, reqVO.getBoomName())
|
||||
.eqIfPresent(StorageInDetailDO::getBoomSpec, reqVO.getBoomSpec())
|
||||
.eqIfPresent(StorageInDetailDO::getBoomUnit, reqVO.getBoomUnit())
|
||||
.eqIfPresent(StorageInDetailDO::getComposition, reqVO.getComposition())
|
||||
.eqIfPresent(StorageInDetailDO::getPurchaseAmount, reqVO.getPurchaseAmount())
|
||||
.eqIfPresent(StorageInDetailDO::getEstimatedPrice, reqVO.getEstimatedPrice())
|
||||
.eqIfPresent(StorageInDetailDO::getActualPrice, reqVO.getActualPrice())
|
||||
.betweenIfPresent(StorageInDetailDO::getArriveTime, reqVO.getArriveTime())
|
||||
.eqIfPresent(StorageInDetailDO::getDescription, reqVO.getDescription())
|
||||
.betweenIfPresent(StorageInDetailDO::getCreateTime, reqVO.getCreateTime())
|
||||
.eqIfPresent(StorageInDetailDO::getBoomAmount, reqVO.getBoomAmount())
|
||||
.betweenIfPresent(StorageInDetailDO::getRequireTime, reqVO.getRequireTime())
|
||||
.eqIfPresent(StorageInDetailDO::getProjectMaterialPlanId, reqVO.getProjectMaterialPlanId())
|
||||
.eqIfPresent(StorageInDetailDO::getProjectMaterialPlanBoomId, reqVO.getProjectMaterialPlanBoomId())
|
||||
.eqIfPresent(StorageInDetailDO::getProjectPlanSubId, reqVO.getProjectPlanSubId())
|
||||
.likeIfPresent(StorageInDetailDO::getName, reqVO.getName())
|
||||
.eqIfPresent(StorageInDetailDO::getNameSim, reqVO.getNameSim())
|
||||
.eqIfPresent(StorageInDetailDO::getProjectId, reqVO.getProjectId())
|
||||
.eqIfPresent(StorageInDetailDO::getProjectPlanId, reqVO.getProjectPlanId())
|
||||
.eqIfPresent(StorageInDetailDO::getCustomerId, reqVO.getCustomerId())
|
||||
.eqIfPresent(StorageInDetailDO::getBrief, reqVO.getBrief())
|
||||
.likeIfPresent(StorageInDetailDO::getProjectName, reqVO.getProjectName())
|
||||
.eqIfPresent(StorageInDetailDO::getProjectNameSim, reqVO.getProjectNameSim())
|
||||
.eqIfPresent(StorageInDetailDO::getMaterialId, reqVO.getMaterialId())
|
||||
.eqIfPresent(StorageInDetailDO::getReceivingStatus, reqVO.getReceivingStatus())
|
||||
.eqIfPresent(StorageInDetailDO::getSupplierId, reqVO.getSupplierId())
|
||||
.eqIfPresent(StorageInDetailDO::getStorageAmount, reqVO.getStorageAmount())
|
||||
.orderByDesc(StorageInDetailDO::getId));
|
||||
}
|
||||
|
||||
default PageResult<StorageInDetailDO> getByStorageId(StorageInDetailPageReqVO pageReqVO){
|
||||
MPJLambdaWrapper<StorageInDetailDO> query = new MPJLambdaWrapper<>();
|
||||
|
||||
query.selectAll(StorageInDetailDO.class)
|
||||
.select("sup.name as supplierName","m.code as materialCode")
|
||||
.leftJoin(SupplierDO.class,"sup", SupplierDO::getId, StorageInDetailDO::getSupplierId)
|
||||
.leftJoin(MaterialDO.class,"m", MaterialDO::getId, StorageInDetailDO::getMaterialId)
|
||||
.groupBy(StorageInDetailDO::getId)
|
||||
.orderByDesc(StorageInDetailDO::getCreateTime);
|
||||
query.eq(pageReqVO.getStorageNoId() != null, StorageInDetailDO::getStorageNoId, pageReqVO.getStorageNoId());
|
||||
return selectPage(pageReqVO, query);
|
||||
}
|
||||
}
|
@ -78,4 +78,6 @@ public interface MaterialPlanService {
|
||||
CommonResult<Boolean> operation(MaterialPlanPageReqVO pageReqVO);
|
||||
|
||||
Boolean supplement(List<StorageLogNowDO> list);
|
||||
|
||||
CommonResult<Boolean> delMaterial(Long id);
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthing
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
|
||||
@ -18,6 +19,7 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.attentiontodo.AttentiontodoMap
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorderno.PurchaseOrderNoMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.service.attentiontodo.AttentiontodoService;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
@ -79,6 +81,8 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
|
||||
@Resource
|
||||
private ProcessBomDetailMapper processBomDetailMapper;
|
||||
@Resource
|
||||
private PurchaseOrderNoMapper purchaseOrderNoMapper;
|
||||
@Resource
|
||||
private TaskDispatchDetailMapper taskDispatchDetailMapper;
|
||||
@Resource
|
||||
private MaterialMapper materialMapper;
|
||||
@ -355,7 +359,7 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
|
||||
if (ObjectUtil.isNotEmpty(boomDO)){
|
||||
switch (pageReqVO.getType()){
|
||||
case "del":
|
||||
if (boomDO.getIsPurYard()!=5||boomDO.getIsPurYard()!=2) return CommonResult.error(400,"该物料信息状态非确认状态,请刷新界面!");
|
||||
if (boomDO.getIsPurYard()!=5&&boomDO.getIsPurYard()!=2) return CommonResult.error(400,"该物料信息状态非确认状态,请刷新界面!");
|
||||
boomDO.setIsPurYard(1);
|
||||
break;
|
||||
case "queren":
|
||||
@ -396,8 +400,9 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
|
||||
boomDO.setMplanStatus(0);
|
||||
LambdaQueryWrapper<MaterialDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MaterialDO::getCode, nowDO.getMatCode());
|
||||
MaterialDO materialDO = materialMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(materialDO)){
|
||||
List<MaterialDO> materialDOS = materialMapper.selectList(queryWrapper);
|
||||
if (ObjectUtil.isNotEmpty(materialDOS)){
|
||||
MaterialDO materialDO = materialDOS.get(0);
|
||||
boomDO.setMatName(materialDO.getName());
|
||||
boomDO.setMaterialId(materialDO.getId());
|
||||
}
|
||||
@ -407,4 +412,17 @@ public class MaterialPlanServiceImpl implements MaterialPlanService {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> delMaterial(Long id) {
|
||||
LambdaQueryWrapper<PurchaseOrderNoDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PurchaseOrderNoDO::getProjectMaterialPlanId, id);
|
||||
wrapper.eq(PurchaseOrderNoDO::getDeleted, 0);
|
||||
if (purchaseOrderNoMapper.selectCount(wrapper) > 0) return CommonResult.error(400, "该单据已做采购订单,请确认!");
|
||||
LambdaQueryWrapper<MaterialPlanBoomDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MaterialPlanBoomDO::getProjectMaterialPlanId, id);
|
||||
materialPlanBoomMapper.delete(queryWrapper);
|
||||
materialPlanMapper.deleteById(id);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -301,12 +301,19 @@ public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
|
||||
PurchaseOrderNoDO purchaseOrderNoDO = purchaseOrderNoMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(purchaseOrderNoDO)){
|
||||
AdminUserDO user = adminUserService.getUser(getLoginUser().getId());
|
||||
purchaseOrderNoDO.setUsername(user.getNickname());
|
||||
purchaseOrderNoDO.setUserMobile(user.getMobile());
|
||||
if (ObjectUtil.isNotEmpty(user)){
|
||||
purchaseOrderNoDO.setUsername(user.getNickname());
|
||||
purchaseOrderNoDO.setUserMobile(user.getMobile());
|
||||
}
|
||||
SupplierDO supplierDO = supplierMapper.selectById(purchaseOrderNoDO.getSupplierId());
|
||||
purchaseOrderNoDO.setSupplierName(supplierDO.getName());
|
||||
purchaseOrderNoDO.setContactName(supplierDO.getContact1Name());
|
||||
purchaseOrderNoDO.setContactMobile(supplierDO.getContact1Method());
|
||||
if (ObjectUtil.isNotEmpty(supplierDO)){
|
||||
purchaseOrderNoDO.setSupplierName(supplierDO.getName());
|
||||
purchaseOrderNoDO.setContactName(supplierDO.getContact1Name());
|
||||
purchaseOrderNoDO.setContactMobile(supplierDO.getContact1Method());
|
||||
}
|
||||
purchaseOrderNoDO.setPostalCode("311113");
|
||||
purchaseOrderNoDO.setDeliveryAddress("浙江省杭州市余杭区良渚街道刘林圩路5号");
|
||||
purchaseOrderNoDO.setBuyer("杭州合立机械有限公司");
|
||||
List<PurchaseOrderNoDetailDO> detailList = purchaseOrderNoDetailMapper.getPurchaseOrderNoDetailById(id);
|
||||
purchaseOrderNoDO.setPurchaseOrderNoDetailList(detailList);
|
||||
}
|
||||
|
@ -0,0 +1,55 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storagein;
|
||||
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
|
||||
/**
|
||||
* 入库单 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface StorageInService {
|
||||
|
||||
/**
|
||||
* 创建入库单
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createStorageIn(@Valid StorageInSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新入库单
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateStorageIn(@Valid StorageInSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除入库单
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteStorageIn(Long id);
|
||||
|
||||
/**
|
||||
* 获得入库单
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 入库单
|
||||
*/
|
||||
StorageInDO getStorageIn(Long id);
|
||||
|
||||
/**
|
||||
* 获得入库单分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 入库单分页
|
||||
*/
|
||||
PageResult<StorageInDO> getStorageInPage(StorageInPageReqVO pageReqVO);
|
||||
|
||||
|
||||
StorageInDO isPrint(Long id);
|
||||
}
|
@ -0,0 +1,126 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storagein;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo.StorageInDetailPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageindetail.StorageInDetailMapper;
|
||||
import com.sun.corba.se.spi.ior.IdentifiableFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storagein.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagein.StorageInDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagein.StorageInMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 入库单 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StorageInServiceImpl implements StorageInService {
|
||||
|
||||
@Resource
|
||||
private StorageInMapper storageInMapper;
|
||||
@Resource
|
||||
private StorageInDetailMapper storageInDetailMapper;
|
||||
@Resource
|
||||
private PurchaseOrderNoDetailMapper purchaseOrderNoDetailMapper;
|
||||
@Override
|
||||
public Long createStorageIn(StorageInSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StorageInDO storageIn = BeanUtils.toBean(createReqVO, StorageInDO.class);
|
||||
storageInMapper.insert(storageIn);
|
||||
// 返回
|
||||
return storageIn.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStorageIn(StorageInSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStorageInExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StorageInDO updateObj = BeanUtils.toBean(updateReqVO, StorageInDO.class);
|
||||
storageInMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStorageIn(Long id) {
|
||||
// 校验存在
|
||||
validateStorageInExists(id);
|
||||
LambdaQueryWrapper<StorageInDetailDO> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(StorageInDetailDO::getStorageNoId,id);
|
||||
wrapper.eq(StorageInDetailDO::getDeleted,0);
|
||||
List<StorageInDetailDO> storageInDetailDOS = storageInDetailMapper.selectList(wrapper);
|
||||
if (ObjectUtil.isNotEmpty(storageInDetailDOS)){
|
||||
for (StorageInDetailDO storageInDetailDO : storageInDetailDOS) {
|
||||
LambdaQueryWrapper<PurchaseOrderNoDetailDO> wrapper1 = new LambdaQueryWrapper<>();
|
||||
wrapper1.eq(PurchaseOrderNoDetailDO::getStorageId,storageInDetailDO.getStorageNoId());
|
||||
wrapper1.eq(PurchaseOrderNoDetailDO::getStorageMatId,storageInDetailDO.getMaterialId());
|
||||
PurchaseOrderNoDetailDO purchaseOrderNoDetailDO = purchaseOrderNoDetailMapper.selectOne(wrapper1);
|
||||
if (ObjectUtil.isNotEmpty(purchaseOrderNoDetailDO)){
|
||||
LambdaUpdateWrapper<PurchaseOrderNoDetailDO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(PurchaseOrderNoDetailDO::getId,purchaseOrderNoDetailDO.getId());
|
||||
updateWrapper.set(PurchaseOrderNoDetailDO::getStorageId,null);
|
||||
updateWrapper.set(PurchaseOrderNoDetailDO::getStorageMatId,null);
|
||||
|
||||
if (purchaseOrderNoDetailDO.getPurchaseAmount().compareTo(purchaseOrderNoDetailDO.getPurchaseRemAmount())==0){
|
||||
updateWrapper.set(PurchaseOrderNoDetailDO::getReceivingStatus,1);
|
||||
}else {
|
||||
updateWrapper.set(PurchaseOrderNoDetailDO::getReceivingStatus,2);
|
||||
}
|
||||
updateWrapper.set(PurchaseOrderNoDetailDO::getPurchaseRemAmount,purchaseOrderNoDetailDO.getPurchaseRemAmount().add(storageInDetailDO.getStorageAmount()));
|
||||
purchaseOrderNoDetailMapper.update(updateWrapper);
|
||||
}
|
||||
}
|
||||
}
|
||||
storageInDetailMapper.delete(new LambdaQueryWrapper<StorageInDetailDO>().eq(StorageInDetailDO::getStorageNoId,id));
|
||||
// 删除
|
||||
storageInMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStorageInExists(Long id) {
|
||||
if (storageInMapper.selectById(id) == null) {
|
||||
throw exception(STORAGE_IN_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageInDO getStorageIn(Long id) {
|
||||
return storageInMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StorageInDO> getStorageInPage(StorageInPageReqVO pageReqVO) {
|
||||
return storageInMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageInDO isPrint(Long id) {
|
||||
StorageInDO storageInDO = storageInMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(storageInDO)){
|
||||
StorageInDetailPageReqVO page = new StorageInDetailPageReqVO();
|
||||
page.setStorageNoId(id);
|
||||
page.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<StorageInDetailDO> list = storageInDetailMapper.getByStorageId(page).getList();
|
||||
storageInDO.setStorageInDetailDOList(list);
|
||||
}
|
||||
return storageInDO;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storageindetail;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
|
||||
/**
|
||||
* 入库单明细 Service 接口
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
public interface StorageInDetailService {
|
||||
|
||||
/**
|
||||
* 创建入库单明细
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createStorageInDetail(@Valid StorageInDetailSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新入库单明细
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateStorageInDetail(@Valid StorageInDetailSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除入库单明细
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteStorageInDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得入库单明细
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 入库单明细
|
||||
*/
|
||||
StorageInDetailDO getStorageInDetail(Long id);
|
||||
|
||||
/**
|
||||
* 获得入库单明细分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 入库单明细分页
|
||||
*/
|
||||
PageResult<StorageInDetailDO> getStorageInDetailPage(StorageInDetailPageReqVO pageReqVO);
|
||||
|
||||
PageResult<StorageInDetailDO> getByStorageId(StorageInDetailPageReqVO pageReqVO);
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package com.chanko.yunxi.mes.module.heli.service.storageindetail;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.*;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storageindetail.vo.*;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageindetail.StorageInDetailDO;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||
import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
|
||||
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageindetail.StorageInDetailMapper;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 入库单明细 Service 实现类
|
||||
*
|
||||
* @author 管理员
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class StorageInDetailServiceImpl implements StorageInDetailService {
|
||||
|
||||
@Resource
|
||||
private StorageInDetailMapper storageInDetailMapper;
|
||||
|
||||
@Override
|
||||
public Long createStorageInDetail(StorageInDetailSaveReqVO createReqVO) {
|
||||
// 插入
|
||||
StorageInDetailDO storageInDetail = BeanUtils.toBean(createReqVO, StorageInDetailDO.class);
|
||||
storageInDetailMapper.insert(storageInDetail);
|
||||
// 返回
|
||||
return storageInDetail.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStorageInDetail(StorageInDetailSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateStorageInDetailExists(updateReqVO.getId());
|
||||
// 更新
|
||||
StorageInDetailDO updateObj = BeanUtils.toBean(updateReqVO, StorageInDetailDO.class);
|
||||
storageInDetailMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteStorageInDetail(Long id) {
|
||||
// 校验存在
|
||||
validateStorageInDetailExists(id);
|
||||
// 删除
|
||||
storageInDetailMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateStorageInDetailExists(Long id) {
|
||||
if (storageInDetailMapper.selectById(id) == null) {
|
||||
throw exception(STORAGE_IN_DETAIL_NOT_EXISTS);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public StorageInDetailDO getStorageInDetail(Long id) {
|
||||
return storageInDetailMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StorageInDetailDO> getStorageInDetailPage(StorageInDetailPageReqVO pageReqVO) {
|
||||
return storageInDetailMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<StorageInDetailDO> getByStorageId(StorageInDetailPageReqVO pageReqVO) {
|
||||
return storageInDetailMapper.getByStorageId(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chanko.yunxi.mes.module.heli.dal.mysql.storagein.StorageInMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.chanko.yunxi.mes.module.heli.dal.mysql.storageindetail.StorageInDetailMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
|
||||
</mapper>
|
@ -90,3 +90,7 @@ export const exportStandardParts = async (params) => {
|
||||
export const supplement = async (data) => {
|
||||
return await request.post({ url: `/heli/material-plan/supplement`, data })
|
||||
}
|
||||
// 删除库存补充
|
||||
export const delMaterial = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/material-plan/delMaterial?id=` + id })
|
||||
}
|
||||
|
50
mes-ui/mes-ui-admin-vue3/src/api/heli/storagein/index.ts
Normal file
50
mes-ui/mes-ui-admin-vue3/src/api/heli/storagein/index.ts
Normal file
@ -0,0 +1,50 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface StorageInVO {
|
||||
id: number
|
||||
storageNo: string
|
||||
purchaseType: boolean
|
||||
goodsType: boolean
|
||||
estimatedPrice: number
|
||||
actualPrice: number
|
||||
status: boolean
|
||||
description: string
|
||||
isPrint: string
|
||||
printDtime: Date
|
||||
ordDate: Date
|
||||
}
|
||||
|
||||
// 查询入库单分页
|
||||
export const getStorageInPage = async (params) => {
|
||||
return await request.get({ url: `/heli/storage-in/page`, params })
|
||||
}
|
||||
|
||||
// 查询入库单详情
|
||||
export const getStorageIn = async (id: number) => {
|
||||
return await request.get({ url: `/heli/storage-in/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增入库单
|
||||
export const createStorageIn = async (data: StorageInVO) => {
|
||||
return await request.post({ url: `/heli/storage-in/create`, data })
|
||||
}
|
||||
|
||||
// 修改入库单
|
||||
export const updateStorageIn = async (data: StorageInVO) => {
|
||||
return await request.put({ url: `/heli/storage-in/update`, data })
|
||||
}
|
||||
|
||||
// 删除入库单
|
||||
export const deleteStorageIn = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/storage-in/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出入库单 Excel
|
||||
export const exportStorageIn = async (params) => {
|
||||
return await request.download({ url: `/heli/storage-in/export-excel`, params })
|
||||
}
|
||||
|
||||
// 查询入库单详情
|
||||
export const isPrint = async (id: number) => {
|
||||
return await request.get({ url: `/heli/storage-in/isPrint?id=` + id })
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface StorageInDetailVO {
|
||||
id: number
|
||||
storageNoId: number
|
||||
boomDetailId: number
|
||||
boomName: string
|
||||
boomSpec: string
|
||||
boomUnit: string
|
||||
composition: string
|
||||
purchaseAmount: number
|
||||
estimatedPrice: number
|
||||
actualPrice: number
|
||||
arriveTime: Date
|
||||
description: string
|
||||
boomAmount: number
|
||||
requireTime: Date
|
||||
projectMaterialPlanId: number
|
||||
projectMaterialPlanBoomId: number
|
||||
projectPlanSubId: number
|
||||
name: string
|
||||
nameSim: string
|
||||
projectId: number
|
||||
projectPlanId: number
|
||||
customerId: number
|
||||
brief: string
|
||||
projectName: string
|
||||
projectNameSim: string
|
||||
materialId: number
|
||||
receivingStatus: boolean
|
||||
supplierId: number
|
||||
storageAmount: number
|
||||
}
|
||||
|
||||
// 查询入库单明细分页
|
||||
export const getStorageInDetailPage = async (params) => {
|
||||
return await request.get({ url: `/heli/storage-in-detail/page`, params })
|
||||
}
|
||||
|
||||
// 查询入库单明细详情
|
||||
export const getStorageInDetail = async (id: number) => {
|
||||
return await request.get({ url: `/heli/storage-in-detail/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增入库单明细
|
||||
export const createStorageInDetail = async (data: StorageInDetailVO) => {
|
||||
return await request.post({ url: `/heli/storage-in-detail/create`, data })
|
||||
}
|
||||
|
||||
// 修改入库单明细
|
||||
export const updateStorageInDetail = async (data: StorageInDetailVO) => {
|
||||
return await request.put({ url: `/heli/storage-in-detail/update`, data })
|
||||
}
|
||||
|
||||
// 删除入库单明细
|
||||
export const deleteStorageInDetail = async (id: number) => {
|
||||
return await request.delete({ url: `/heli/storage-in-detail/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出入库单明细 Excel
|
||||
export const exportStorageInDetail = async (params) => {
|
||||
return await request.download({ url: `/heli/storage-in-detail/export-excel`, params })
|
||||
}
|
||||
//根据入库id查询入库明细
|
||||
export const getByStorageId = async (params) => {
|
||||
return await request.get({ url: `/heli/storage-in-detail/getByStorageId`, params })
|
||||
}
|
@ -291,5 +291,6 @@ export enum DICT_TYPE {
|
||||
HELI_MAT_REQ_TYPE='heli_mat_req_type',
|
||||
HELI_MAT_REQ_STATUS='heli_mat_req_status',
|
||||
HELI_MATERIAL_STATUS='heli_material_status',
|
||||
HELI_DOCUMENT_STATUS='heli_document_status'
|
||||
HELI_DOCUMENT_STATUS='heli_document_status',
|
||||
HELI_STORAGEIN_STATUS='heli_storagein_status'
|
||||
}
|
||||
|
168
mes-ui/mes-ui-admin-vue3/src/views/heli/storagein/detail.vue
Normal file
168
mes-ui/mes-ui-admin-vue3/src/views/heli/storagein/detail.vue
Normal file
@ -0,0 +1,168 @@
|
||||
<template>
|
||||
<el-card class="hl-card" style="position: relative">
|
||||
<template #header>
|
||||
<span>详情页</span>
|
||||
</template>
|
||||
<el-form ref="formRef" :model="formData" label-width="160px" v-loading="formLoading">
|
||||
<!-- 基础信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">基础信息</span>
|
||||
</template>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="入库单号" prop="purchaseNo">
|
||||
<el-input class="!w-300px" placeholder="系统自动生成" v-model="formData.storageNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据日期" prop="ordDate">
|
||||
<el-date-picker
|
||||
v-model="formData.ordDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="单据日期"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<!-- 采购单信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">采购单信息</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-form ref="multipleTable" :model="formData.list" v-loading="loading" label-width="0">
|
||||
<el-table :data="formData.list" class="hl-table" >
|
||||
<el-table-column prop="projectSubCode" min-width="150" label="子项目编码" align="center"/>
|
||||
<el-table-column prop="boomName" min-width="150" label="标准件名称" align="center"/>
|
||||
<el-table-column prop="materialCode" min-width="150" label="物料编码" align="center"/>
|
||||
<el-table-column prop="boomSpec" min-width="100" label="规格型号" align="center"/>
|
||||
<el-table-column prop="purchaseAmount" min-width="100" label="采购数量" align="center" />
|
||||
<el-table-column prop="storageAmount" min-width="100" label="入库数量" align="center"/>
|
||||
<el-table-column prop="supplierName" min-width="150" label="供应商" align="center" />
|
||||
<el-table-column prop="estimatedPrice" min-width="100" label="预估总价" align="center"/>
|
||||
</el-table>
|
||||
</el-form>
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="isPrint()" type="primary" size="large" >打印</el-button>
|
||||
<el-button @click="deleteForm()" type="danger" size="large" >删除</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
|
||||
import {ElTable} from 'element-plus'
|
||||
|
||||
import * as UserApi from '@/api/system/user'
|
||||
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
|
||||
const reload: any = inject('reload')
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { query } = useRoute()
|
||||
const router = useRouter()
|
||||
const tagsViewStore = useTagsViewStore()
|
||||
import * as StorageinApi from '@/api/heli/storagein'
|
||||
import * as StorageinDetailApi from '@/api/heli/storageindetail'
|
||||
import {ref} from "vue";
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
storageNo: undefined,
|
||||
ordDate: undefined,
|
||||
projectId: undefined,
|
||||
projectPlanId: undefined,
|
||||
projectPlanNo: undefined,
|
||||
projectCode: undefined,
|
||||
auditor: undefined,
|
||||
createTime: new Date(),
|
||||
status: undefined,
|
||||
description: undefined,
|
||||
boomItemDOList: [],
|
||||
boomItemRemoveList: [],
|
||||
matBoomDOList: [],
|
||||
matItemRemoveList: [],
|
||||
attachments: [],
|
||||
supplierName:undefined,
|
||||
list:[]
|
||||
})
|
||||
|
||||
const formRef = ref() // 表单 Ref
|
||||
const subFormRef = ref() // 表单 Ref
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const total = ref(0) // 列表的总页数
|
||||
const subBoomFormLoading = ref(false)
|
||||
const subBoomFormRef = ref()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
storageId: query.id
|
||||
})
|
||||
// 页面数据加载初始化
|
||||
onMounted(async () => {
|
||||
// 获取物料需求计划信息
|
||||
formData.value = await StorageinApi.getStorageIn(query.id)
|
||||
getList();
|
||||
})
|
||||
const isPrint = async () => {
|
||||
var newVar = await StorageinApi.isPrint(query.id);
|
||||
console.log(newVar)
|
||||
}
|
||||
const deleteForm = async () => {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await StorageinApi.deleteStorageIn(query.id)
|
||||
message.success(t('common.delSuccess'))
|
||||
router.push({ path: '/inventory/storagein' })
|
||||
tagsViewStore.delVisitedView(router.currentRoute.value)
|
||||
}
|
||||
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await StorageinDetailApi.getByStorageId(queryParams)
|
||||
formData.value.list = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
182
mes-ui/mes-ui-admin-vue3/src/views/heli/storagein/index.vue
Normal file
182
mes-ui/mes-ui-admin-vue3/src/views/heli/storagein/index.vue
Normal file
@ -0,0 +1,182 @@
|
||||
<template>
|
||||
<el-card class="hl-card">
|
||||
<template #header>
|
||||
<span>入库单管理</span>
|
||||
</template>
|
||||
<ContentWrap class="borderxx">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form class="-mb-15px" :model="queryParams" ref="storageNo" :inline="true" label-width="120px">
|
||||
<el-form-item label="入库单号" prop="storageNo">
|
||||
<el-input
|
||||
v-model="queryParams.purchaseNo" placeholder="采购单号" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName" placeholder="项目名称" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="子项目名称" prop="projectSubName">
|
||||
<el-input
|
||||
v-model="queryParams.projectSubName" placeholder="子项目名称" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierName">
|
||||
<el-input
|
||||
v-model="queryParams.supplierName" placeholder="供应商" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left:50px">
|
||||
<el-button @click="handleQuery" type="primary">
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table
|
||||
v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table"
|
||||
>
|
||||
<el-table-column label="序号" type="index" align="center" width="60" />
|
||||
<el-table-column label="入库单号" align="center" prop="storageNo" min-width="190">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="openForm('detail', scope.row.id)">
|
||||
{{ scope.row.storageNo }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库单类型" align="center" prop="goodsType" min-width="180">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PART_PURCHASE_ORDER_TYPE" :value="scope.row.goodsType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="供应商" align="center" min-width="180" prop="supplierName" />
|
||||
<el-table-column label="是否打印" align="center" min-width="120" prop="isPrint" >
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_IS_PRINT" :value="scope.row.isPrint" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" align="center" prop="status" min-width="180">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_STORAGEIN_STATUS" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" min-width="100">
|
||||
<template #header>
|
||||
<span style="margin-right: 30%">操作</span>
|
||||
</template>
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" @click="openForm('detail', scope.row.id)">
|
||||
查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination
|
||||
:total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</ContentWrap>
|
||||
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
|
||||
import * as StorageinApi from '@/api/heli/storagein'
|
||||
import { ElTable } from 'element-plus'
|
||||
|
||||
import {useUserStore} from "@/store/modules/user";
|
||||
|
||||
defineOptions({ name: 'PurchaseOrder' })
|
||||
const userStore = useUserStore()
|
||||
const username = userStore.getUser.nickname
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
const router = useRouter()
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
id: undefined,
|
||||
ids: undefined,
|
||||
purchaseNo: undefined,
|
||||
supplierId: undefined,
|
||||
contractNo: undefined,
|
||||
purchaseType: undefined,
|
||||
projectMaterialPlanId: undefined,
|
||||
goodsType: 1,
|
||||
currencyType: undefined,
|
||||
taxRatio: undefined,
|
||||
estimatedPrice: undefined,
|
||||
actualPrice: undefined,
|
||||
status: undefined,
|
||||
submitUserId: undefined,
|
||||
submitTime: [],
|
||||
auditor: undefined,
|
||||
auditTime: [],
|
||||
description: undefined,
|
||||
creator: undefined,
|
||||
createTime: undefined,
|
||||
receivingStatus:undefined,
|
||||
projectName:undefined,
|
||||
projectSubName:undefined,
|
||||
username:username,
|
||||
supplierName:undefined
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
queryParams.ids = undefined
|
||||
const data = await StorageinApi.getStorageInPage(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const openForm = (type: string, id?: number) => {
|
||||
switch (type) {
|
||||
case 'create':
|
||||
router.push({ path: '/purchase/purchaseorderadd', query: { id: id } })
|
||||
break
|
||||
case 'edit':
|
||||
router.push({ path: '/purchase/purchaseorderedit', query: { id: id } })
|
||||
break
|
||||
case 'detail':
|
||||
router.push({ path: '/inventory/storageindetail', query: { id: id } })
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
/** 初始化 **/
|
||||
onMounted( () => {
|
||||
handleQuery()
|
||||
})
|
||||
</script>
|
@ -0,0 +1,156 @@
|
||||
<template>
|
||||
<el-card class="hl-card" style="position: relative">
|
||||
<template #header>
|
||||
<span>详情页</span>
|
||||
</template>
|
||||
<el-form ref="formRef" :model="formData" label-width="160px" v-loading="formLoading">
|
||||
<!-- 基础信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">基础信息</span>
|
||||
</template>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-row>
|
||||
|
||||
<el-col :span="6">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="需求计划号" prop="projectMaterialPlanNo">
|
||||
<el-input class="!w-300px" placeholder="系统自动生成" v-model="formData.projectMaterialPlanNo" disabled />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据日期" prop="matPlanDate">
|
||||
<el-date-picker
|
||||
v-model="formData.matPlanDate"
|
||||
type="date"
|
||||
value-format="x"
|
||||
placeholder="单据日期"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<!-- 需求单信息 -->
|
||||
<el-card class="hl-card-info">
|
||||
<template #header>
|
||||
<div class="hl-card-info-icona"></div><span class="hl-card-info-text">需求单信息</span>
|
||||
</template>
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-card class="hl-incard">
|
||||
<el-table :data="formData.matBoomDOList" class="hl-table" v-loading="loading">
|
||||
<el-table-column type="index" label="序号" fixed align="center" min-width="60" />
|
||||
<el-table-column prop="matCode" min-width="200" label="物料编码" align="center"/>
|
||||
<el-table-column prop="matName" min-width="200" label="物料名称" align="center"/>
|
||||
<el-table-column prop="matSpec" min-width="120" label="规格型号" align="center"/>
|
||||
<el-table-column prop="matUnit" label="系统单位">
|
||||
<template #default="scope">
|
||||
<dict-tag
|
||||
:type="DICT_TYPE.HELI_MATERIAL_UNIT"
|
||||
:value="scope.row.matUnit"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="boomAmount" min-width="100" label="需求数量" align="center"/>
|
||||
</el-table>
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
<div class="hl-footer text-center">
|
||||
<el-button @click="closeForm" size="large">取 消</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<!-- 表单弹窗:物料列表 -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import * as MaterialPlanApi from '@/api/heli/materialplan'
|
||||
import * as MaterialPlanBoomApi from '@/api/heli/materialplanboom'
|
||||
|
||||
import * as UserApi from '@/api/system/user'
|
||||
|
||||
import { useTagsViewStore } from '@/store/modules/tagsView'
|
||||
|
||||
const reload: any = inject('reload')
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { query } = useRoute()
|
||||
const router = useRouter()
|
||||
const tagsViewStore = useTagsViewStore()
|
||||
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
|
||||
const formData = ref({
|
||||
id: undefined,
|
||||
projectMaterialPlanNo: undefined,
|
||||
projectId: undefined,
|
||||
projectPlanId: undefined,
|
||||
projectPlanNo: undefined,
|
||||
projectCode: undefined,
|
||||
auditor: undefined,
|
||||
createTime: new Date(),
|
||||
status: undefined,
|
||||
description: undefined,
|
||||
boomItemDOList: [],
|
||||
boomItemRemoveList: [],
|
||||
matBoomDOList: [],
|
||||
matItemRemoveList: [],
|
||||
attachments: [],
|
||||
matPlanDate:undefined
|
||||
})
|
||||
|
||||
const formRef = ref() // 表单 Ref
|
||||
const subFormRef = ref() // 表单 Ref
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const total = ref(0) // 列表的总页数
|
||||
const subBoomFormLoading = ref(false)
|
||||
const subBoomFormRef = ref()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const closeForm = async () => {
|
||||
router.push({ path: '/purchase/management' })
|
||||
tagsViewStore.delVisitedView(router.currentRoute.value)
|
||||
}
|
||||
const userList = ref<UserApi.UserVO[]>([]) // 用户列表
|
||||
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
projectMaterialPlanId: query.id
|
||||
})
|
||||
// 页面数据加载初始化
|
||||
onMounted(async () => {
|
||||
// 获取物料需求计划信息
|
||||
formData.value = await MaterialPlanApi.getMaterialPlan(query.id)
|
||||
getList();
|
||||
})
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await MaterialPlanBoomApi.getMaterialPlanBoomPages(queryParams)
|
||||
formData.value.matBoomDOList = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
@ -0,0 +1,197 @@
|
||||
<template>
|
||||
<el-card class="hl-card">
|
||||
<template #header>
|
||||
<span>库存补充管理</span>
|
||||
</template>
|
||||
<ContentWrap class="borderxx">
|
||||
<!-- 搜索工作栏 -->
|
||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="130px">
|
||||
<el-form-item label="制单日期" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="queryParams.matPlanDate"
|
||||
value-format="YYYY-MM-DD HH:mm:ss"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
class="!w-280px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="需求计划单号" prop="projectMaterialPlanNo">
|
||||
<el-input v-model="queryParams.projectMaterialPlanNo" placeholder="需求计划单号" clearable @keyup.enter="handleQuery"
|
||||
class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料名称" prop="materialName">
|
||||
<el-input v-model="queryParams.materialName" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" class="!w-240px" />
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left:15px">
|
||||
<el-button @click="handleQuery" type="primary">
|
||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||
</el-button>
|
||||
<el-button @click="resetQuery">
|
||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ContentWrap>
|
||||
|
||||
<!-- 列表 -->
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
|
||||
<el-table-column label="序号" type="index" align="center" fixed min-width="70px" />
|
||||
<el-table-column label="物料需求计划单号" align="center" prop="projectMaterialPlanNo" min-width="180" fixed>
|
||||
<template #default="scope">
|
||||
<el-button text type="primary" @click="openForm('detail', scope.row.id)">
|
||||
{{ scope.row.projectMaterialPlanNo }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="制单日期" align="center" prop="matPlanDate" :formatter="dateFormatter1" min-width="150" />
|
||||
<el-table-column label="制单人" align="center" prop="creator" width="150">
|
||||
<template #default="scope">
|
||||
{{ userInit.find((user) => user.id == scope.row.creator)?.nickname }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="需求计划类型" align="center" prop="matType" min-width="150">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_MAT_TYPE" :value="scope.row.matType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" fixed="right" min-width="180">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
@click="handleDelete(scope.row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="openForm('detail', scope.row.id)">
|
||||
详情信息
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList" />
|
||||
</ContentWrap>
|
||||
|
||||
</el-card>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { dateFormatter1} from '@/utils/formatTime'
|
||||
import * as MaterialPlanApi from '@/api/heli/materialplan'
|
||||
import * as UserApi from '@/api/system/user'
|
||||
import dayjs from "dayjs";
|
||||
import {delMaterial} from "@/api/heli/materialplan";
|
||||
|
||||
|
||||
defineOptions({ name: 'MaterialPlan' })
|
||||
const router = useRouter()
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
const loading = ref(true) // 列表的加载中
|
||||
const list = ref([]) // 列表的数据
|
||||
const total = ref(0) // 列表的总页数
|
||||
const queryParams = reactive({
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
id: undefined,
|
||||
projectMaterialPlanNo: undefined,
|
||||
projectId: undefined,
|
||||
projectPlanId: undefined,
|
||||
submitUserId: undefined,
|
||||
projectName: undefined,
|
||||
projectSubName: undefined,
|
||||
materialName:undefined,
|
||||
submitTime: [],
|
||||
auditor: undefined,
|
||||
auditTime: [],
|
||||
status: undefined,
|
||||
description: undefined,
|
||||
createTime: [],
|
||||
matType:2,
|
||||
matPlanDate:undefined,
|
||||
})
|
||||
const queryFormRef = ref() // 搜索的表单
|
||||
const exportLoading = ref(false) // 导出的加载中
|
||||
|
||||
/** 查询列表 */
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const data = await MaterialPlanApi.getMaterialPlanPages(queryParams)
|
||||
list.value = data.list
|
||||
total.value = data.total
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 搜索按钮操作 */
|
||||
const handleQuery = () => {
|
||||
queryParams.pageNo = 1
|
||||
getList()
|
||||
}
|
||||
|
||||
/** 重置按钮操作 */
|
||||
const resetQuery = () => {
|
||||
queryFormRef.value.resetFields()
|
||||
handleQuery()
|
||||
}
|
||||
|
||||
/** 添加/修改操作 */
|
||||
|
||||
const openForm = (type: string, id?: number) => {
|
||||
|
||||
switch (type) {
|
||||
case 'create':
|
||||
router.push({ path: '/purchase/materialplanadd', query: { id: id } })
|
||||
break;
|
||||
case 'update':
|
||||
router.push({ path: '/purchase/materialplanedit', query: { id: id } })
|
||||
break;
|
||||
case 'detail':
|
||||
console.log("0000")
|
||||
router.push({ path: '/inventory/supplemanagementdetail', query: { id: id } })
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
const handleDelete = async (id: number) => {
|
||||
try {
|
||||
// 删除的二次确认
|
||||
await message.delConfirm()
|
||||
// 发起删除
|
||||
await MaterialPlanApi.delMaterial(id)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch { }
|
||||
}
|
||||
const setDefaultDate = () => {
|
||||
queryParams.matPlanDate = [
|
||||
dayjs().startOf('day').format('YYYY-MM-DD HH:mm:ss'),
|
||||
dayjs().endOf('day').format('YYYY-MM-DD HH:mm:ss')
|
||||
]
|
||||
}
|
||||
|
||||
const userInit = ref()
|
||||
/** 初始化 **/
|
||||
onMounted(async () => {
|
||||
userInit.value = await UserApi.getSimpleUserList()
|
||||
|
||||
//用户列表数据
|
||||
setDefaultDate()
|
||||
getList()
|
||||
})
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user