任务单添加已发货项目显示
This commit is contained in:
parent
18782d730d
commit
a47557adb5
@ -1,5 +1,7 @@
|
|||||||
package com.chanko.yunxi.mes.module.heli.controller.admin.deliverorder.vo;
|
package com.chanko.yunxi.mes.module.heli.controller.admin.deliverorder.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderSubDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderSubDO;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -95,4 +97,11 @@ public class DeliverOrderSaveReqVO {
|
|||||||
@Valid
|
@Valid
|
||||||
@Schema(description = "发货订单子项列表")
|
@Schema(description = "发货订单子项列表")
|
||||||
private List<DeliverOrderSubDO> deliverOrderOtherSubs;
|
private List<DeliverOrderSubDO> deliverOrderOtherSubs;
|
||||||
|
/**
|
||||||
|
* 最后更新时间
|
||||||
|
*/
|
||||||
|
@Schema(description = "最后更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
@Schema(description = "最后更新人")
|
||||||
|
private Integer updater;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.deliverorderlog;
|
||||||
|
|
||||||
|
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.deliverorderlog.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorderlog.DeliverOrderLogDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.deliverorderlog.DeliverOrderLogService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 发货单日志")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/heli/deliver-order-log")
|
||||||
|
@Validated
|
||||||
|
public class DeliverOrderLogController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeliverOrderLogService deliverOrderLogService;
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建发货单日志")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:deliver-order-log:create')")
|
||||||
|
public CommonResult<Long> createDeliverOrderLog(@Valid @RequestBody DeliverOrderLogSaveReqVO createReqVO) {
|
||||||
|
return success(deliverOrderLogService.createDeliverOrderLog(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新发货单日志")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:deliver-order-log:update')")
|
||||||
|
public CommonResult<Boolean> updateDeliverOrderLog(@Valid @RequestBody DeliverOrderLogSaveReqVO updateReqVO) {
|
||||||
|
deliverOrderLogService.updateDeliverOrderLog(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除发货单日志")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:deliver-order-log:delete')")
|
||||||
|
public CommonResult<Boolean> deleteDeliverOrderLog(@RequestParam("id") Long id) {
|
||||||
|
deliverOrderLogService.deleteDeliverOrderLog(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得发货单日志")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:deliver-order-log:query')")
|
||||||
|
public CommonResult<DeliverOrderLogRespVO> getDeliverOrderLog(@RequestParam("id") Long id) {
|
||||||
|
DeliverOrderLogDO deliverOrderLog = deliverOrderLogService.getDeliverOrderLog(id);
|
||||||
|
return success(BeanUtils.toBean(deliverOrderLog, DeliverOrderLogRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得发货单日志分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:deliver-order-log:query')")
|
||||||
|
public CommonResult<PageResult<DeliverOrderLogRespVO>> getDeliverOrderLogPage(@Valid DeliverOrderLogPageReqVO pageReqVO) {
|
||||||
|
PageResult<DeliverOrderLogDO> pageResult = deliverOrderLogService.getDeliverOrderLogPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, DeliverOrderLogRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出发货单日志 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('heli:deliver-order-log:export')")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportDeliverOrderLogExcel(@Valid DeliverOrderLogPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<DeliverOrderLogDO> list = deliverOrderLogService.getDeliverOrderLogPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "发货单日志.xls", "数据", DeliverOrderLogRespVO.class,
|
||||||
|
BeanUtils.toBean(list, DeliverOrderLogRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.deliverorderlog.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
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 DeliverOrderLogPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "发货单编号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "发货单id", example = "4655")
|
||||||
|
private String deliverOrderId;
|
||||||
|
|
||||||
|
@Schema(description = "修改人id", example = "21838")
|
||||||
|
private Integer reviseId;
|
||||||
|
|
||||||
|
@Schema(description = "当前操作人id", example = "18718")
|
||||||
|
private Integer oldReviseId;
|
||||||
|
|
||||||
|
@Schema(description = "修改时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] reviseDate;
|
||||||
|
|
||||||
|
@Schema(description = "当前操作修改时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] oldReviseDate;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.deliverorderlog.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 发货单日志 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class DeliverOrderLogRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "8362")
|
||||||
|
@ExcelProperty("自增字段,唯一")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "发货单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("发货单编号")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "发货单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4655")
|
||||||
|
@ExcelProperty("发货单id")
|
||||||
|
private String deliverOrderId;
|
||||||
|
|
||||||
|
@Schema(description = "修改人id", example = "21838")
|
||||||
|
@ExcelProperty("修改人id")
|
||||||
|
private Integer reviseId;
|
||||||
|
|
||||||
|
@Schema(description = "当前操作人id", example = "18718")
|
||||||
|
@ExcelProperty("当前操作人id")
|
||||||
|
private Integer oldReviseId;
|
||||||
|
|
||||||
|
@Schema(description = "修改时间")
|
||||||
|
@ExcelProperty("修改时间")
|
||||||
|
private LocalDateTime reviseDate;
|
||||||
|
|
||||||
|
@Schema(description = "当前操作修改时间")
|
||||||
|
@ExcelProperty("当前操作修改时间")
|
||||||
|
private LocalDateTime oldReviseDate;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.controller.admin.deliverorderlog.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import java.util.*;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 发货单日志新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class DeliverOrderLogSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "8362")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "发货单编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "发货单编号不能为空")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Schema(description = "发货单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "4655")
|
||||||
|
@NotEmpty(message = "发货单id不能为空")
|
||||||
|
private String deliverOrderId;
|
||||||
|
|
||||||
|
@Schema(description = "修改人id", example = "21838")
|
||||||
|
private Integer reviseId;
|
||||||
|
|
||||||
|
@Schema(description = "当前操作人id", example = "18718")
|
||||||
|
private Integer oldReviseId;
|
||||||
|
|
||||||
|
@Schema(description = "修改时间")
|
||||||
|
private LocalDateTime reviseDate;
|
||||||
|
|
||||||
|
@Schema(description = "当前操作修改时间")
|
||||||
|
private LocalDateTime oldReviseDate;
|
||||||
|
|
||||||
|
}
|
||||||
@ -71,4 +71,6 @@ public class OrderYsRespVO {
|
|||||||
private Integer deliveryStatus;
|
private Integer deliveryStatus;
|
||||||
private Long projectId;
|
private Long projectId;
|
||||||
private String projectCode;
|
private String projectCode;
|
||||||
|
private LocalDateTime projectStartTime;
|
||||||
|
private String contractNo;
|
||||||
}
|
}
|
||||||
@ -112,6 +112,16 @@ public class PlanSubDetailController {
|
|||||||
public CommonResult modification(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
|
public CommonResult modification(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
|
||||||
return planSubDetailService.modification(updateReqVO);
|
return planSubDetailService.modification(updateReqVO);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/Intersection")
|
||||||
|
@Operation(summary = "重叠判断是否有交集")
|
||||||
|
public CommonResult Intersection(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
|
||||||
|
return planSubDetailService.Intersection(updateReqVO);
|
||||||
|
}
|
||||||
|
@PostMapping("/overlap")
|
||||||
|
@Operation(summary = "重叠")
|
||||||
|
public CommonResult overlap(@Valid @RequestBody PlanSubDetailSaveReqVO updateReqVO) {
|
||||||
|
return planSubDetailService.overlap(updateReqVO);
|
||||||
|
}
|
||||||
@GetMapping("/pageAddList")
|
@GetMapping("/pageAddList")
|
||||||
@Operation(summary = "获得生产计划子项目设计时间明细分页")
|
@Operation(summary = "获得生产计划子项目设计时间明细分页")
|
||||||
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')")
|
@PreAuthorize("@ss.hasPermission('heli:plan-sub-detail:query')")
|
||||||
|
|||||||
@ -82,4 +82,5 @@ public class PlanSubDetailRespVO {
|
|||||||
private String projectSubName ;
|
private String projectSubName ;
|
||||||
private String projectNameSim ;
|
private String projectNameSim ;
|
||||||
private LocalDateTime time ;
|
private LocalDateTime time ;
|
||||||
|
private String isOverLab ;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,5 +60,6 @@ public class PlanSubDetailSaveReqVO {
|
|||||||
private String isAdd;
|
private String isAdd;
|
||||||
@Schema(description = "是否新增")
|
@Schema(description = "是否新增")
|
||||||
private List<PlanSubDetailDO> list;
|
private List<PlanSubDetailDO> list;
|
||||||
|
@Schema(description = "是否重叠")
|
||||||
|
private String isOverLab;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,5 +64,6 @@ public class PlanTaskPageReqVO extends PageParam {
|
|||||||
|
|
||||||
@Schema(description = "子项目名称")
|
@Schema(description = "子项目名称")
|
||||||
private String projectSubName;
|
private String projectSubName;
|
||||||
|
private String flag;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -20,28 +20,52 @@ public class PurchaseOrderMakeRespVO {
|
|||||||
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "29741")
|
@Schema(description = "自增字段,唯一", requiredMode = Schema.RequiredMode.REQUIRED, example = "29741")
|
||||||
// @ExcelProperty("自增字段,唯一")
|
// @ExcelProperty("自增字段,唯一")
|
||||||
private Long id;
|
private Long id;
|
||||||
@ExcelProperty("送审日期")
|
@ExcelProperty("编号")
|
||||||
|
private String code;
|
||||||
|
@ExcelProperty("日期")
|
||||||
private String time;
|
private String time;
|
||||||
@ExcelProperty("子项目编码")
|
@Schema(description = "客户简称")
|
||||||
|
@ExcelProperty("客户名")
|
||||||
|
private String brief;
|
||||||
|
@ExcelProperty("模具名")
|
||||||
private String projectSubCode;
|
private String projectSubCode;
|
||||||
@ExcelProperty("图号")
|
@ExcelProperty("件号")
|
||||||
private String blueprintNo;
|
private String blueprintNo;
|
||||||
@ExcelProperty("零件名称")
|
@ExcelProperty("零件名称")
|
||||||
private String boomName;
|
private String boomName;
|
||||||
@ExcelProperty("规格")
|
|
||||||
private String boomSpec;
|
|
||||||
@ExcelProperty("材料")
|
@ExcelProperty("材料")
|
||||||
private String composition;
|
private String composition;
|
||||||
@ExcelProperty("工序")
|
@ExcelProperty("规格")
|
||||||
private String procedureName;
|
private String boomSpec;
|
||||||
@ExcelProperty("需求数量")
|
@ExcelProperty("数量")
|
||||||
private String boomAmount;
|
|
||||||
@ExcelProperty("采购数量")
|
|
||||||
private String purchaseAmount;
|
private String purchaseAmount;
|
||||||
@ExcelProperty("供应商")
|
|
||||||
private String supplierName;
|
|
||||||
@ExcelProperty("单价")
|
@ExcelProperty("单价")
|
||||||
private String unitPrice;
|
private String unitPrice;
|
||||||
|
@Schema(description = "暂估价金额", example = "13902")
|
||||||
|
@ExcelProperty("总价格")
|
||||||
|
private BigDecimal estimatedPrice;
|
||||||
|
@ExcelProperty("要求日期")
|
||||||
|
private String requir;
|
||||||
|
@ExcelProperty("剩余流程")
|
||||||
|
private String residue;
|
||||||
|
@ExcelProperty("开始日期")
|
||||||
|
private String startTime;
|
||||||
|
@ExcelProperty("结束日期")
|
||||||
|
private String endTime;
|
||||||
|
@ExcelProperty(value = "到厂", converter = DictConvert.class)
|
||||||
|
@DictFormat("heli_receiving_status")
|
||||||
|
private String effectiveReceivingStatus;
|
||||||
|
@ExcelProperty("外协厂家")
|
||||||
|
private String supplierName;
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String procedureName;
|
||||||
|
@ExcelProperty("字数")
|
||||||
|
private String words;
|
||||||
|
|
||||||
|
@ExcelProperty("责任人")
|
||||||
|
private String duEmpName;
|
||||||
|
// @ExcelProperty("需求数量")
|
||||||
|
private String boomAmount;
|
||||||
|
|
||||||
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "采购单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
|
||||||
@ -67,16 +91,10 @@ public class PurchaseOrderMakeRespVO {
|
|||||||
// @ExcelProperty("税率")
|
// @ExcelProperty("税率")
|
||||||
private Integer taxRatio;
|
private Integer taxRatio;
|
||||||
|
|
||||||
@Schema(description = "暂估价金额", example = "13902")
|
|
||||||
@ExcelProperty("总价")
|
|
||||||
private BigDecimal estimatedPrice;
|
|
||||||
@ExcelProperty("责任人")
|
|
||||||
private String duEmpName;
|
|
||||||
@ExcelProperty(value = "收货状态", converter = DictConvert.class)
|
|
||||||
@DictFormat("heli_receiving_status")
|
|
||||||
private String effectiveReceivingStatus;
|
|
||||||
@ExcelProperty("要求到货日期")
|
|
||||||
private String requir;
|
|
||||||
@Schema(description = "实际价金额", example = "14735")
|
@Schema(description = "实际价金额", example = "14735")
|
||||||
// @ExcelProperty("实际价金额")
|
// @ExcelProperty("实际价金额")
|
||||||
private BigDecimal actualPrice;
|
private BigDecimal actualPrice;
|
||||||
@ -121,9 +139,7 @@ public class PurchaseOrderMakeRespVO {
|
|||||||
// @ExcelProperty("客户id")
|
// @ExcelProperty("客户id")
|
||||||
private Long customerId;
|
private Long customerId;
|
||||||
|
|
||||||
@Schema(description = "客户简称")
|
|
||||||
@ExcelProperty("客户简称")
|
|
||||||
private String brief;
|
|
||||||
|
|
||||||
@Schema(description = "项目名称", example = "芋艿")
|
@Schema(description = "项目名称", example = "芋艿")
|
||||||
// @ExcelProperty("项目名称")
|
// @ExcelProperty("项目名称")
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.storage;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.outsourcestockboom.vo.OutsourceStockBoomSaveReqVO;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.outsourcestockboom.vo.OutsourceStockBoomSaveReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.storagelog.vo.StorageLogPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorderno.PurchaseOrderNoDO;
|
||||||
@ -21,6 +22,7 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
|
|||||||
import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService;
|
import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.storagemat.StorageMatService;
|
import com.chanko.yunxi.mes.module.heli.service.storagemat.StorageMatService;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -33,8 +35,10 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.servlet.http.*;
|
import javax.servlet.http.*;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -147,7 +151,7 @@ public class StorageController {
|
|||||||
} else if(updateReqVO.getStatus().equals(2) && updateReqVO.getStockType().equals(2)){
|
} else if(updateReqVO.getStatus().equals(2) && updateReqVO.getStockType().equals(2)){
|
||||||
targetDo.setOutbound(updateReqVO.getOutbound());
|
targetDo.setOutbound(updateReqVO.getOutbound());
|
||||||
targetDo.setOutboundTime(currTime);
|
targetDo.setOutboundTime(currTime);
|
||||||
}else{
|
}else if(updateReqVO.getStatus().equals(3)){
|
||||||
targetDo.setCancel(updateReqVO.getCancel());
|
targetDo.setCancel(updateReqVO.getCancel());
|
||||||
targetDo.setCancelTime(currTime);
|
targetDo.setCancelTime(currTime);
|
||||||
}
|
}
|
||||||
@ -182,13 +186,15 @@ public class StorageController {
|
|||||||
storageInventoryDO.setShortName(materialDO.getShortName());
|
storageInventoryDO.setShortName(materialDO.getShortName());
|
||||||
storageInventoryDO.setBoomCode(materialDO.getCode());
|
storageInventoryDO.setBoomCode(materialDO.getCode());
|
||||||
}
|
}
|
||||||
storageInventoryDO.setPrice(storageMatDO.getPrice());
|
storageInventoryDO.setPrice(ObjectUtil.isNotEmpty(storageMatDO.getPrice())?storageMatDO.getPrice():BigDecimal.ZERO);
|
||||||
}else {
|
}else {
|
||||||
BigDecimal totalNumber = storageInventoryDO.getYardAmount().add(storageMatDO.getStorageOkQty());
|
BigDecimal totalNumber = storageInventoryDO.getYardAmount().add(storageMatDO.getStorageOkQty());
|
||||||
BigDecimal inventoryPrice = storageInventoryDO.getYardAmount().multiply(storageInventoryDO.getPrice());
|
BigDecimal inventoryPrice = storageInventoryDO.getYardAmount().multiply(storageInventoryDO.getPrice());
|
||||||
BigDecimal inPrice = storageMatDO.getStorageOkQty().multiply(storageMatDO.getPrice());
|
if (ObjectUtil.isNotEmpty(storageMatDO.getPrice())){
|
||||||
BigDecimal sumPrice = inventoryPrice.add(inPrice);
|
BigDecimal inPrice = storageMatDO.getStorageOkQty().multiply(storageMatDO.getPrice());
|
||||||
storageInventoryDO.setPrice(sumPrice.divide(totalNumber,2, RoundingMode.HALF_UP));
|
BigDecimal sumPrice = inventoryPrice.add(inPrice);
|
||||||
|
storageInventoryDO.setPrice(sumPrice.divide(totalNumber,2, RoundingMode.HALF_UP));
|
||||||
|
}
|
||||||
storageInventoryDO.setYardAmount(totalNumber);
|
storageInventoryDO.setYardAmount(totalNumber);
|
||||||
}
|
}
|
||||||
storageInventoryMapper.insertOrUpdate(storageInventoryDO);
|
storageInventoryMapper.insertOrUpdate(storageInventoryDO);
|
||||||
@ -260,7 +266,7 @@ public class StorageController {
|
|||||||
} else if(updateReqVO.getStatus().equals(2) && updateReqVO.getStockType().equals(2)){
|
} else if(updateReqVO.getStatus().equals(2) && updateReqVO.getStockType().equals(2)){
|
||||||
targetDo.setOutbound(updateReqVO.getOutbound());
|
targetDo.setOutbound(updateReqVO.getOutbound());
|
||||||
targetDo.setOutboundTime(currTime);
|
targetDo.setOutboundTime(currTime);
|
||||||
}else{
|
}else if(updateReqVO.getStatus().equals(3)){
|
||||||
targetDo.setCancel(updateReqVO.getCancel());
|
targetDo.setCancel(updateReqVO.getCancel());
|
||||||
targetDo.setCancelTime(currTime);
|
targetDo.setCancelTime(currTime);
|
||||||
}
|
}
|
||||||
@ -357,4 +363,50 @@ public class StorageController {
|
|||||||
return success(storageService.isPrint(id));
|
return success(storageService.isPrint(id));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@GetMapping("/export-excel-new")
|
||||||
|
@Operation(summary = "导出入库单 Excel")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportStorageExcelNew(StoragePageReqVO storagePageReqVO, HttpServletResponse response) throws IOException {
|
||||||
|
Workbook workbook = storageService.exportExcelNew(storagePageReqVO.getStockNo());
|
||||||
|
// 2. 设置响应头
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
|
||||||
|
// 3. 处理文件名,防止中文乱码
|
||||||
|
String fileName = URLEncoder.encode("入库单", "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
|
||||||
|
// 4. 将Excel写入响应输出流
|
||||||
|
try (OutputStream outputStream = response.getOutputStream()) {
|
||||||
|
workbook.write(outputStream);
|
||||||
|
} finally {
|
||||||
|
// 5. 关闭工作簿,释放资源
|
||||||
|
if (workbook != null) {
|
||||||
|
workbook.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@GetMapping("/export-excel-out")
|
||||||
|
@Operation(summary = "导出库存信息 Excel")
|
||||||
|
@OperateLog(type = EXPORT)
|
||||||
|
public void exportStorageExcelOut(StoragePageReqVO storagePageReqVO, HttpServletResponse response) throws IOException {
|
||||||
|
Workbook workbook = storageService.exportExcelOut(storagePageReqVO.getStockNo());
|
||||||
|
// 2. 设置响应头
|
||||||
|
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
|
||||||
|
// 3. 处理文件名,防止中文乱码
|
||||||
|
String fileName = URLEncoder.encode("出库单", "UTF-8").replaceAll("\\+", "%20");
|
||||||
|
response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx");
|
||||||
|
|
||||||
|
// 4. 将Excel写入响应输出流
|
||||||
|
try (OutputStream outputStream = response.getOutputStream()) {
|
||||||
|
workbook.write(outputStream);
|
||||||
|
} finally {
|
||||||
|
// 5. 关闭工作簿,释放资源
|
||||||
|
if (workbook != null) {
|
||||||
|
workbook.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.chanko.yunxi.mes.module.heli.controller.admin.storagelog;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogAll.StorageLogAllDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogAll.StorageLogAllDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -14,7 +15,9 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import javax.validation.constraints.*;
|
import javax.validation.constraints.*;
|
||||||
import javax.validation.*;
|
import javax.validation.*;
|
||||||
import javax.servlet.http.*;
|
import javax.servlet.http.*;
|
||||||
|
import java.io.OutputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
@ -175,4 +178,5 @@ public class StorageLogController {
|
|||||||
PageResult<StorageLogNowDO> pageResult = storageLogService.getSupplementPage(pageReqVO);
|
PageResult<StorageLogNowDO> pageResult = storageLogService.getSupplementPage(pageReqVO);
|
||||||
return success(pageResult);
|
return success(pageResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -50,6 +50,7 @@ public class StorageLogPageReqVO extends PageParam {
|
|||||||
private Long pnId;
|
private Long pnId;
|
||||||
@Schema(description = "库位")
|
@Schema(description = "库位")
|
||||||
private Long headerId;
|
private Long headerId;
|
||||||
|
@Schema(description = "单据编号")
|
||||||
|
private String codeNo;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -0,0 +1,57 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorderlog;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
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_deliver_order_log")
|
||||||
|
@KeySequence("project_deliver_order_log_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class DeliverOrderLogDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 自增字段,唯一
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 发货单编号
|
||||||
|
*/
|
||||||
|
private String code;
|
||||||
|
/**
|
||||||
|
* 发货单id
|
||||||
|
*/
|
||||||
|
private String deliverOrderId;
|
||||||
|
/**
|
||||||
|
* 修改人id
|
||||||
|
*/
|
||||||
|
private Integer reviseId;
|
||||||
|
/**
|
||||||
|
* 当前操作人id
|
||||||
|
*/
|
||||||
|
private Integer oldReviseId;
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime reviseDate;
|
||||||
|
/**
|
||||||
|
* 当前操作修改时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime oldReviseDate;
|
||||||
|
|
||||||
|
}
|
||||||
@ -67,6 +67,10 @@ public class OrderYsDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private String rem;
|
private String rem;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
private LocalDateTime projectStartTime;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String contractNo;
|
||||||
|
@TableField(exist = false)
|
||||||
private BigDecimal amount;
|
private BigDecimal amount;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
@ -85,6 +85,10 @@ public class PlanSubDetailDO extends BaseDO {
|
|||||||
* 子项目名称,唯一
|
* 子项目名称,唯一
|
||||||
*/
|
*/
|
||||||
private String isCha;
|
private String isCha;
|
||||||
|
/**
|
||||||
|
* 是否重叠
|
||||||
|
*/
|
||||||
|
private String isOverLab;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer flag;
|
private Integer flag;
|
||||||
private Long projectPlanSubId;
|
private Long projectPlanSubId;
|
||||||
|
|||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorderlog;
|
||||||
|
|
||||||
|
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.deliverorderlog.DeliverOrderLogDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.deliverorderlog.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单日志 Mapper
|
||||||
|
*
|
||||||
|
* @author 管理员
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface DeliverOrderLogMapper extends BaseMapperX<DeliverOrderLogDO> {
|
||||||
|
|
||||||
|
default PageResult<DeliverOrderLogDO> selectPage(DeliverOrderLogPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<DeliverOrderLogDO>()
|
||||||
|
.eqIfPresent(DeliverOrderLogDO::getCode, reqVO.getCode())
|
||||||
|
.eqIfPresent(DeliverOrderLogDO::getDeliverOrderId, reqVO.getDeliverOrderId())
|
||||||
|
.eqIfPresent(DeliverOrderLogDO::getReviseId, reqVO.getReviseId())
|
||||||
|
.eqIfPresent(DeliverOrderLogDO::getOldReviseId, reqVO.getOldReviseId())
|
||||||
|
.betweenIfPresent(DeliverOrderLogDO::getReviseDate, reqVO.getReviseDate())
|
||||||
|
.betweenIfPresent(DeliverOrderLogDO::getOldReviseDate, reqVO.getOldReviseDate())
|
||||||
|
.betweenIfPresent(DeliverOrderLogDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(DeliverOrderLogDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -36,6 +36,7 @@ public interface OrderYsMapper extends BaseMapperX<OrderYsDO> {
|
|||||||
.select("sum(i.amount) as amount")
|
.select("sum(i.amount) as amount")
|
||||||
.select("p.delivery_status as deliveryStatus")
|
.select("p.delivery_status as deliveryStatus")
|
||||||
.select("p.id as projectId","p.code as projectCode")
|
.select("p.id as projectId","p.code as projectCode")
|
||||||
|
.select("p.project_start_time as projectStartTime","p.contract_no as contractNo")
|
||||||
.leftJoin(
|
.leftJoin(
|
||||||
"finance_invoice i ON i.order_code = t.code AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
"finance_invoice i ON i.order_code = t.code AND i.deleted=0 and i.tenant_id=2 and i.business_type = 'FINANCE_MAKE_INVOICE' AND i.status !='3'")
|
||||||
.leftJoin(ProjectOrderDO.class,"p", ProjectOrderDO::getCode, OrderYsDO::getCode)
|
.leftJoin(ProjectOrderDO.class,"p", ProjectOrderDO::getCode, OrderYsDO::getCode)
|
||||||
|
|||||||
@ -70,6 +70,7 @@ public interface PlanSubDetailMapper extends BaseMapperX<PlanSubDetailDO> {
|
|||||||
.leftJoin(PlanSubDO.class,"psub",PlanSubDO::getId,PlanSubDetailDO::getProjectPlanSubId)
|
.leftJoin(PlanSubDO.class,"psub",PlanSubDO::getId,PlanSubDetailDO::getProjectPlanSubId)
|
||||||
.leftJoin(AdminUserDO.class,"ad",AdminUserDO::getId,PlanSubDetailDO::getTwoDimOwner)
|
.leftJoin(AdminUserDO.class,"ad",AdminUserDO::getId,PlanSubDetailDO::getTwoDimOwner)
|
||||||
.in(PlanSubDetailDO::getTwoDimOwner,ownerList)
|
.in(PlanSubDetailDO::getTwoDimOwner,ownerList)
|
||||||
|
.eq(PlanSubDetailDO::getIsOverLab,"N")
|
||||||
.in(PlanSubDetailDO::getIsOverProcess,0,2);
|
.in(PlanSubDetailDO::getIsOverProcess,0,2);
|
||||||
return selectList(query);
|
return selectList(query);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,16 +53,18 @@ public interface PlanTaskMapper extends BaseMapperX<PlanTaskDO> {
|
|||||||
.like(!StringUtils.isEmpty(reqVO.getProjectSubCode()), "ps.project_sub_code", reqVO.getProjectSubCode())
|
.like(!StringUtils.isEmpty(reqVO.getProjectSubCode()), "ps.project_sub_code", reqVO.getProjectSubCode())
|
||||||
.like(!StringUtils.isEmpty(reqVO.getProjectSubName()), "po.name", reqVO.getProjectSubName());
|
.like(!StringUtils.isEmpty(reqVO.getProjectSubName()), "po.name", reqVO.getProjectSubName());
|
||||||
if (ObjectUtil.isNotEmpty(reqVO.getStatus())){
|
if (ObjectUtil.isNotEmpty(reqVO.getStatus())){
|
||||||
if (reqVO.getStatus() == 4){
|
// if (reqVO.getStatus() == 4){
|
||||||
query.eq(ProjectOrderDO::getDeliveryStatus, 3);
|
// query.eq(ProjectOrderDO::getDeliveryStatus, 3);
|
||||||
}else {
|
// }else {
|
||||||
query.eq(PlanTaskDO::getStatus, reqVO.getStatus());
|
query.eq(PlanTaskDO::getStatus, reqVO.getStatus());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(reqVO.getStatus())){
|
// if (ObjectUtil.isEmpty(reqVO.getStatus())){
|
||||||
query.ne(ProjectOrderDO::getDeliveryStatus, 3);
|
// query.ne(ProjectOrderDO::getDeliveryStatus, 3);
|
||||||
|
// }
|
||||||
|
if (ObjectUtil.isNotEmpty(reqVO.getFlag())&&"false".equals(reqVO.getFlag())){
|
||||||
|
query.ne(ProjectOrderDO::getDeliveryStatus,3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return selectPage(reqVO, query);
|
return selectPage(reqVO, query);
|
||||||
|
|
||||||
// return selectPage(reqVO, new LambdaQueryWrapperX<PlanTaskDO>()
|
// return selectPage(reqVO, new LambdaQueryWrapperX<PlanTaskDO>()
|
||||||
|
|||||||
@ -30,7 +30,8 @@ public interface StorageLogMapper extends BaseMapperX<StorageLogDO> {
|
|||||||
|
|
||||||
query.selectAll(StorageLogDO.class)
|
query.selectAll(StorageLogDO.class)
|
||||||
.select( "mat.name as matName","mat.code as matCode","mat.unit as matUnit","wh.wh_name as whName","rg.rg_name as rgName","pn.pn_name as pnName")
|
.select( "mat.name as matName","mat.code as matCode","mat.unit as matUnit","wh.wh_name as whName","rg.rg_name as rgName","pn.pn_name as pnName")
|
||||||
.leftJoin(StorageDO.class, "st", StorageDO::getId, StorageLogDO::getStockId)
|
.select("mat.spec as matSpec")
|
||||||
|
// .leftJoin(StorageDO.class, "st", StorageDO::getId, StorageLogDO::getStockId)
|
||||||
.leftJoin(MaterialDO.class,"mat", MaterialDO::getId,StorageLogDO::getMatId)
|
.leftJoin(MaterialDO.class,"mat", MaterialDO::getId,StorageLogDO::getMatId)
|
||||||
.leftJoin(WarehouseDO.class,"wh", WarehouseDO::getId,StorageLogDO::getWhId)
|
.leftJoin(WarehouseDO.class,"wh", WarehouseDO::getId,StorageLogDO::getWhId)
|
||||||
.leftJoin(RgDO.class,"rg", RgDO::getId,StorageLogDO::getRgId)
|
.leftJoin(RgDO.class,"rg", RgDO::getId,StorageLogDO::getRgId)
|
||||||
@ -41,6 +42,9 @@ public interface StorageLogMapper extends BaseMapperX<StorageLogDO> {
|
|||||||
query
|
query
|
||||||
.eq(reqVO.getStockType() != null,StorageLogDO::getStockType, reqVO.getStockType())
|
.eq(reqVO.getStockType() != null,StorageLogDO::getStockType, reqVO.getStockType())
|
||||||
.like(!StringUtils.isEmpty(reqVO.getMatName()), MaterialDO::getName, reqVO.getMatName())
|
.like(!StringUtils.isEmpty(reqVO.getMatName()), MaterialDO::getName, reqVO.getMatName())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getCodeNo()), StorageLogDO::getCodeNo, reqVO.getCodeNo())
|
||||||
|
.like(!StringUtils.isEmpty(reqVO.getMatSpec()), MaterialDO::getSpec, reqVO.getMatSpec())
|
||||||
|
|
||||||
.eq(!ObjectUtil.isEmpty(reqVO.getWhId()), StorageLogDO::getWhId, reqVO.getWhId());
|
.eq(!ObjectUtil.isEmpty(reqVO.getWhId()), StorageLogDO::getWhId, reqVO.getWhId());
|
||||||
return selectPage(reqVO,query);
|
return selectPage(reqVO,query);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,7 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.deliverorder.vo.Deliver
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthingDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderSubDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorder.DeliverOrderSubDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorderlog.DeliverOrderLogDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||||
@ -20,6 +21,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageinventory.StorageI
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorder.DeliverOrderMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorder.DeliverOrderMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorder.DeliverOrderSubMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorder.DeliverOrderSubMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.deliverorderlog.DeliverOrderLogMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderMapper;
|
||||||
@ -83,6 +85,8 @@ public class DeliverOrderServiceImpl implements DeliverOrderService {
|
|||||||
private MaterialMapper materialMapper;
|
private MaterialMapper materialMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private AdminUserMapper adminUserMapper;
|
private AdminUserMapper adminUserMapper;
|
||||||
|
@Resource
|
||||||
|
private DeliverOrderLogMapper deliverOrderLogMapper;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -143,7 +147,18 @@ public class DeliverOrderServiceImpl implements DeliverOrderService {
|
|||||||
// if(!oldDO.canOperate(operateTypeEnum)){
|
// if(!oldDO.canOperate(operateTypeEnum)){
|
||||||
// throw exception(INVALID_OPERATE);
|
// throw exception(INVALID_OPERATE);
|
||||||
// }
|
// }
|
||||||
|
// if (!(updateReqVO.getUpdateTime().compareTo(oldDO.getUpdateTime()) == 0)){
|
||||||
|
// DeliverOrderLogDO deliverOrderLogDO = new DeliverOrderLogDO();
|
||||||
|
// deliverOrderLogDO.builder()
|
||||||
|
// .code(oldDO.getCode())
|
||||||
|
// .deliverOrderId(String.valueOf(oldDO.getId()))
|
||||||
|
// .reviseId(Integer.valueOf(oldDO.getUpdater()))
|
||||||
|
// .oldReviseId(updateReqVO.getUpdater())
|
||||||
|
// .reviseDate(oldDO.getUpdateTime())
|
||||||
|
// .oldReviseDate(updateReqVO.getUpdateTime());
|
||||||
|
// deliverOrderLogMapper.insert(deliverOrderLogDO);
|
||||||
|
// throw new RuntimeException("当前数据已更新,请退出重新进入");
|
||||||
|
// }
|
||||||
// 更新
|
// 更新
|
||||||
DeliverOrderDO updateObj = BeanUtils.toBean(updateReqVO, DeliverOrderDO.class);
|
DeliverOrderDO updateObj = BeanUtils.toBean(updateReqVO, DeliverOrderDO.class);
|
||||||
updateObj.setDeliverStatus(DeliverOrderStatusEnum.valueOf(updateReqVO.getActive()).getCode());
|
updateObj.setDeliverStatus(DeliverOrderStatusEnum.valueOf(updateReqVO.getActive()).getCode());
|
||||||
|
|||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.service.deliverorderlog;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import javax.validation.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.controller.admin.deliverorderlog.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorderlog.DeliverOrderLogDO;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
|
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单日志 Service 接口
|
||||||
|
*
|
||||||
|
* @author 管理员
|
||||||
|
*/
|
||||||
|
public interface DeliverOrderLogService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建发货单日志
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createDeliverOrderLog(@Valid DeliverOrderLogSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新发货单日志
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updateDeliverOrderLog(@Valid DeliverOrderLogSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除发货单日志
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deleteDeliverOrderLog(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得发货单日志
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 发货单日志
|
||||||
|
*/
|
||||||
|
DeliverOrderLogDO getDeliverOrderLog(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得发货单日志分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 发货单日志分页
|
||||||
|
*/
|
||||||
|
PageResult<DeliverOrderLogDO> getDeliverOrderLogPage(DeliverOrderLogPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,74 @@
|
|||||||
|
package com.chanko.yunxi.mes.module.heli.service.deliverorderlog;
|
||||||
|
|
||||||
|
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.deliverorderlog.vo.*;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.deliverorderlog.DeliverOrderLogDO;
|
||||||
|
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.deliverorderlog.DeliverOrderLogMapper;
|
||||||
|
|
||||||
|
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 DeliverOrderLogServiceImpl implements DeliverOrderLogService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DeliverOrderLogMapper deliverOrderLogMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createDeliverOrderLog(DeliverOrderLogSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
DeliverOrderLogDO deliverOrderLog = BeanUtils.toBean(createReqVO, DeliverOrderLogDO.class);
|
||||||
|
deliverOrderLogMapper.insert(deliverOrderLog);
|
||||||
|
// 返回
|
||||||
|
return deliverOrderLog.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateDeliverOrderLog(DeliverOrderLogSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validateDeliverOrderLogExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
DeliverOrderLogDO updateObj = BeanUtils.toBean(updateReqVO, DeliverOrderLogDO.class);
|
||||||
|
deliverOrderLogMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteDeliverOrderLog(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validateDeliverOrderLogExists(id);
|
||||||
|
// 删除
|
||||||
|
deliverOrderLogMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validateDeliverOrderLogExists(Long id) {
|
||||||
|
if (deliverOrderLogMapper.selectById(id) == null) {
|
||||||
|
// throw exception(DELIVER_ORDER_LOG_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeliverOrderLogDO getDeliverOrderLog(Long id) {
|
||||||
|
return deliverOrderLogMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<DeliverOrderLogDO> getDeliverOrderLogPage(DeliverOrderLogPageReqVO pageReqVO) {
|
||||||
|
return deliverOrderLogMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -64,4 +64,8 @@ public interface PlanSubDetailService {
|
|||||||
CommonResult modification(PlanSubDetailSaveReqVO updateReqVO);
|
CommonResult modification(PlanSubDetailSaveReqVO updateReqVO);
|
||||||
CommonResult operate(PlanSubDetailSaveReqVO updateReqVO);
|
CommonResult operate(PlanSubDetailSaveReqVO updateReqVO);
|
||||||
CommonResult insertWork(PlanSubDetailSaveReqVO updateReqVO);
|
CommonResult insertWork(PlanSubDetailSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
CommonResult Intersection(PlanSubDetailSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
CommonResult overlap(PlanSubDetailSaveReqVO updateReqVO);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -98,6 +98,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
wrapper.eq(PlanSubDetailDO::getProjectSubId,planSubDetailDO.getProjectSubId());
|
wrapper.eq(PlanSubDetailDO::getProjectSubId,planSubDetailDO.getProjectSubId());
|
||||||
|
|
||||||
wrapper.eq(PlanSubDetailDO::getSubType,planSubDetailDO.getSubType());
|
wrapper.eq(PlanSubDetailDO::getSubType,planSubDetailDO.getSubType());
|
||||||
|
// wrapper.eq(PlanSubDetailDO::getTwoDimOwner,planSubDetailDO.getTwoDimOwner());
|
||||||
// wrapper.gt(PlanSubDetailDO::getSeqNo,planSubDetailDO.getSeqNo());
|
// wrapper.gt(PlanSubDetailDO::getSeqNo,planSubDetailDO.getSeqNo());
|
||||||
//查所有的
|
//查所有的
|
||||||
List<PlanSubDetailDO> planSubDetailList = planSubDetailMapper.selectList(wrapper);
|
List<PlanSubDetailDO> planSubDetailList = planSubDetailMapper.selectList(wrapper);
|
||||||
@ -179,6 +180,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
wrapper.eq(PlanSubDetailDO::getProjectSubId,planSubDetailDO.getProjectSubId());
|
wrapper.eq(PlanSubDetailDO::getProjectSubId,planSubDetailDO.getProjectSubId());
|
||||||
wrapper.eq(PlanSubDetailDO::getSubType,planSubDetailDO.getSubType());
|
wrapper.eq(PlanSubDetailDO::getSubType,planSubDetailDO.getSubType());
|
||||||
wrapper.gt(PlanSubDetailDO::getSeqNo,planSubDetailDO.getSeqNo());
|
wrapper.gt(PlanSubDetailDO::getSeqNo,planSubDetailDO.getSeqNo());
|
||||||
|
// wrapper.eq(PlanSubDetailDO::getTwoDimOwner,pageReqVO.getTwoDimOwner());
|
||||||
if (planSubDetailMapper.selectCount(wrapper)>0) {
|
if (planSubDetailMapper.selectCount(wrapper)>0) {
|
||||||
planSubDetailDO.setFlag(0);
|
planSubDetailDO.setFlag(0);
|
||||||
}else {
|
}else {
|
||||||
@ -307,6 +309,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
queryWrapper.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
queryWrapper.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
||||||
queryWrapper.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
queryWrapper.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
||||||
queryWrapper.eq(PlanSubDetailDO::getSubType,updateReqVO.getSubType()); //注释原因,这样只考虑这个类型的了
|
queryWrapper.eq(PlanSubDetailDO::getSubType,updateReqVO.getSubType()); //注释原因,这样只考虑这个类型的了
|
||||||
|
queryWrapper.eq(PlanSubDetailDO::getIsOverLab,"N");
|
||||||
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
queryWrapper.ne(PlanSubDetailDO::getId,updateReqVO.getId());
|
queryWrapper.ne(PlanSubDetailDO::getId,updateReqVO.getId());
|
||||||
}
|
}
|
||||||
@ -355,11 +358,25 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
lambdaQueryWrapper.in(PlanSubDetailDO::getIsOverProcess,0,2);
|
lambdaQueryWrapper.in(PlanSubDetailDO::getIsOverProcess,0,2);
|
||||||
lambdaQueryWrapper.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
lambdaQueryWrapper.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
||||||
lambdaQueryWrapper.ge(PlanSubDetailDO::getTwoDimDate,updateReqVO.getStartTwoDimDate());
|
lambdaQueryWrapper.ge(PlanSubDetailDO::getTwoDimDate,updateReqVO.getStartTwoDimDate());
|
||||||
|
lambdaQueryWrapper.eq(PlanSubDetailDO::getIsOverLab,"N");
|
||||||
lambdaQueryWrapper.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
lambdaQueryWrapper.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
||||||
// if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
// lambdaQueryWrapper.ne(PlanSubDetailDO::getId,updateReqVO.getId());
|
lambdaQueryWrapper.ne(PlanSubDetailDO::getId,updateReqVO.getId());
|
||||||
// }
|
}
|
||||||
List<PlanSubDetailDO> list = planSubDetailMapper.selectList(lambdaQueryWrapper);
|
List<PlanSubDetailDO> list = planSubDetailMapper.selectList(lambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(list)){
|
||||||
|
for (int i = 0; i < list.size()-1; i++) {
|
||||||
|
LocalDateTime reqStart = list.get(i).getStartTwoDimDate();
|
||||||
|
LocalDateTime reqEnd = list.get(i).getTwoDimDate();
|
||||||
|
LocalDateTime existStart = list.get(i+1).getStartTwoDimDate();
|
||||||
|
LocalDateTime existEnd = list.get(i+1).getTwoDimDate();
|
||||||
|
// 判断当前条开始日期与结束日期是否跟下一条有交集
|
||||||
|
boolean hasOverlap = !(reqEnd.compareTo(existStart) < 0) && !(reqStart.compareTo(existEnd) > 0);
|
||||||
|
if (hasOverlap) {
|
||||||
|
return CommonResult.error(400,"当前开始日期的后续计划日期存在交集,不允许操作");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
List<PlanSubDetailDO> noSelfList = new ArrayList<>();
|
List<PlanSubDetailDO> noSelfList = new ArrayList<>();
|
||||||
for (PlanSubDetailDO planSubDetailDO : list) {
|
for (PlanSubDetailDO planSubDetailDO : list) {
|
||||||
if (!planSubDetailDO.getId().equals(updateReqVO.getId())){
|
if (!planSubDetailDO.getId().equals(updateReqVO.getId())){
|
||||||
@ -377,7 +394,7 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (change || ObjectUtil.isEmpty(noSelfList) ||(noSelfList.get(0).getStartTwoDimDate().compareTo(updateReqVO.getTwoDimDate()) > 0 )){
|
if (change || ObjectUtil.isEmpty(noSelfList) ||(noSelfList.get(0).getStartTwoDimDate().compareTo(updateReqVO.getTwoDimDate()) > 0 ) || "Y".equals(updateReqVO.getIsOverLab())){
|
||||||
List<PlanSubDetailDO> newList = new ArrayList<>();
|
List<PlanSubDetailDO> newList = new ArrayList<>();
|
||||||
newList.addAll(list);
|
newList.addAll(list);
|
||||||
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
@ -404,13 +421,14 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
planSubDetailDO.setSeqNo(1L);
|
planSubDetailDO.setSeqNo(1L);
|
||||||
planSubDetailDO.setDesignNum(updateReqVO.getDesignNum());
|
planSubDetailDO.setDesignNum(updateReqVO.getDesignNum());
|
||||||
planSubDetailDO.setCode(updateReqVO.getCode());
|
planSubDetailDO.setCode(updateReqVO.getCode());
|
||||||
|
planSubDetailDO.setIsOverLab(updateReqVO.getIsOverLab());
|
||||||
newList.add(planSubDetailDO);
|
newList.add(planSubDetailDO);
|
||||||
// newList.sort(Comparator.comparing(PlanSubDetailDO::getStartTwoDimDate, Comparator.nullsLast(Comparator.naturalOrder())));
|
// newList.sort(Comparator.comparing(PlanSubDetailDO::getStartTwoDimDate, Comparator.nullsLast(Comparator.naturalOrder())));
|
||||||
planSubDetailMapper.insertOrUpdateBatch(newList);
|
planSubDetailMapper.insertOrUpdateBatch(newList);
|
||||||
LambdaQueryWrapper<PlanSubDetailDO> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<PlanSubDetailDO> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper1.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
lambdaQueryWrapper1.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
||||||
lambdaQueryWrapper1.ge(PlanSubDetailDO::getSubType,updateReqVO.getSubType());
|
lambdaQueryWrapper1.ge(PlanSubDetailDO::getSubType,updateReqVO.getSubType());
|
||||||
lambdaQueryWrapper1.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
// lambdaQueryWrapper1.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
||||||
lambdaQueryWrapper1.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
lambdaQueryWrapper1.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
||||||
List<PlanSubDetailDO> planSubDetailDOS1 = planSubDetailMapper.selectList(lambdaQueryWrapper1);
|
List<PlanSubDetailDO> planSubDetailDOS1 = planSubDetailMapper.selectList(lambdaQueryWrapper1);
|
||||||
Map<Long, List<PlanSubDetailDO>> collect = planSubDetailDOS1.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getProjectSubId));
|
Map<Long, List<PlanSubDetailDO>> collect = planSubDetailDOS1.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getProjectSubId));
|
||||||
@ -591,6 +609,9 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
|
deleteId.add(updateReqVO.getId());
|
||||||
|
}
|
||||||
// Map<Long, List<PlanSubDetailDO>> collect1 = list.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getProjectSubId));
|
// Map<Long, List<PlanSubDetailDO>> collect1 = list.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getProjectSubId));
|
||||||
// collect1.forEach((id,detailList) -> {
|
// collect1.forEach((id,detailList) -> {
|
||||||
// Map<String, List<PlanSubDetailDO>> collect2 = detailList.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getSubType));
|
// Map<String, List<PlanSubDetailDO>> collect2 = detailList.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getSubType));
|
||||||
@ -1557,6 +1578,181 @@ public class PlanSubDetailServiceImpl implements PlanSubDetailService {
|
|||||||
updateReqVO.setList(sortedList);
|
updateReqVO.setList(sortedList);
|
||||||
return CommonResult.success(updateReqVO);
|
return CommonResult.success(updateReqVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonResult Intersection(PlanSubDetailSaveReqVO updateReqVO) {
|
||||||
|
// if (ObjectUtil.isNotEmpty(updateReqVO.getIsAdd())&&"1".equals(updateReqVO.getIsAdd())){
|
||||||
|
// LambdaQueryWrapper<PlanSubDetailDO> wrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
// wrapper1.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
||||||
|
// wrapper1.eq(PlanSubDetailDO::getSubType,updateReqVO.getSubType());
|
||||||
|
// wrapper1.eq(PlanSubDetailDO::getIsOverLab,"N");
|
||||||
|
// List<PlanSubDetailDO> planSubDetailDOS1 = planSubDetailMapper.selectList(wrapper1);
|
||||||
|
// for (PlanSubDetailDO planSubDetailDO : planSubDetailDOS1) {
|
||||||
|
// LocalDateTime reqStart = updateReqVO.getStartTwoDimDate();
|
||||||
|
// LocalDateTime reqEnd = updateReqVO.getTwoDimDate();
|
||||||
|
// LocalDateTime existStart = planSubDetailDO.getStartTwoDimDate();
|
||||||
|
// LocalDateTime existEnd = planSubDetailDO.getTwoDimDate();
|
||||||
|
// // 判断请求时间段是否与已有时间段有重叠
|
||||||
|
// boolean hasOverlap = !(reqEnd.compareTo(existStart) < 0) && !(reqStart.compareTo(existEnd) > 0);
|
||||||
|
// if (hasOverlap) {
|
||||||
|
// return CommonResult.success(true);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
LambdaQueryWrapper<PlanSubDetailDO> wrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
wrapper1.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
||||||
|
wrapper1.eq(PlanSubDetailDO::getSubType,updateReqVO.getSubType());
|
||||||
|
List<PlanSubDetailDO> planSubDetailDOS1 = planSubDetailMapper.selectList(wrapper1);
|
||||||
|
for (PlanSubDetailDO planSubDetailDO : planSubDetailDOS1) {
|
||||||
|
LocalDateTime reqStart = updateReqVO.getStartTwoDimDate();
|
||||||
|
LocalDateTime reqEnd = updateReqVO.getTwoDimDate();
|
||||||
|
LocalDateTime existStart = planSubDetailDO.getStartTwoDimDate();
|
||||||
|
LocalDateTime existEnd = planSubDetailDO.getTwoDimDate();
|
||||||
|
// 判断请求时间段是否与已有时间段有重叠
|
||||||
|
boolean hasOverlap = !(reqEnd.compareTo(existStart) < 0) && !(reqStart.compareTo(existEnd) > 0);
|
||||||
|
if (hasOverlap) {
|
||||||
|
return CommonResult.error(400,"当前子项目,当前设计类型时间存在交集,请确认!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
LambdaQueryWrapper<PlanSubDetailDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PlanSubDetailDO::getIsOverProcess,0,2);
|
||||||
|
lambdaQueryWrapper.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
||||||
|
lambdaQueryWrapper.ge(PlanSubDetailDO::getTwoDimDate,updateReqVO.getStartTwoDimDate());
|
||||||
|
lambdaQueryWrapper.eq(PlanSubDetailDO::getIsOverLab,"N");
|
||||||
|
lambdaQueryWrapper.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
||||||
|
// if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
|
// lambdaQueryWrapper.ne(PlanSubDetailDO::getId,updateReqVO.getId());
|
||||||
|
// }
|
||||||
|
List<PlanSubDetailDO> list = planSubDetailMapper.selectList(lambdaQueryWrapper);
|
||||||
|
List<PlanSubDetailDO> noSelfList = new ArrayList<>();
|
||||||
|
for (PlanSubDetailDO planSubDetailDO : list) {
|
||||||
|
if (!planSubDetailDO.getId().equals(updateReqVO.getId())){
|
||||||
|
noSelfList.add(planSubDetailDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean change = false;
|
||||||
|
if (CollUtil.isNotEmpty(list)){
|
||||||
|
if (list.size() == 1){
|
||||||
|
PlanSubDetailDO planSubDetailDO = list.get(0);
|
||||||
|
if (planSubDetailDO.getId().equals(updateReqVO.getId())){
|
||||||
|
if (updateReqVO.getStartTwoDimDate().compareTo(planSubDetailDO.getStartTwoDimDate()) == 0 || updateReqVO.getTwoDimDate().compareTo(planSubDetailDO.getTwoDimDate()) == 0){
|
||||||
|
change = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (change || ObjectUtil.isEmpty(noSelfList) ||(noSelfList.get(0).getStartTwoDimDate().compareTo(updateReqVO.getTwoDimDate()) > 0 )){
|
||||||
|
|
||||||
|
}else {
|
||||||
|
return CommonResult.success(true);
|
||||||
|
}
|
||||||
|
return CommonResult.success(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CommonResult overlap(PlanSubDetailSaveReqVO updateReqVO) {
|
||||||
|
LambdaQueryWrapper<PlanSubDetailDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.in(PlanSubDetailDO::getIsOverProcess,0,2);
|
||||||
|
lambdaQueryWrapper.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
||||||
|
lambdaQueryWrapper.ge(PlanSubDetailDO::getTwoDimDate,updateReqVO.getStartTwoDimDate());
|
||||||
|
lambdaQueryWrapper.eq(PlanSubDetailDO::getIsOverLab,"N");
|
||||||
|
lambdaQueryWrapper.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
||||||
|
// if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
|
// lambdaQueryWrapper.ne(PlanSubDetailDO::getId,updateReqVO.getId());
|
||||||
|
// }
|
||||||
|
List<PlanSubDetailDO> list = planSubDetailMapper.selectList(lambdaQueryWrapper);
|
||||||
|
|
||||||
|
List<PlanSubDetailDO> newList = new ArrayList<>();
|
||||||
|
newList.addAll(list);
|
||||||
|
if (ObjectUtil.isNotEmpty(updateReqVO.getId())){
|
||||||
|
newList.clear();
|
||||||
|
planSubDetailMapper.delete(PlanSubDetailDO::getId,updateReqVO.getId());
|
||||||
|
for (PlanSubDetailDO planSubDetailDO : list) {
|
||||||
|
if (!planSubDetailDO.getId().equals(updateReqVO.getId())){
|
||||||
|
newList.add(planSubDetailDO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PlanSubDetailDO planSubDetailDO = new PlanSubDetailDO();
|
||||||
|
planSubDetailDO.setProjectPlanId(updateReqVO.getProjectPlanId());
|
||||||
|
planSubDetailDO.setProjectId(updateReqVO.getProjectId());
|
||||||
|
planSubDetailDO.setProjectSubId(updateReqVO.getProjectSubId());
|
||||||
|
planSubDetailDO.setProjectSubCode(updateReqVO.getProjectSubCode());
|
||||||
|
planSubDetailDO.setTwoDimDate(updateReqVO.getTwoDimDate());
|
||||||
|
planSubDetailDO.setTwoDimOwner(updateReqVO.getTwoDimOwner());
|
||||||
|
planSubDetailDO.setStartTwoDimDate(updateReqVO.getStartTwoDimDate());
|
||||||
|
planSubDetailDO.setSubType(updateReqVO.getSubType());
|
||||||
|
planSubDetailDO.setName(updateReqVO.getName());
|
||||||
|
planSubDetailDO.setProjectPlanSubId(updateReqVO.getProjectPlanSubId());
|
||||||
|
planSubDetailDO.setIsOverProcess(0);
|
||||||
|
planSubDetailDO.setSeqNo(1L);
|
||||||
|
planSubDetailDO.setDesignNum(updateReqVO.getDesignNum());
|
||||||
|
planSubDetailDO.setCode(updateReqVO.getCode());
|
||||||
|
planSubDetailDO.setIsOverLab("Y");
|
||||||
|
newList.add(planSubDetailDO);
|
||||||
|
// newList.sort(Comparator.comparing(PlanSubDetailDO::getStartTwoDimDate, Comparator.nullsLast(Comparator.naturalOrder())));
|
||||||
|
planSubDetailMapper.insertOrUpdateBatch(newList);
|
||||||
|
LambdaQueryWrapper<PlanSubDetailDO> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper1.eq(PlanSubDetailDO::getProjectSubId,updateReqVO.getProjectSubId());
|
||||||
|
lambdaQueryWrapper1.ge(PlanSubDetailDO::getSubType,updateReqVO.getSubType());
|
||||||
|
lambdaQueryWrapper1.eq(PlanSubDetailDO::getTwoDimOwner,updateReqVO.getTwoDimOwner());
|
||||||
|
lambdaQueryWrapper1.orderByAsc(PlanSubDetailDO::getStartTwoDimDate);
|
||||||
|
List<PlanSubDetailDO> planSubDetailDOS1 = planSubDetailMapper.selectList(lambdaQueryWrapper1);
|
||||||
|
Map<Long, List<PlanSubDetailDO>> collect = planSubDetailDOS1.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getProjectSubId));
|
||||||
|
collect.forEach((id,detailList) -> {
|
||||||
|
Map<String, List<PlanSubDetailDO>> collect2 = detailList.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getSubType));
|
||||||
|
collect2.forEach((type,list2) ->{
|
||||||
|
int i = 1;
|
||||||
|
for (PlanSubDetailDO planSubDetailDO1 : list2) {
|
||||||
|
planSubDetailDO1.setSeqNo(Long.valueOf(i++));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
planSubDetailMapper.updateBatch(planSubDetailDOS1);
|
||||||
|
for (Map.Entry<Long, List<PlanSubDetailDO>> entry : collect.entrySet()) {
|
||||||
|
Long subId = entry.getKey();
|
||||||
|
List<PlanSubDetailDO> subList = entry.getValue();
|
||||||
|
//再根据设计类型来
|
||||||
|
Map<String, List<PlanSubDetailDO>> collect1 = subList.stream().collect(Collectors.groupingBy(PlanSubDetailDO::getSubType));
|
||||||
|
for (Map.Entry<String, List<PlanSubDetailDO>> entry1 : collect1.entrySet()) {
|
||||||
|
String type = entry1.getKey();
|
||||||
|
List<PlanSubDetailDO> subTypeList = entry1.getValue();
|
||||||
|
List<PlanSubDetailDO> sortedList = subTypeList.stream()
|
||||||
|
.sorted(Comparator.comparing(PlanSubDetailDO::getSeqNo).reversed())
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
Long num = 0L;
|
||||||
|
for (PlanSubDetailDO planSubDetailDO1 : sortedList) {
|
||||||
|
Long designNum = planSubDetailDO1.getDesignNum();
|
||||||
|
num += designNum;
|
||||||
|
}
|
||||||
|
LambdaUpdateWrapper<PlanSubDO> lambdaUpdateWrapper1 = new LambdaUpdateWrapper<>();
|
||||||
|
lambdaUpdateWrapper1.eq(PlanSubDO::getProjectSubId,subId);
|
||||||
|
LocalDateTime startTwoDimDate = sortedList.get(subTypeList.size()-1).getStartTwoDimDate();
|
||||||
|
LocalDateTime twoDimDate = sortedList.get(0).getTwoDimDate();
|
||||||
|
//取最大值就是第一个
|
||||||
|
if ("BLUEPRINT_WORKBLANK".equals(type)){
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getStartBlankDate,startTwoDimDate);
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getBlankDate,twoDimDate);
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getBlankOwner,sortedList.get(0).getTwoDimOwner());
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getBlankNum,num);
|
||||||
|
}else if ("BLUEPRINT_2D".equals(type)){
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getStartTwoDimDate,startTwoDimDate);
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getTwoDimDate,twoDimDate);
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getTwoDimOwner,sortedList.get(0).getTwoDimOwner());
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getTwoDimNum,num);
|
||||||
|
}else {
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getStartThreeDimDate,startTwoDimDate);
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getThreeDimDate,twoDimDate);
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getThreeDimOwner,sortedList.get(0).getTwoDimOwner());
|
||||||
|
lambdaUpdateWrapper1.set(PlanSubDO::getThreeDimNum,num);
|
||||||
|
}
|
||||||
|
planSubMapper.update(lambdaUpdateWrapper1);
|
||||||
|
}
|
||||||
|
return CommonResult.success(true);
|
||||||
|
}
|
||||||
|
return CommonResult.success(false);
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getSearchRlTs(LocalDateTime startDateTime) {
|
public Integer getSearchRlTs(LocalDateTime startDateTime) {
|
||||||
List<ShopCalendarDO> shopCalendarDOS =shopCalendarMapper.getSearchRlTL(startDateTime);
|
List<ShopCalendarDO> shopCalendarDOS =shopCalendarMapper.getSearchRlTL(startDateTime);
|
||||||
int a = shopCalendarDOS.size();
|
int a = shopCalendarDOS.size();
|
||||||
|
|||||||
@ -782,6 +782,7 @@ public class ProcessBomServiceImpl implements ProcessBomService {
|
|||||||
ShenheDO shenheDO = shenheDOS.get(0);
|
ShenheDO shenheDO = shenheDOS.get(0);
|
||||||
updateObj.setShenheUser(shenheDO.getShenheUser());
|
updateObj.setShenheUser(shenheDO.getShenheUser());
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(operateTypeEnum == OperateTypeEnum.AUDIT){
|
if(operateTypeEnum == OperateTypeEnum.AUDIT){
|
||||||
|
|||||||
@ -305,7 +305,7 @@ public class PurchaseOrderNoServiceImpl implements PurchaseOrderNoService {
|
|||||||
public CommonResult<PurchaseOrderNoDO> isPrint(Long id) {
|
public CommonResult<PurchaseOrderNoDO> isPrint(Long id) {
|
||||||
PurchaseOrderNoDO purchaseOrderNoDO = purchaseOrderNoMapper.selectById(id);
|
PurchaseOrderNoDO purchaseOrderNoDO = purchaseOrderNoMapper.selectById(id);
|
||||||
if (ObjectUtil.isNotEmpty(purchaseOrderNoDO)){
|
if (ObjectUtil.isNotEmpty(purchaseOrderNoDO)){
|
||||||
AdminUserDO user = adminUserService.getUser(getLoginUser().getId());
|
AdminUserDO user = adminUserService.getUser(Long.valueOf(purchaseOrderNoDO.getCreator()));
|
||||||
if (ObjectUtil.isNotEmpty(user)){
|
if (ObjectUtil.isNotEmpty(user)){
|
||||||
purchaseOrderNoDO.setUsername(user.getNickname());
|
purchaseOrderNoDO.setUsername(user.getNickname());
|
||||||
purchaseOrderNoDO.setUserMobile(user.getMobile());
|
purchaseOrderNoDO.setUserMobile(user.getMobile());
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.*;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
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.pojo.PageParam;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入/出库 Service 接口
|
* 入/出库 Service 接口
|
||||||
@ -78,4 +79,8 @@ public interface StorageService {
|
|||||||
CommonResult<Boolean> procurementAndStorage(StorageSaveReqVO createReqVO);
|
CommonResult<Boolean> procurementAndStorage(StorageSaveReqVO createReqVO);
|
||||||
|
|
||||||
StorageDO isPrint(Long id);
|
StorageDO isPrint(Long id);
|
||||||
|
|
||||||
|
Workbook exportExcelNew(String stockNo);
|
||||||
|
|
||||||
|
Workbook exportExcelOut(String stockNo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.material.MaterialDO;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.outsourcestock.OutsourceStockDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.outsourcestock.OutsourceStockDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.outsourcestockboom.OutsourceStockBoomDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.outsourcestockboom.OutsourceStockBoomDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.outsourcestockmaterial.OutsourceStockMaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.outsourcestockmaterial.OutsourceStockMaterialDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pn.PnDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseorder.PurchaseOrderDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.purchaseordernodetail.PurchaseOrderNoDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||||
@ -23,35 +24,50 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.storageinventory.StorageI
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.warehouse.WarehouseDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.composition.CompositionMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.composition.CompositionMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.master.MasterMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.master.MasterMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.outsourcestock.OutsourceStockMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.outsourcestock.OutsourceStockMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.outsourcestockboom.OutsourceStockBoomMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.outsourcestockboom.OutsourceStockBoomMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.outsourcestockmaterial.OutsourceStockMaterialMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.outsourcestockmaterial.OutsourceStockMaterialMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.pn.PnMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorder.PurchaseOrderMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseorder.PurchaseOrderMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.purchaseordernodetail.PurchaseOrderNoDetailMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageinventory.StorageInventoryMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storageinventory.StorageInventoryMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.warehouse.WarehouseMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.BusinesTypeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.master.MasterService;
|
import com.chanko.yunxi.mes.module.heli.service.master.MasterService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService;
|
import com.chanko.yunxi.mes.module.heli.service.storagelog.StorageLogService;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.warehouse.WarehouseServiceImpl;
|
||||||
|
import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
|
||||||
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||||
|
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
||||||
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
import com.chanko.yunxi.mes.module.system.service.user.AdminUserService;
|
||||||
|
import org.apache.poi.ss.usermodel.*;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
|
import org.springframework.data.redis.hash.ObjectHashMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.*;
|
import com.chanko.yunxi.mes.module.heli.controller.admin.storage.vo.*;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||||
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
|
||||||
@ -110,6 +126,12 @@ public class StorageServiceImpl implements StorageService {
|
|||||||
private AdminUserService adminUserService;
|
private AdminUserService adminUserService;
|
||||||
@Resource
|
@Resource
|
||||||
private StorageLogMapper storageLogMapper;
|
private StorageLogMapper storageLogMapper;
|
||||||
|
@Resource
|
||||||
|
private WarehouseMapper warehouseMapper;
|
||||||
|
@Resource
|
||||||
|
private DictDataMapper dictDataMapper;
|
||||||
|
@Resource
|
||||||
|
private PnMapper pnMapper;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private StorageLogService storageLogService;
|
private StorageLogService storageLogService;
|
||||||
@ -619,4 +641,329 @@ private StorageLogService storageLogService;
|
|||||||
return storageDO;
|
return storageDO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Workbook exportExcelNew(String stockNo) {
|
||||||
|
LambdaQueryWrapper<StorageDO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(StorageDO::getStockNo,stockNo);
|
||||||
|
wrapper.eq(StorageDO::getStockType,1);
|
||||||
|
StorageDO storageDO = storageMapper.selectOne(wrapper);
|
||||||
|
Workbook workbook = null;
|
||||||
|
if (ObjectUtil.isNotEmpty(storageDO)){
|
||||||
|
try {
|
||||||
|
LambdaQueryWrapper<StorageMatDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(StorageMatDO::getStockId,storageDO.getId());
|
||||||
|
List<StorageMatDO> storageMatDOS = storageMatMapper.selectList(queryWrapper);
|
||||||
|
//获取单位字典
|
||||||
|
HashMap<String, String> unitDictData = getUnitDictData();
|
||||||
|
InputStream inputStream = new FileInputStream("D:\\MES-HELI\\File\\入库单.xlsx");
|
||||||
|
workbook = new XSSFWorkbook(inputStream);
|
||||||
|
//第一个sheet
|
||||||
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
// 设置单元格样式(启用自动换行)
|
||||||
|
CellStyle style = workbook.createCellStyle();
|
||||||
|
style.setWrapText(true); // 关键:启用自动换行
|
||||||
|
// 设置水平和垂直居中
|
||||||
|
style.setAlignment(HorizontalAlignment.LEFT);
|
||||||
|
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
|
// 创建字体对象
|
||||||
|
Font font = workbook.createFont();
|
||||||
|
font.setFontName("宋体"); // 设置字体为宋体
|
||||||
|
font.setFontHeightInPoints((short) 11); // 设置字号为11磅
|
||||||
|
font.setBold(true); // 设置加粗
|
||||||
|
// 将字体应用到样式
|
||||||
|
style.setFont(font);
|
||||||
|
//第四行
|
||||||
|
Row row3 = sheet.getRow(3);
|
||||||
|
//流水号
|
||||||
|
Cell cellB4 = row3.createCell(1);
|
||||||
|
cellB4.setCellStyle(style);
|
||||||
|
cellB4.setCellValue(storageDO.getStockNo());
|
||||||
|
//业务日期
|
||||||
|
Cell cellE4 =row3.createCell(4);
|
||||||
|
cellE4.setCellStyle(style);
|
||||||
|
String formattedDate = storageDO.getCreateTime().format(formatter);
|
||||||
|
cellE4.setCellValue(formattedDate);
|
||||||
|
//仓库
|
||||||
|
Cell celH4 = row3.createCell(7);
|
||||||
|
celH4.setCellStyle(style);
|
||||||
|
LambdaQueryWrapper<WarehouseDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(WarehouseDO::getId,storageDO.getWhId());
|
||||||
|
lambdaQueryWrapper.eq(WarehouseDO::getWhStatus,1);
|
||||||
|
WarehouseDO warehouseDO = warehouseMapper.selectOne(lambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(warehouseDO)){
|
||||||
|
celH4.setCellValue(warehouseDO.getWhName());
|
||||||
|
}
|
||||||
|
//第六行
|
||||||
|
Row row5 = sheet.getRow(5);
|
||||||
|
Cell cellH6 = row5.createCell(7);
|
||||||
|
|
||||||
|
cellH6.setCellStyle(style);
|
||||||
|
cellH6.setCellValue(storageDO.getHeaderNo());
|
||||||
|
//第七行
|
||||||
|
Row row6 = sheet.getRow(6);
|
||||||
|
Cell cellH7 = row6.createCell(7);
|
||||||
|
cellH7.setCellStyle(style);
|
||||||
|
AdminUserDO user = adminUserService.getUser(Long.valueOf(storageDO.getCreator()));
|
||||||
|
if (ObjectUtil.isNotEmpty(user)){
|
||||||
|
cellH7.setCellValue(user.getNickname());
|
||||||
|
}
|
||||||
|
//第九行
|
||||||
|
Row row8 = sheet.getRow(8);
|
||||||
|
Cell cellH9 = row8.createCell(1);
|
||||||
|
cellH9.setCellStyle(style);
|
||||||
|
cellH9.setCellValue(storageDO.getDescription());
|
||||||
|
int rowIndex = 11;
|
||||||
|
Map<Long, MaterialDO> materialMap= new HashMap<>();
|
||||||
|
Map<Long, PnDO> PnDOMap = new HashMap<>();
|
||||||
|
//拿到入库明细所有物料id
|
||||||
|
List<Long> collect = storageMatDOS.stream().map(StorageMatDO::getMatId).collect(Collectors.toList());
|
||||||
|
if (ObjectUtil.isNotEmpty(collect)){
|
||||||
|
LambdaQueryWrapper<MaterialDO> doLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
doLambdaQueryWrapper.in(MaterialDO::getId,collect);
|
||||||
|
List<MaterialDO> materialDOList = materialMapper.selectList(doLambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(materialDOList)){
|
||||||
|
//将物料集合转换成Map
|
||||||
|
materialMap = materialDOList.stream().collect(Collectors.toMap(MaterialDO::getId, material -> material));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//拿到入库明细所有库位
|
||||||
|
List<Long> collect1 = storageMatDOS.stream().map(StorageMatDO::getPnId).collect(Collectors.toList());
|
||||||
|
if (ObjectUtil.isNotEmpty(collect1)){
|
||||||
|
LambdaQueryWrapper<PnDO> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper1.in(PnDO::getId,collect1);
|
||||||
|
List<PnDO> productLineDOList = pnMapper.selectList(lambdaQueryWrapper1);
|
||||||
|
if (ObjectUtil.isNotEmpty(productLineDOList)){
|
||||||
|
//将库位集合转换成Map
|
||||||
|
PnDOMap = productLineDOList.stream().collect(Collectors.toMap(PnDO::getId, pnDO -> pnDO));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int i = 0; i < storageMatDOS.size(); i++) {
|
||||||
|
Row newRow = sheet.createRow(rowIndex+i);
|
||||||
|
StorageMatDO storageMatDO = storageMatDOS.get(i);
|
||||||
|
MaterialDO materialDO = materialMap.get(storageMatDO.getMatId());
|
||||||
|
if (ObjectUtil.isNotEmpty(materialDO)){
|
||||||
|
//编码
|
||||||
|
Cell cellA = newRow.createCell(0);
|
||||||
|
cellA.setCellStyle(style);
|
||||||
|
cellA.setCellValue(materialDO.getCode());
|
||||||
|
//品名
|
||||||
|
Cell cellB = newRow.createCell(1);
|
||||||
|
cellB.setCellStyle(style);
|
||||||
|
cellB.setCellValue(materialDO.getName());
|
||||||
|
//规格
|
||||||
|
Cell cellC = newRow.createCell(2);
|
||||||
|
cellC.setCellStyle(style);
|
||||||
|
cellC.setCellValue(materialDO.getSpec());
|
||||||
|
//单位
|
||||||
|
Cell cellE = newRow.createCell(4);
|
||||||
|
cellE.setCellStyle(style);
|
||||||
|
cellE.setCellValue(ObjectUtil.isNotEmpty(unitDictData.get(materialDO.getUnit()))?unitDictData.get(materialDO.getUnit()):"");
|
||||||
|
}
|
||||||
|
//库位
|
||||||
|
Cell cellF = newRow.createCell(5);
|
||||||
|
cellF.setCellStyle(style);
|
||||||
|
cellF.setCellValue(ObjectUtil.isNotEmpty(PnDOMap.get(storageMatDO.getPnId()))?PnDOMap.get(storageMatDO.getPnId()).getPnName():"");
|
||||||
|
//数量/实收数量
|
||||||
|
Cell cellG = newRow.createCell(6);
|
||||||
|
cellG.setCellStyle(style);
|
||||||
|
cellG.setCellValue(String.valueOf(storageMatDO.getStorageOkQty()));
|
||||||
|
//单价
|
||||||
|
Cell cellH = newRow.createCell(7);
|
||||||
|
cellH.setCellStyle(style);
|
||||||
|
cellH.setCellValue(String.valueOf(storageMatDO.getPrice()));
|
||||||
|
//金额
|
||||||
|
Cell cellI = newRow.createCell(8);
|
||||||
|
cellI.setCellStyle(style);
|
||||||
|
BigDecimal money = storageMatDO.getStorageOkQty().multiply(storageMatDO.getPrice()).setScale(2, RoundingMode.HALF_UP); ;
|
||||||
|
cellI.setCellValue(String.valueOf(money));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return workbook;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Workbook exportExcelOut(String stockNo) {
|
||||||
|
LambdaQueryWrapper<StorageDO> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.eq(StorageDO::getStockNo,stockNo);
|
||||||
|
wrapper.eq(StorageDO::getStockType,2);
|
||||||
|
StorageDO storageDO = storageMapper.selectOne(wrapper);
|
||||||
|
Workbook workbook = null;
|
||||||
|
if (ObjectUtil.isNotEmpty(storageDO)){
|
||||||
|
try {
|
||||||
|
LambdaQueryWrapper<StorageMatDO> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(StorageMatDO::getStockId,storageDO.getId());
|
||||||
|
List<StorageMatDO> storageMatDOS = storageMatMapper.selectList(queryWrapper);
|
||||||
|
//获取单位字典
|
||||||
|
HashMap<String, String> unitDictData = getUnitDictData();
|
||||||
|
//获取领料车间
|
||||||
|
HashMap<String, String> pickcarDictData = getPickcarDictData();
|
||||||
|
InputStream inputStream = new FileInputStream("D:\\MES-HELI\\File\\出库单.xlsx");
|
||||||
|
workbook = new XSSFWorkbook(inputStream);
|
||||||
|
//第一个sheet
|
||||||
|
Sheet sheet = workbook.getSheetAt(0);
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
||||||
|
// 设置单元格样式(启用自动换行)
|
||||||
|
CellStyle style = workbook.createCellStyle();
|
||||||
|
style.setWrapText(true); // 关键:启用自动换行
|
||||||
|
// 设置水平和垂直居中
|
||||||
|
style.setAlignment(HorizontalAlignment.LEFT);
|
||||||
|
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||||
|
// 创建字体对象
|
||||||
|
Font font = workbook.createFont();
|
||||||
|
font.setFontName("宋体"); // 设置字体为宋体
|
||||||
|
font.setFontHeightInPoints((short) 11); // 设置字号为11磅
|
||||||
|
font.setBold(true); // 设置加粗
|
||||||
|
// 将字体应用到样式
|
||||||
|
style.setFont(font);
|
||||||
|
//第四行
|
||||||
|
Row row3 = sheet.getRow(3);
|
||||||
|
//单据号
|
||||||
|
Cell cellB4 = row3.createCell(1);
|
||||||
|
cellB4.setCellStyle(style);
|
||||||
|
cellB4.setCellValue(storageDO.getStockNo());
|
||||||
|
//业务日期
|
||||||
|
Cell cellE4 =row3.createCell(4);
|
||||||
|
cellE4.setCellStyle(style);
|
||||||
|
String formattedDate = storageDO.getCreateTime().format(formatter);
|
||||||
|
cellE4.setCellValue(formattedDate);
|
||||||
|
//仓库
|
||||||
|
Cell celH4 = row3.createCell(7);
|
||||||
|
celH4.setCellStyle(style);
|
||||||
|
LambdaQueryWrapper<WarehouseDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper.eq(WarehouseDO::getId,storageDO.getWhId());
|
||||||
|
lambdaQueryWrapper.eq(WarehouseDO::getWhStatus,1);
|
||||||
|
WarehouseDO warehouseDO = warehouseMapper.selectOne(lambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(warehouseDO)){
|
||||||
|
celH4.setCellValue(warehouseDO.getWhName());
|
||||||
|
}
|
||||||
|
//第五行
|
||||||
|
Row row5 = sheet.getRow(4);
|
||||||
|
Cell cellH5 = row5.createCell(7);
|
||||||
|
cellH5.setCellStyle(style);
|
||||||
|
AdminUserDO user = adminUserService.getUser(Long.valueOf(storageDO.getCreator()));
|
||||||
|
if (ObjectUtil.isNotEmpty(user)){
|
||||||
|
cellH5.setCellValue(user.getNickname());
|
||||||
|
}
|
||||||
|
//第七行
|
||||||
|
Row row7 = sheet.getRow(6);
|
||||||
|
Cell cellH9 = row7.createCell(1);
|
||||||
|
cellH9.setCellStyle(style);
|
||||||
|
cellH9.setCellValue(storageDO.getDescription());
|
||||||
|
|
||||||
|
Cell cellH7 = row7.createCell(7);
|
||||||
|
cellH7.setCellStyle(style);
|
||||||
|
cellH7.setCellValue(ObjectUtil.isNotEmpty(pickcarDictData.get(String.valueOf(storageDO.getPickcar())))?pickcarDictData.get(String.valueOf(storageDO.getPickcar())):"");
|
||||||
|
int rowIndex = 9;
|
||||||
|
Map<Long, MaterialDO> materialMap= new HashMap<>();
|
||||||
|
Map<Long, PnDO> PnDOMap = new HashMap<>();
|
||||||
|
//拿到出库明细所有物料id
|
||||||
|
List<Long> collect = storageMatDOS.stream().map(StorageMatDO::getMatId).collect(Collectors.toList());
|
||||||
|
if (ObjectUtil.isNotEmpty(collect)){
|
||||||
|
LambdaQueryWrapper<MaterialDO> doLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
doLambdaQueryWrapper.in(MaterialDO::getId,collect);
|
||||||
|
List<MaterialDO> materialDOList = materialMapper.selectList(doLambdaQueryWrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(materialDOList)){
|
||||||
|
//将物料集合转换成Map
|
||||||
|
materialMap = materialDOList.stream().collect(Collectors.toMap(MaterialDO::getId, material -> material));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//拿到出库明细所有库位
|
||||||
|
List<Long> collect1 = storageMatDOS.stream().map(StorageMatDO::getPnId).collect(Collectors.toList());
|
||||||
|
if (ObjectUtil.isNotEmpty(collect1)){
|
||||||
|
LambdaQueryWrapper<PnDO> lambdaQueryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
lambdaQueryWrapper1.in(PnDO::getId,collect1);
|
||||||
|
List<PnDO> productLineDOList = pnMapper.selectList(lambdaQueryWrapper1);
|
||||||
|
if (ObjectUtil.isNotEmpty(productLineDOList)){
|
||||||
|
//将库位集合转换成Map
|
||||||
|
PnDOMap = productLineDOList.stream().collect(Collectors.toMap(PnDO::getId, pnDO -> pnDO));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
BigDecimal sum=BigDecimal.ZERO;
|
||||||
|
for (int i = 0; i < storageMatDOS.size(); i++) {
|
||||||
|
Row newRow = sheet.createRow(rowIndex+i);
|
||||||
|
StorageMatDO storageMatDO = storageMatDOS.get(i);
|
||||||
|
MaterialDO materialDO = materialMap.get(storageMatDO.getMatId());
|
||||||
|
if (ObjectUtil.isNotEmpty(materialDO)){
|
||||||
|
//编码
|
||||||
|
Cell cellA = newRow.createCell(0);
|
||||||
|
cellA.setCellStyle(style);
|
||||||
|
cellA.setCellValue(materialDO.getCode());
|
||||||
|
//品名
|
||||||
|
Cell cellB = newRow.createCell(1);
|
||||||
|
cellB.setCellStyle(style);
|
||||||
|
cellB.setCellValue(materialDO.getName());
|
||||||
|
//规格
|
||||||
|
Cell cellC = newRow.createCell(2);
|
||||||
|
cellC.setCellStyle(style);
|
||||||
|
cellC.setCellValue(materialDO.getSpec());
|
||||||
|
//单位
|
||||||
|
Cell cellE = newRow.createCell(3);
|
||||||
|
cellE.setCellStyle(style);
|
||||||
|
cellE.setCellValue(ObjectUtil.isNotEmpty(unitDictData.get(materialDO.getUnit()))?unitDictData.get(materialDO.getUnit()):"");
|
||||||
|
}
|
||||||
|
//库位
|
||||||
|
Cell cellF = newRow.createCell(4);
|
||||||
|
cellF.setCellStyle(style);
|
||||||
|
cellF.setCellValue(ObjectUtil.isNotEmpty(PnDOMap.get(storageMatDO.getPnId()))?PnDOMap.get(storageMatDO.getPnId()).getPnName():"");
|
||||||
|
//数量/实收数量
|
||||||
|
Cell cellG = newRow.createCell(5);
|
||||||
|
cellG.setCellStyle(style);
|
||||||
|
cellG.setCellValue(String.valueOf(storageMatDO.getStorageOkQty()));
|
||||||
|
//单价
|
||||||
|
Cell cellH = newRow.createCell(6);
|
||||||
|
cellH.setCellStyle(style);
|
||||||
|
cellH.setCellValue(String.valueOf(storageMatDO.getPrice()));
|
||||||
|
//金额
|
||||||
|
Cell cellI = newRow.createCell(7);
|
||||||
|
cellI.setCellStyle(style);
|
||||||
|
BigDecimal money = storageMatDO.getStorageOkQty().multiply(storageMatDO.getPrice()).setScale(2, RoundingMode.HALF_UP);
|
||||||
|
sum = sum.add(money);
|
||||||
|
cellI.setCellValue(String.valueOf(money));
|
||||||
|
}
|
||||||
|
Row row = sheet.createRow(rowIndex+storageMatDOS.size());
|
||||||
|
//编码
|
||||||
|
Cell cellA = row.createCell(0);
|
||||||
|
cellA.setCellStyle(style);
|
||||||
|
cellA.setCellValue("合计");
|
||||||
|
//合计金额
|
||||||
|
Cell cellI = row.createCell(7);
|
||||||
|
cellI.setCellStyle(style);
|
||||||
|
cellI.setCellValue(String.valueOf(sum));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return workbook;
|
||||||
|
}
|
||||||
|
public HashMap<String,String> getUnitDictData(){
|
||||||
|
//获取单位字典
|
||||||
|
DictDataPageReqVO dictDataPageReqVO = new DictDataPageReqVO();
|
||||||
|
dictDataPageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
dictDataPageReqVO.setDictType("heli_material_unit");
|
||||||
|
PageResult<DictDataDO> dictDataDOPageResult = dictDataMapper.selectPage(dictDataPageReqVO);
|
||||||
|
List<DictDataDO> dictList = dictDataDOPageResult.getList();
|
||||||
|
HashMap<String,String> unitMap = new HashMap<>();
|
||||||
|
for (DictDataDO dictDataDO : dictList) {
|
||||||
|
unitMap.put(dictDataDO.getValue(),dictDataDO.getLabel());
|
||||||
|
}
|
||||||
|
return unitMap;
|
||||||
|
}
|
||||||
|
public HashMap<String,String> getPickcarDictData(){
|
||||||
|
//获取单位字典
|
||||||
|
DictDataPageReqVO dictDataPageReqVO = new DictDataPageReqVO();
|
||||||
|
dictDataPageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
dictDataPageReqVO.setDictType("pickcar");
|
||||||
|
PageResult<DictDataDO> dictDataDOPageResult = dictDataMapper.selectPage(dictDataPageReqVO);
|
||||||
|
List<DictDataDO> dictList = dictDataDOPageResult.getList();
|
||||||
|
HashMap<String,String> unitMap = new HashMap<>();
|
||||||
|
for (DictDataDO dictDataDO : dictList) {
|
||||||
|
unitMap.put(dictDataDO.getValue(),dictDataDO.getLabel());
|
||||||
|
}
|
||||||
|
return unitMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,15 +17,22 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.pn.PnDO;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.rg.RgDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.rg.RgDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storage.StorageDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelog.StorageLogDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.warehouse.WarehouseDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.warehouse.WarehouseDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.pn.PnMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.pn.PnMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.rg.RgMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.rg.RgMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storage.StorageMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagemat.StorageMatMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.warehouse.WarehouseMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.warehouse.WarehouseMapper;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.enums.CodeEnum;
|
||||||
import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService;
|
import com.chanko.yunxi.mes.module.heli.service.composition.CompositionService;
|
||||||
|
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||||
import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
|
import com.chanko.yunxi.mes.module.system.controller.admin.dict.vo.data.DictDataPageReqVO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
import com.chanko.yunxi.mes.module.system.dal.dataobject.dict.DictDataDO;
|
||||||
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
import com.chanko.yunxi.mes.module.system.dal.mysql.dict.DictDataMapper;
|
||||||
@ -38,6 +45,7 @@ import java.io.IOException;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.rmi.RemoteException;
|
import java.rmi.RemoteException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -52,6 +60,8 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.storageinventory.StorageInvent
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils.getLoginUser;
|
||||||
|
import static com.chanko.yunxi.mes.module.heli.enums.CodeEnum.STOCK_IN;
|
||||||
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
import static com.chanko.yunxi.mes.module.heli.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,6 +87,12 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
private MaterialMapper materialMapper;
|
private MaterialMapper materialMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private StorageLogMapper storageLogMapper;
|
private StorageLogMapper storageLogMapper;
|
||||||
|
@Resource
|
||||||
|
private SerialNumberService serialNumberService;
|
||||||
|
@Resource
|
||||||
|
private StorageMapper storageMapper;
|
||||||
|
@Resource
|
||||||
|
private StorageMatMapper storageMatMapper;
|
||||||
@Override
|
@Override
|
||||||
public Long createStorageInventory(StorageInventorySaveReqVO createReqVO) {
|
public Long createStorageInventory(StorageInventorySaveReqVO createReqVO) {
|
||||||
// 插入
|
// 插入
|
||||||
@ -160,6 +176,14 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
}
|
}
|
||||||
// 读取Excel文件并转换为VO对象列表
|
// 读取Excel文件并转换为VO对象列表
|
||||||
List<StorageInventoryImportExcelVO> list = ExcelUtils.read(file, StorageInventoryImportExcelVO.class);
|
List<StorageInventoryImportExcelVO> list = ExcelUtils.read(file, StorageInventoryImportExcelVO.class);
|
||||||
|
boolean allSame = list.stream()
|
||||||
|
.map(StorageInventoryImportExcelVO::getWhName) // 获取 whName
|
||||||
|
.filter(Objects::nonNull) // 过滤掉 null 值
|
||||||
|
.distinct() // 去重
|
||||||
|
.count() <= 1;
|
||||||
|
if (!allSame) {
|
||||||
|
throw new RuntimeException("必须导入同一个仓库的库存数据");
|
||||||
|
}
|
||||||
List<String> errorMessages = new ArrayList<>();
|
List<String> errorMessages = new ArrayList<>();
|
||||||
List<String> errorMessages1 = new ArrayList<>();
|
List<String> errorMessages1 = new ArrayList<>();
|
||||||
List<String> errorMessages2 = new ArrayList<>();
|
List<String> errorMessages2 = new ArrayList<>();
|
||||||
@ -175,15 +199,31 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
HashMap<String, String> TypeDictData = getTypeDictData();
|
HashMap<String, String> TypeDictData = getTypeDictData();
|
||||||
HashMap<String, String> OriginalDictData = getOriginalDictData();
|
HashMap<String, String> OriginalDictData = getOriginalDictData();
|
||||||
List<StorageInventoryDO> storageInventoryDOS = new ArrayList<>();
|
List<StorageInventoryDO> storageInventoryDOS = new ArrayList<>();
|
||||||
|
List<StorageMatDO> storageMatDOS = new ArrayList<>();
|
||||||
List<StorageInventoryImportExcelVO> dataList = new ArrayList<>();
|
List<StorageInventoryImportExcelVO> dataList = new ArrayList<>();
|
||||||
// 新增:重复组合追踪器
|
// 新增:重复组合追踪器
|
||||||
Map<String,String> duplicateTracker = new HashMap<>();
|
Map<String,String> duplicateTracker = new HashMap<>();
|
||||||
List<StorageLogDO> logs = new ArrayList<>();
|
List<StorageLogDO> logs = new ArrayList<>();
|
||||||
|
StorageDO storageDO = new StorageDO();
|
||||||
|
storageDO.setStockType(1);
|
||||||
|
storageDO.setStockInType(6);
|
||||||
|
storageDO.setStockMode(26);
|
||||||
|
// 月度流水号
|
||||||
|
SerialNumberDO serialNumberDO1 = serialNumberService.getSerialNumber(STOCK_IN.name(), new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
||||||
|
serialNumberDO1.setSerialNumber(serialNumberDO1.getSerialNumber()+1);
|
||||||
|
// 入库前缀
|
||||||
|
storageDO.setStockNo(STOCK_IN.getCode(serialNumberDO1.getSerialNumber().toString()));
|
||||||
|
serialNumberService.updateSerialNumber(serialNumberDO1);
|
||||||
|
storageDO.setStatus(2);
|
||||||
|
storageDO.setKeeper(getLoginUser().getId());
|
||||||
|
storageDO.setKeeperTime(LocalDateTime.now());
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
StorageInventoryDO storageInventoryDO = new StorageInventoryDO();
|
StorageInventoryDO storageInventoryDO = new StorageInventoryDO();
|
||||||
|
StorageMatDO storageMatDO = new StorageMatDO();
|
||||||
StorageLogDO logDO = new StorageLogDO();
|
StorageLogDO logDO = new StorageLogDO();
|
||||||
logDO.setStockType(1);
|
logDO.setStockType(1);
|
||||||
logDO.setGoodsType(1);
|
logDO.setGoodsType(1);
|
||||||
|
logDO.setStockMode(26);
|
||||||
StorageInventoryImportExcelVO vo = list.get(i);
|
StorageInventoryImportExcelVO vo = list.get(i);
|
||||||
String code = null;
|
String code = null;
|
||||||
Long whId = null;
|
Long whId = null;
|
||||||
@ -195,6 +235,7 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
} else {
|
} else {
|
||||||
storageInventoryDO.setYardAmount(new BigDecimal(vo.getYardAmount()));
|
storageInventoryDO.setYardAmount(new BigDecimal(vo.getYardAmount()));
|
||||||
logDO.setStorageOkQty(new BigDecimal(vo.getYardAmount()));
|
logDO.setStorageOkQty(new BigDecimal(vo.getYardAmount()));
|
||||||
|
storageMatDO.setStorageOkQty(new BigDecimal(vo.getYardAmount()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isNotEmpty(vo.getPrice())) {
|
if (ObjectUtil.isNotEmpty(vo.getPrice())) {
|
||||||
@ -202,6 +243,7 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
errorMessages1.add("第" + (i + 1) + "行平均单价必须是数字");
|
errorMessages1.add("第" + (i + 1) + "行平均单价必须是数字");
|
||||||
} else {
|
} else {
|
||||||
storageInventoryDO.setPrice(new BigDecimal(vo.getPrice()).setScale(2, RoundingMode.HALF_UP));
|
storageInventoryDO.setPrice(new BigDecimal(vo.getPrice()).setScale(2, RoundingMode.HALF_UP));
|
||||||
|
storageMatDO.setPrice(new BigDecimal(vo.getPrice()).setScale(2, RoundingMode.HALF_UP));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ObjectUtil.isEmpty(vo.getCode())) {
|
if (ObjectUtil.isEmpty(vo.getCode())) {
|
||||||
@ -219,6 +261,7 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
dataList.add(vo);
|
dataList.add(vo);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
storageMatDO.setMatId(materialDO.getId());
|
||||||
storageInventoryDO.setMaterialId(materialDO.getId());
|
storageInventoryDO.setMaterialId(materialDO.getId());
|
||||||
logDO.setMatId(materialDO.getId());
|
logDO.setMatId(materialDO.getId());
|
||||||
storageInventoryDO.setBoomCode(vo.getCode());
|
storageInventoryDO.setBoomCode(vo.getCode());
|
||||||
@ -263,7 +306,9 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
if (ObjectUtil.isEmpty(warehouseDO)) {
|
if (ObjectUtil.isEmpty(warehouseDO)) {
|
||||||
errorMessages7.add("第" + (i + 1) + "行仓库" + vo.getWhName() + "不存在或未启用,请确认");
|
errorMessages7.add("第" + (i + 1) + "行仓库" + vo.getWhName() + "不存在或未启用,请确认");
|
||||||
} else {
|
} else {
|
||||||
|
storageMatDO.setWhId(warehouseDO.getId());
|
||||||
logDO.setWhId(warehouseDO.getId());
|
logDO.setWhId(warehouseDO.getId());
|
||||||
|
storageDO.setWhId(warehouseDO.getId());
|
||||||
whId = warehouseDO.getId();
|
whId = warehouseDO.getId();
|
||||||
storageInventoryDO.setWhId(warehouseDO.getId());
|
storageInventoryDO.setWhId(warehouseDO.getId());
|
||||||
}
|
}
|
||||||
@ -283,6 +328,7 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
logDO.setRgId(rgDO.getId());
|
logDO.setRgId(rgDO.getId());
|
||||||
rgId = rgDO.getId();
|
rgId = rgDO.getId();
|
||||||
storageInventoryDO.setRgId(rgDO.getId());
|
storageInventoryDO.setRgId(rgDO.getId());
|
||||||
|
storageMatDO.setRgId(rgDO.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -303,6 +349,7 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
logDO.setPnId(pnDO.getId());
|
logDO.setPnId(pnDO.getId());
|
||||||
pnId = pnDO.getId();
|
pnId = pnDO.getId();
|
||||||
storageInventoryDO.setPnId(pnDO.getId());
|
storageInventoryDO.setPnId(pnDO.getId());
|
||||||
|
storageMatDO.setPnId(pnDO.getId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -332,6 +379,7 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
} else {
|
} else {
|
||||||
duplicateTracker.put(compositeKey, vo.getCode());
|
duplicateTracker.put(compositeKey, vo.getCode());
|
||||||
}
|
}
|
||||||
|
storageMatDOS.add(storageMatDO);
|
||||||
storageInventoryDOS.add(storageInventoryDO);
|
storageInventoryDOS.add(storageInventoryDO);
|
||||||
logs.add(logDO);
|
logs.add(logDO);
|
||||||
}
|
}
|
||||||
@ -395,8 +443,21 @@ public class StorageInventoryServiceImpl implements StorageInventoryService {
|
|||||||
if (ObjectUtil.isNotEmpty(dataList)) {
|
if (ObjectUtil.isNotEmpty(dataList)) {
|
||||||
return CommonResult.success(dataList);
|
return CommonResult.success(dataList);
|
||||||
}
|
}
|
||||||
|
storageMapper.insert(storageDO);
|
||||||
|
if (ObjectUtil.isNotEmpty(storageMatDOS)){
|
||||||
|
storageMatDOS.forEach(storageMatDO -> {
|
||||||
|
storageMatDO.setStockId(storageDO.getId());
|
||||||
|
});
|
||||||
|
storageMatMapper.insertBatch(storageMatDOS);
|
||||||
|
}
|
||||||
storageInventoryMapper.insertBatch(storageInventoryDOS);
|
storageInventoryMapper.insertBatch(storageInventoryDOS);
|
||||||
storageLogMapper.insertBatch(logs);
|
if (ObjectUtil.isNotEmpty(logs)){
|
||||||
|
logs.forEach(logDO -> {
|
||||||
|
logDO.setStockId(storageDO.getId());
|
||||||
|
logDO.setCodeNo(storageDO.getStockNo());
|
||||||
|
});
|
||||||
|
storageLogMapper.insertBatch(logs);
|
||||||
|
}
|
||||||
return CommonResult.success(null);
|
return CommonResult.success(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageLogNowDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagelogNow.StorageMaterialDO;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
import com.chanko.yunxi.mes.module.heli.dal.dataobject.storagemat.StorageMatDO;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 入/出库日志 Service 接口
|
* 入/出库日志 Service 接口
|
||||||
@ -76,4 +77,6 @@ public interface StorageLogService {
|
|||||||
void updatePrice(StorageLogSaveReqVO updateReqVO);
|
void updatePrice(StorageLogSaveReqVO updateReqVO);
|
||||||
|
|
||||||
PageResult<StorageLogNowDO> getSupplementPage(StorageLogPageReqVO pageReqVO);
|
PageResult<StorageLogNowDO> getSupplementPage(StorageLogPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,9 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.material.MaterialMapper;
|
|||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogAllMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogAllMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageLogNowMapper;
|
||||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageMaterialMapper;
|
import com.chanko.yunxi.mes.module.heli.dal.mysql.storagelog.StorageMaterialMapper;
|
||||||
|
import org.apache.poi.ss.usermodel.Sheet;
|
||||||
|
import org.apache.poi.ss.usermodel.Workbook;
|
||||||
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
@ -20,6 +23,8 @@ import org.springframework.util.ObjectUtils;
|
|||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -219,4 +224,6 @@ public class StorageLogServiceImpl implements StorageLogService {
|
|||||||
public PageResult<StorageLogNowDO> getSupplementPage(StorageLogPageReqVO pageReqVO) {
|
public PageResult<StorageLogNowDO> getSupplementPage(StorageLogPageReqVO pageReqVO) {
|
||||||
return storageLogNowMapper.getSupplementPage(pageReqVO); }
|
return storageLogNowMapper.getSupplementPage(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.deliverorderlog.DeliverOrderLogMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@ -72,3 +72,9 @@ export const getSearchRlTsS = async (startDateTime: string ) => {
|
|||||||
export const getSearchRlT = async (data) => {
|
export const getSearchRlT = async (data) => {
|
||||||
return await request.post({ url: `/heli/plan-sub-detail/getSearchRlT`, data })
|
return await request.post({ url: `/heli/plan-sub-detail/getSearchRlT`, data })
|
||||||
}
|
}
|
||||||
|
export const Intersection = async (data: PlanSubDetailVO) => {
|
||||||
|
return await request.post({ url: `/heli/plan-sub-detail/Intersection`, data })
|
||||||
|
}
|
||||||
|
export const overlap = async (data: PlanSubDetailVO) => {
|
||||||
|
return await request.post({ url: `/heli/plan-sub-detail/overlap`, data })
|
||||||
|
}
|
||||||
|
|||||||
@ -110,7 +110,8 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="收货人姓名" prop="receivePersonName">
|
<el-form-item label="收货人姓名" prop="receivePersonName">
|
||||||
<el-select :disabled="detailDisabled" v-model="formData.receivePersonName" filterable allow-create clearable @change="receiveOnChange" @blur="e => { if(e.target.value) formData.receivePersonName = e.target.value;}">
|
<el-select :disabled="detailDisabled" v-model="formData.receivePersonName" allow-create clearable @focus="initCustomerInfo" @change="receiveOnChange"
|
||||||
|
@blur="e => { if(e.target.value) formData.receivePersonName = e.target.value;}">
|
||||||
<el-option v-for="dict in receivePersonOptions" :key="dict.name" :label="dict.name" :value="dict.name" />
|
<el-option v-for="dict in receivePersonOptions" :key="dict.name" :label="dict.name" :value="dict.name" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -122,7 +123,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="收货详细地址" prop="receiveAddress">
|
<el-form-item label="收货详细地址" prop="receiveAddress">
|
||||||
<el-select v-model="formData.receiveAddress" filterable allow-create :disabled="detailDisabled" @blur="e => { if(e.target.value) formData.receiveAddress = e.target.value;}" clearable style="width: 100%;margin-right: 1.5%">
|
<el-select v-model="formData.receiveAddress" allow-create @focus="initCustomerInfo" :disabled="detailDisabled" @blur="e => { if(e.target.value) formData.receiveAddress = e.target.value;}" clearable style="width: 100%;margin-right: 1.5%">
|
||||||
<el-option v-for="dict in receivePersonAddressOptions" :key="dict.address" :label="dict.address" :value="dict.address" />
|
<el-option v-for="dict in receivePersonAddressOptions" :key="dict.address" :label="dict.address" :value="dict.address" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -164,7 +165,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="运费成本(元)" prop="transportFreightCost">
|
<el-form-item label="运费成本(元)" prop="transportFreightCost">
|
||||||
<el-input :disabled="detailDisabled" v-model="formData.transportFreightCost" @blur="yunFei()" class="!w-250px" />
|
<el-input :disabled="detailDisabled" v-model="formData.transportFreightCost" @change="yunFei()" class="!w-250px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -218,7 +219,7 @@
|
|||||||
<template #header> <span class="hl-table_header">*</span>重量(T)</template>
|
<template #header> <span class="hl-table_header">*</span>重量(T)</template>
|
||||||
<template #default="{ row, $index }">
|
<template #default="{ row, $index }">
|
||||||
<el-form-item :prop="`${$index}.weight`" :rules="subFormRules.weight" class="mb-0px!">
|
<el-form-item :prop="`${$index}.weight`" :rules="subFormRules.weight" class="mb-0px!">
|
||||||
<el-input :disabled="detailDisabled || formData.deliverStatus == 2" v-model="row.weight" @blur="yunFei()" placeholder="请输入重量(T)" />
|
<el-input :disabled="detailDisabled || formData.deliverStatus == 2" v-model="row.weight" @change="zhongliang()" placeholder="请输入重量(T)" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -543,11 +544,11 @@ const otherSubFormRef = ref()
|
|||||||
//
|
//
|
||||||
// return sum + weight;
|
// return sum + weight;
|
||||||
// }, 0);
|
// }, 0);
|
||||||
let totalWeight = 0;
|
// let totalWeight = 0;
|
||||||
for (let i = 0; i < formData.value.deliverOrderSubs.length; i++) {
|
// for (let i = 0; i < formData.value.deliverOrderSubs.length; i++) {
|
||||||
totalWeight += Number(formData.value.deliverOrderSubs[i].weight) || 0;
|
// totalWeight += Number(formData.value.deliverOrderSubs[i].weight) || 0;
|
||||||
}
|
// }
|
||||||
formData.value.transportWeight=parseFloat(totalWeight.toPrecision(12))
|
// formData.value.transportWeight=parseFloat(totalWeight.toPrecision(12))
|
||||||
|
|
||||||
if (formData.value.transportFreightCost && formData.value.transportFreightCost > 0) {
|
if (formData.value.transportFreightCost && formData.value.transportFreightCost > 0) {
|
||||||
//先将有重量和无重量的进行拆分
|
//先将有重量和无重量的进行拆分
|
||||||
@ -580,6 +581,51 @@ const otherSubFormRef = ref()
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const zhongliang = (event) => {
|
||||||
|
|
||||||
|
// const totalWeight = formData.value.deliverOrderSubs.reduce((sum, item) => {
|
||||||
|
// const weight = item.weight != null ? Number(item.weight) : 0;
|
||||||
|
//
|
||||||
|
// return sum + weight;
|
||||||
|
// }, 0);
|
||||||
|
let totalWeight = 0;
|
||||||
|
for (let i = 0; i < formData.value.deliverOrderSubs.length; i++) {
|
||||||
|
totalWeight += Number(formData.value.deliverOrderSubs[i].weight) || 0;
|
||||||
|
}
|
||||||
|
formData.value.transportWeight=parseFloat(totalWeight.toPrecision(12))
|
||||||
|
|
||||||
|
if (formData.value.transportFreightCost && formData.value.transportFreightCost > 0) {
|
||||||
|
//先将有重量和无重量的进行拆分
|
||||||
|
let numOne = 0
|
||||||
|
let numWeight = 0;
|
||||||
|
let numTwo = 0
|
||||||
|
for(var a=0;a<formData.value.deliverOrderSubs.length;a++){
|
||||||
|
if(formData.value.deliverOrderSubs[a].weight>0&&formData.value.deliverOrderSubs[a].weight){
|
||||||
|
numOne = numOne+1
|
||||||
|
numWeight = numWeight+Number(formData.value.deliverOrderSubs[a].weight)
|
||||||
|
}else{
|
||||||
|
numTwo = numTwo+1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(numTwo>0){
|
||||||
|
//大于0的情况下平摊运费
|
||||||
|
pingt();
|
||||||
|
}else{
|
||||||
|
//否则按照重量平摊
|
||||||
|
weight(numWeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
}else{
|
||||||
|
for(var a=0;a<formData.value.deliverOrderSubs.length;a++){
|
||||||
|
|
||||||
|
formData.value.deliverOrderSubs[a].yunFei = undefined
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
//平摊运费
|
//平摊运费
|
||||||
const pingt = () => {
|
const pingt = () => {
|
||||||
let sumMoney = new Big(0);
|
let sumMoney = new Big(0);
|
||||||
@ -996,6 +1042,8 @@ const queryData = async (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const initCustomerInfo = async () => {
|
const initCustomerInfo = async () => {
|
||||||
|
receivePersonOptions.value=[]
|
||||||
|
receivePersonAddressOptions.value=[]
|
||||||
// 收货人信息
|
// 收货人信息
|
||||||
const customer = await getCustomer(formData.value.customerId)
|
const customer = await getCustomer(formData.value.customerId)
|
||||||
if (customer.contact1Name) {
|
if (customer.contact1Name) {
|
||||||
|
|||||||
@ -167,11 +167,18 @@
|
|||||||
{{ scope.row.isAdd == 1 ? '是' : '否' }}
|
{{ scope.row.isAdd == 1 ? '是' : '否' }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" min-width="190">
|
<el-table-column label="是否重叠" align="center" prop="isOverLab" min-width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.isOverLab == 'Y' ? '是' : '否' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" fixed="right" min-width="220">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="addItemRow(scope.row)"> 新增 </el-button>
|
<el-button link type="primary" @click="addItemRow(scope.row)"> 新增 </el-button>
|
||||||
<el-button link type="success" @click="modification(scope.row)"> 修改 </el-button>
|
<el-button link type="success" @click="modification(scope.row)"> 修改 </el-button>
|
||||||
<el-button link @click="handleDelete(scope.row)" type="danger"> 删除 </el-button>
|
<el-button link @click="handleDelete(scope.row)" type="danger"> 删除 </el-button>
|
||||||
|
<el-button link type="primary" @click="overlap(scope.row)" v-if="scope.row.isAdd==1"> 重叠 </el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -571,11 +578,12 @@ const saveForm = async () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
for (var i = 0; i < list.value.length; i++) {
|
for (var i = 0; i < list.value.length; i++) {
|
||||||
var item = list.value[i]
|
var item = list.value[i]
|
||||||
if (item.isOverProcess) {
|
// if (item.isOverProcess) {
|
||||||
item.isOverProcess = 1
|
// item.isOverProcess = 1
|
||||||
} else {
|
// } else {
|
||||||
item.isOverProcess = 0
|
// item.isOverProcess = 0
|
||||||
}
|
// }
|
||||||
|
item.isOverProcess = (item.isOverProcess === true || item.isOverProcess === 1 || item.isOverProcess === '1' || item.isOverProcess === 'true') ? 1 : 0;
|
||||||
if (!item.id) {
|
if (!item.id) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
var type =
|
var type =
|
||||||
@ -634,6 +642,7 @@ const getList = async () => {
|
|||||||
}
|
}
|
||||||
// 添加弹窗相关变量
|
// 添加弹窗相关变量
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
|
const id = ref(null)
|
||||||
const dialogTitle = ref('插活前')
|
const dialogTitle = ref('插活前')
|
||||||
const currentRow = ref(null)
|
const currentRow = ref(null)
|
||||||
const insertList = ref([])
|
const insertList = ref([])
|
||||||
@ -647,35 +656,115 @@ const modification = async (row) => {
|
|||||||
message.error('负责人不能为空')
|
message.error('负责人不能为空')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
beforeList.value = []
|
if (row.isOverLab=='Y'){
|
||||||
var data = row as unknown as PlansubdetailApi.PlanSubDetailVO
|
ElMessageBox.confirm("当前数据为重叠数据,请确认是否修改", '提示', {
|
||||||
const res = await PlansubdetailApi.modificationPlanSubDetail(data)
|
confirmButtonText: '是',
|
||||||
if (res.list) {
|
cancelButtonText: '否',
|
||||||
//弹框
|
type: 'warning'
|
||||||
currentRow.value = row
|
|
||||||
res.list.forEach(item =>{
|
|
||||||
beforeList.value.push(item)
|
|
||||||
})
|
})
|
||||||
insertList.value = res.list
|
.then( async () => {
|
||||||
dialogVisible.value = true
|
beforeList.value = []
|
||||||
dialogTitle.value = '插活前'
|
var data = row as unknown as PlansubdetailApi.PlanSubDetailVO
|
||||||
} else {
|
const res = await PlansubdetailApi.modificationPlanSubDetail(data)
|
||||||
getList()
|
if (res.list) {
|
||||||
message.success('修改成功')
|
//弹框
|
||||||
|
currentRow.value = row
|
||||||
|
res.list.forEach(item =>{
|
||||||
|
beforeList.value.push(item)
|
||||||
|
})
|
||||||
|
insertList.value = res.list
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = '插活前'
|
||||||
|
} else {
|
||||||
|
getList()
|
||||||
|
message.success('修改成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 用户点击否,不做任何操作
|
||||||
|
})
|
||||||
|
}else {
|
||||||
|
beforeList.value = []
|
||||||
|
var data = row as unknown as PlansubdetailApi.PlanSubDetailVO
|
||||||
|
const res = await PlansubdetailApi.modificationPlanSubDetail(data)
|
||||||
|
if (res.list) {
|
||||||
|
//弹框
|
||||||
|
currentRow.value = row
|
||||||
|
res.list.forEach(item =>{
|
||||||
|
beforeList.value.push(item)
|
||||||
|
})
|
||||||
|
insertList.value = res.list
|
||||||
|
dialogVisible.value = true
|
||||||
|
dialogTitle.value = '插活前'
|
||||||
|
} else {
|
||||||
|
getList()
|
||||||
|
message.success('修改成功')
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
const overlap = async (row) => {
|
||||||
|
if (row.isAdd!=1){
|
||||||
|
message.error('必须是新增的任务,才可以操作重叠,请确认!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (row.subType==null|| row.subType==''){
|
||||||
|
message.error('设计类型不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (row.twoDimOwner==null|| row.twoDimOwner==''){
|
||||||
|
message.error('负责人不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (row.startTwoDimDate==null|| row.startTwoDimDate==''){
|
||||||
|
message.error('开始日期不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (row.twoDimDate==null|| row.twoDimDate==''){
|
||||||
|
message.error('结束日期不能为空')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
var data = row as unknown as PlansubdetailApi.PlanSubDetailVO
|
||||||
|
const res = await PlansubdetailApi.Intersection(data)
|
||||||
|
let messagees='';
|
||||||
|
console.log(res)
|
||||||
|
var userNickname = getUserNickname(row.twoDimOwner);
|
||||||
|
if (res){
|
||||||
|
messagees="当前负责人"+userNickname+"任务时间存在交集,是否重叠!"
|
||||||
|
}else {
|
||||||
|
messagees="当前负责人"+userNickname+"任务时间不存在交集,是否重叠!"
|
||||||
|
}
|
||||||
|
ElMessageBox.confirm(messagees, '提示', {
|
||||||
|
confirmButtonText: '是',
|
||||||
|
cancelButtonText: '否',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then( async () => {
|
||||||
|
var newVar = await PlansubdetailApi.overlap(data);
|
||||||
|
if (newVar){
|
||||||
|
getList()
|
||||||
|
message.success('重叠成功')
|
||||||
|
}else{
|
||||||
|
message.error('重叠失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
// 用户点击否,不做任何操作
|
||||||
|
})
|
||||||
|
}
|
||||||
// 新增行方法
|
// 新增行方法
|
||||||
const addItemRow = (row) => {
|
const addItemRow = (row) => {
|
||||||
if (row.id) {
|
if (row.id) {
|
||||||
for (var i = 0; i < list.value.length; i++) {
|
for (var i = 0; i < list.value.length; i++) {
|
||||||
var item = list.value[i]
|
var item = list.value[i]
|
||||||
if (item.isOverProcess) {
|
// if (item.isOverProcess) {
|
||||||
item.isOverProcess = 1
|
// item.isOverProcess = 1
|
||||||
} else {
|
// } else {
|
||||||
item.isOverProcess = 0
|
// item.isOverProcess = 0
|
||||||
}
|
// }
|
||||||
if (!item.id) {
|
item.isOverProcess = (item.isOverProcess === true || item.isOverProcess === 1 || item.isOverProcess === '1' || item.isOverProcess === 'true') ? 1 : 0;
|
||||||
|
|
||||||
|
if (!item.id) {
|
||||||
|
|
||||||
var type =
|
var type =
|
||||||
'BLUEPRINT_WORKBLANK' == item.subType
|
'BLUEPRINT_WORKBLANK' == item.subType
|
||||||
@ -748,18 +837,21 @@ const handleInsert = async () => {
|
|||||||
// 这里可以添加插活后的逻辑
|
// 这里可以添加插活后的逻辑
|
||||||
if (currentRow.value) {
|
if (currentRow.value) {
|
||||||
const newRow = { ...currentRow.value }
|
const newRow = { ...currentRow.value }
|
||||||
|
id.value=newRow.id;
|
||||||
newRow.id = null // 设置id为空
|
newRow.id = null // 设置id为空
|
||||||
insertList.value.push(newRow)
|
insertList.value.push(newRow)
|
||||||
insertList.value.forEach((item) => {
|
insertList.value.forEach((item) => {
|
||||||
if (item.isOverProcess) {
|
// if (item.isOverProcess) {
|
||||||
item.isOverProcess = 1
|
// item.isOverProcess = 1
|
||||||
} else {
|
// } else {
|
||||||
item.isOverProcess = 0
|
// item.isOverProcess = 0
|
||||||
}
|
// }
|
||||||
|
item.isOverProcess = (item.isOverProcess === true || item.isOverProcess === 1 || item.isOverProcess === '1' || item.isOverProcess === 'true') ? 1 : 0;
|
||||||
|
|
||||||
})
|
})
|
||||||
try {
|
try {
|
||||||
const updateReqVO = {
|
const updateReqVO = {
|
||||||
list: insertList.value
|
list: insertList.value,
|
||||||
}
|
}
|
||||||
// 调用后端接口
|
// 调用后端接口
|
||||||
const res = await PlansubdetailApi.chahuoPlanSubDetail(updateReqVO)
|
const res = await PlansubdetailApi.chahuoPlanSubDetail(updateReqVO)
|
||||||
@ -784,7 +876,8 @@ const handleConfirm = async () => {
|
|||||||
try {
|
try {
|
||||||
loading2.value = true
|
loading2.value = true
|
||||||
const updateReqVO = {
|
const updateReqVO = {
|
||||||
list: insertList.value
|
list: insertList.value,
|
||||||
|
id:id.value
|
||||||
}
|
}
|
||||||
// 调用后端接口
|
// 调用后端接口
|
||||||
const res = await PlansubdetailApi.savechahuoPlanSubDetail(updateReqVO)
|
const res = await PlansubdetailApi.savechahuoPlanSubDetail(updateReqVO)
|
||||||
|
|||||||
@ -85,15 +85,17 @@
|
|||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" border>
|
||||||
|
<el-table-column
|
||||||
|
label="启动日期"
|
||||||
|
align="center"
|
||||||
|
prop="projectStartTime"
|
||||||
|
:formatter="dateFormatter1"
|
||||||
|
width="250px"
|
||||||
|
/>
|
||||||
|
<el-table-column label="项目编号" align="center" prop="code" width="200px"/>
|
||||||
|
<el-table-column label="合同编码" align="center" prop="contractNo" width="200px"/>
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" width="180"/>
|
<el-table-column label="项目名称" align="center" prop="projectName" width="180"/>
|
||||||
<!-- <el-table-column-->
|
|
||||||
<!-- label="生成日期"-->
|
|
||||||
<!-- align="center"-->
|
|
||||||
<!-- prop="cgTime"-->
|
|
||||||
<!-- :formatter="dateFormatter"-->
|
|
||||||
<!-- width="250px"-->
|
|
||||||
<!-- />-->
|
|
||||||
<el-table-column label="客户名称" align="center" prop="cgKhname" width="200px"/>
|
<el-table-column label="客户名称" align="center" prop="cgKhname" width="200px"/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="预计回款日期"
|
label="预计回款日期"
|
||||||
|
|||||||
@ -32,6 +32,12 @@
|
|||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PLAN_TASK_STATUS)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PLAN_TASK_STATUS)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<label style="display: inline-flex; align-items: center; margin-left: 20px;">
|
||||||
|
<el-checkbox class="large-checkbox" v-model="queryParams.flag" style="order: 2; margin-left: 10px;"/>
|
||||||
|
<span style="order: 1;">已发货项目显示</span>
|
||||||
|
</label>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item style="margin-left: 20px">
|
<el-form-item style="margin-left: 20px">
|
||||||
<el-button @click="handleQuery" type="primary">
|
<el-button @click="handleQuery" type="primary">
|
||||||
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
<Icon icon="ep:search" class="mr-5px" /> 搜索
|
||||||
@ -123,7 +129,8 @@ const queryParams = reactive({
|
|||||||
projectSubCode: undefined,
|
projectSubCode: undefined,
|
||||||
projectSubName: undefined,
|
projectSubName: undefined,
|
||||||
status: 1,
|
status: 1,
|
||||||
createTime: []
|
createTime: [],
|
||||||
|
flag:undefined,
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
const exportLoading = ref(false) // 导出的加载中
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
|
|||||||
@ -200,7 +200,7 @@ const open = async (bomCode, vals) => {
|
|||||||
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
printCodeName.value.map(async (item) => {
|
printCodeName.value.map(async (item) => {
|
||||||
const qrCodeData = await QRCode.toDataURL(item.name,{
|
const qrCodeData = await QRCode.toDataURL(item.code,{
|
||||||
errorCorrectionLevel: 'H'
|
errorCorrectionLevel: 'H'
|
||||||
})
|
})
|
||||||
const qrCodeElement = document.getElementById('qrCodeContainer1')
|
const qrCodeElement = document.getElementById('qrCodeContainer1')
|
||||||
|
|||||||
@ -45,14 +45,6 @@
|
|||||||
<el-button @click="resetQuery">
|
<el-button @click="resetQuery">
|
||||||
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
<Icon icon="ep:refresh" class="mr-5px" /> 重置
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
@click="handleExport"
|
|
||||||
:loading="exportLoading"
|
|
||||||
>
|
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
|
||||||
</el-button>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|||||||
1231
mes-ui/mes-ui-admin-vue3/src/views/heli/storage/StorageOutAudit.vue
Normal file
1231
mes-ui/mes-ui-admin-vue3/src/views/heli/storage/StorageOutAudit.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -1067,7 +1067,6 @@ const initStatus = async (status) => {
|
|||||||
ctrSave.value = false
|
ctrSave.value = false
|
||||||
ctrCancel.value = true
|
ctrCancel.value = true
|
||||||
ctrDelete.value = false
|
ctrDelete.value = false
|
||||||
|
|
||||||
btnSave.value = true
|
btnSave.value = true
|
||||||
btnCancel.value = false
|
btnCancel.value = false
|
||||||
break
|
break
|
||||||
@ -1108,7 +1107,6 @@ const initStatus = async (status) => {
|
|||||||
ctrDelete.value = true
|
ctrDelete.value = true
|
||||||
btnSave.value = false
|
btnSave.value = false
|
||||||
btnok.value=false
|
btnok.value=false
|
||||||
console.log('ss'+formData.value.status)
|
|
||||||
// if(formData.value.status == 4){
|
// if(formData.value.status == 4){
|
||||||
// btnCancel.value = true
|
// btnCancel.value = true
|
||||||
// }else{
|
// }else{
|
||||||
|
|||||||
@ -91,15 +91,14 @@
|
|||||||
<el-button type="primary" plain @click="openDetail('create')">
|
<el-button type="primary" plain @click="openDetail('create')">
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
:loading="exportLoading"
|
:loading="exportLoading"
|
||||||
v-hasPermi="['heli:storage:export']"
|
>
|
||||||
>
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
</el-button>
|
||||||
</el-button> -->
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
@ -109,13 +108,13 @@
|
|||||||
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true" class="hl-table">
|
<el-table v-loading="loading" :data="list" :show-overflow-tooltip="true" :stripe="true" class="hl-table">
|
||||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
<el-table-column type="index" width="100" fixed label="序号" align="center" />
|
<el-table-column type="index" width="100" fixed label="序号" align="center" />
|
||||||
<el-table-column label="入库单号" align="center" prop="stockNo" min-width="210" fixed >
|
<el-table-column label="入库单号" align="center" prop="stockNo" min-width="210" fixed />
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<el-button text type="primary" @click="openDetail('review',scope.row.id)">
|
<!-- <el-button text type="primary" @click="openDetail('review',scope.row.id)">-->
|
||||||
{{scope.row.stockNo}}
|
<!-- {{scope.row.stockNo}}-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="入库类型" align="center" prop="stockInType" min-width="120">
|
<el-table-column label="入库类型" align="center" prop="stockInType" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.HELI_STORAGE_IN_TYPE" :value="scope.row.stockInType" />
|
<dict-tag :type="DICT_TYPE.HELI_STORAGE_IN_TYPE" :value="scope.row.stockInType" />
|
||||||
@ -206,6 +205,8 @@ import * as StorageApi from '@/api/heli/storage'
|
|||||||
import * as WarehouseApi from '@/api/heli/warehouse'
|
import * as WarehouseApi from '@/api/heli/warehouse'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import routeParamsCache from '@/utils/routeParamsCache'
|
import routeParamsCache from '@/utils/routeParamsCache'
|
||||||
|
import axios from "axios";
|
||||||
|
import {getAccessToken, getTenantId} from "@/utils/auth";
|
||||||
defineOptions({ name: 'Storage' })
|
defineOptions({ name: 'Storage' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@ -267,7 +268,58 @@ const resetQuery = () => {
|
|||||||
queryFormRef.value.resetFields()
|
queryFormRef.value.resetFields()
|
||||||
handleQuery()
|
handleQuery()
|
||||||
}
|
}
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = async () => {
|
||||||
|
if (!queryParams.stockNo){
|
||||||
|
message.error("请输入入库单号")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 导出的二次确认
|
||||||
|
await message.exportConfirm()
|
||||||
|
// 发起导出
|
||||||
|
exportLoading.value = true
|
||||||
|
loading.value = true;
|
||||||
|
// 收集选中的ID
|
||||||
|
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||||
|
// 使用axios直接请求文件流
|
||||||
|
const response = await axios({
|
||||||
|
url: baseUrl+'/admin-api/heli/storage/export-excel-new',
|
||||||
|
method: 'get',
|
||||||
|
headers: { // 这里应该是headers而不是header
|
||||||
|
'tenant-id': getTenantId(),
|
||||||
|
'Authorization': getAccessToken()
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
stockNo: queryParams.stockNo ? queryParams.stockNo : undefined
|
||||||
|
},
|
||||||
|
responseType: 'blob' // 关键:指定响应类型为blob
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 创建下载链接
|
||||||
|
const url = window.URL.createObjectURL(new Blob([response.data]))
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', '入库单.xlsx') // 设置下载文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
|
||||||
|
// 清理
|
||||||
|
document.body.removeChild(link)
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('导出失败:', error)
|
||||||
|
message.error('导出失败,请重试')
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
exportLoading.value = false
|
||||||
|
// 清理选中的ID
|
||||||
|
queryParams.ids = []
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 添加/修改操作 */
|
/** 添加/修改操作 */
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
const openForm = (type: string, id?: number) => {
|
const openForm = (type: string, id?: number) => {
|
||||||
|
|||||||
@ -91,7 +91,7 @@
|
|||||||
<el-button type="primary" plain @click="openDetail('create')">
|
<el-button type="primary" plain @click="openDetail('create')">
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
plain
|
plain
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
@ -99,7 +99,7 @@
|
|||||||
v-hasPermi="['heli:storage:export']"
|
v-hasPermi="['heli:storage:export']"
|
||||||
>
|
>
|
||||||
<Icon icon="ep:download" class="mr-5px" /> 导出
|
<Icon icon="ep:download" class="mr-5px" /> 导出
|
||||||
</el-button> -->
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
@ -109,13 +109,13 @@
|
|||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" class="hl-table">
|
||||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||||
<el-table-column type="index" width="100" fixed label="序号" align="center" />
|
<el-table-column type="index" width="100" fixed label="序号" align="center" />
|
||||||
<el-table-column label="出库单号" align="center" prop="stockNo" fixed min-width="220" >
|
<el-table-column label="出库单号" align="center" prop="stockNo" fixed min-width="220"/> >
|
||||||
<template #default="scope">
|
<!-- <template #default="scope">-->
|
||||||
<el-button text type="primary" @click="openDetail('review',scope.row.id)">
|
<!-- <el-button text type="primary" @click="openDetail('review',scope.row.id)">-->
|
||||||
{{scope.row.stockNo}}
|
<!-- {{scope.row.stockNo}}-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
</el-table-column>
|
<!-- </el-table-column>-->
|
||||||
<el-table-column label="出库类型" align="center" prop="stockInType" min-width="120">
|
<el-table-column label="出库类型" align="center" prop="stockInType" min-width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :type="DICT_TYPE.HELI_STORAGE_OUT_TYPE" :value="scope.row.stockInType" />
|
<dict-tag :type="DICT_TYPE.HELI_STORAGE_OUT_TYPE" :value="scope.row.stockInType" />
|
||||||
@ -211,6 +211,8 @@ import * as StorageApi from '@/api/heli/storage'
|
|||||||
import * as WarehouseApi from '@/api/heli/warehouse'
|
import * as WarehouseApi from '@/api/heli/warehouse'
|
||||||
import * as UserApi from '@/api/system/user'
|
import * as UserApi from '@/api/system/user'
|
||||||
import routeParamsCache from '@/utils/routeParamsCache'
|
import routeParamsCache from '@/utils/routeParamsCache'
|
||||||
|
import {getAccessToken, getTenantId} from "@/utils/auth";
|
||||||
|
import axios from "axios";
|
||||||
defineOptions({ name: 'Storage' })
|
defineOptions({ name: 'Storage' })
|
||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
@ -282,7 +284,58 @@ const openForm = (type: string, id?: number) => {
|
|||||||
const openDetail = (active: string, id?: number) => {
|
const openDetail = (active: string, id?: number) => {
|
||||||
router.push({ path: '/inventory/storageoutdetail', query: { type: active, id: id } })
|
router.push({ path: '/inventory/storageoutdetail', query: { type: active, id: id } })
|
||||||
}
|
}
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
const handleExport = async () => {
|
||||||
|
if (!queryParams.stockNo){
|
||||||
|
message.error("请输入出库单号")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 导出的二次确认
|
||||||
|
await message.exportConfirm()
|
||||||
|
// 发起导出
|
||||||
|
exportLoading.value = true
|
||||||
|
loading.value = true;
|
||||||
|
// 收集选中的ID
|
||||||
|
const baseUrl = import.meta.env.VITE_BASE_URL;
|
||||||
|
// 使用axios直接请求文件流
|
||||||
|
const response = await axios({
|
||||||
|
url: baseUrl+'/admin-api/heli/storage/export-excel-out',
|
||||||
|
method: 'get',
|
||||||
|
headers: { // 这里应该是headers而不是header
|
||||||
|
'tenant-id': getTenantId(),
|
||||||
|
'Authorization': getAccessToken()
|
||||||
|
},
|
||||||
|
params: {
|
||||||
|
stockNo: queryParams.stockNo ? queryParams.stockNo : undefined
|
||||||
|
},
|
||||||
|
responseType: 'blob' // 关键:指定响应类型为blob
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 创建下载链接
|
||||||
|
const url = window.URL.createObjectURL(new Blob([response.data]))
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.setAttribute('download', '出库单.xlsx') // 设置下载文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
|
||||||
|
// 清理
|
||||||
|
document.body.removeChild(link)
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
|
||||||
|
} catch (error) {
|
||||||
|
console.error('导出失败:', error)
|
||||||
|
message.error('导出失败,请重试')
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
exportLoading.value = false
|
||||||
|
// 清理选中的ID
|
||||||
|
queryParams.ids = []
|
||||||
|
}
|
||||||
|
}
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const routeValue = ref('')
|
const routeValue = ref('')
|
||||||
|
|||||||
@ -281,7 +281,7 @@ const openForm = (type: string, id?: number) => {
|
|||||||
}
|
}
|
||||||
/** 详情操作 新增/查看 */
|
/** 详情操作 新增/查看 */
|
||||||
const openDetail = (active: string, id?: number) => {
|
const openDetail = (active: string, id?: number) => {
|
||||||
router.push({ path: '/inventory/storageoutdetailsp', query: { type: active, id: id } })
|
router.push({ path: '/inventory/StorageOutAudit', query: { type: active, id: id } })
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 初始化 **/
|
/** 初始化 **/
|
||||||
|
|||||||
@ -6,9 +6,9 @@
|
|||||||
<ContentWrap class="borderxx">
|
<ContentWrap class="borderxx">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="120px">
|
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="120px">
|
||||||
<!-- <el-form-item label="物料编码" prop="matCode">-->
|
<el-form-item label="单据编号" prop="codeNo">
|
||||||
<!-- <el-input v-model="queryParams.matCode" placeholder="物料编码" clearable @keyup.enter="handleQuery" class="!w-240px" />-->
|
<el-input v-model="queryParams.codeNo" placeholder="单据编号" clearable @keyup.enter="handleQuery" class="!w-240px" />
|
||||||
<!-- </el-form-item>-->
|
</el-form-item>
|
||||||
<el-form-item label="物料名称" prop="matName">
|
<el-form-item label="物料名称" prop="matName">
|
||||||
<el-input v-model="queryParams.matName" placeholder="物料名称" clearable @keyup.enter="handleQuery" class="!w-240px" />
|
<el-input v-model="queryParams.matName" placeholder="物料名称" clearable @keyup.enter="handleQuery" class="!w-240px" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -33,9 +33,9 @@
|
|||||||
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in getIntDictOptions(DICT_TYPE.HELI_STORAGE_TYPE)" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="上游单据编号" prop="headerNo">-->
|
<el-form-item label="规格/型号" prop="matSpec">
|
||||||
<!-- <el-input v-model="queryParams.headerNo" placeholder="上游单据编号" clearable @keyup.enter="handleQuery" class="!w-240px" />-->
|
<el-input v-model="queryParams.matSpec" placeholder="规格/型号" clearable @keyup.enter="handleQuery" class="!w-240px" />
|
||||||
<!-- </el-form-item>-->
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button @click="handleQuery" type="primary">
|
<el-button @click="handleQuery" type="primary">
|
||||||
@ -68,7 +68,7 @@
|
|||||||
<el-table-column label="盘库后数量" align="center" prop="storageAft" min-width="140" />
|
<el-table-column label="盘库后数量" align="center" prop="storageAft" min-width="140" />
|
||||||
<el-table-column label="入/出库数量" align="center" prop="storageOkQty" min-width="140" fixed="right" >
|
<el-table-column label="入/出库数量" align="center" prop="storageOkQty" min-width="140" fixed="right" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
{{scope.row.stockType==1?scope.row.storageOkQty:'-'+scope.row.storageOkQty}}
|
{{scope.row.stockType==1 || scope.row.storageOkQty<0?scope.row.storageOkQty:'-'+scope.row.storageOkQty}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="库存单位" align="center" prop="matUnit" fixed="right" min-width="120">
|
<el-table-column label="库存单位" align="center" prop="matUnit" fixed="right" min-width="120">
|
||||||
@ -90,6 +90,8 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|||||||
|
|
||||||
import * as WarehouseApi from '@/api/heli/warehouse'
|
import * as WarehouseApi from '@/api/heli/warehouse'
|
||||||
import routeParamsCache from '@/utils/routeParamsCache'
|
import routeParamsCache from '@/utils/routeParamsCache'
|
||||||
|
import axios from "axios";
|
||||||
|
import {getAccessToken, getTenantId} from "@/utils/auth";
|
||||||
|
|
||||||
defineOptions({ name: 'StorageLog' })
|
defineOptions({ name: 'StorageLog' })
|
||||||
|
|
||||||
@ -97,7 +99,7 @@ const whList = ref([])
|
|||||||
|
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
|
const exportLoading = ref(false) // 导出的加载中
|
||||||
const loading = ref(true) // 列表的加载中
|
const loading = ref(true) // 列表的加载中
|
||||||
const list = ref([]) // 列表的数据
|
const list = ref([]) // 列表的数据
|
||||||
const total = ref(0) // 列表的总页数
|
const total = ref(0) // 列表的总页数
|
||||||
@ -112,7 +114,9 @@ const queryParams = reactive({
|
|||||||
pnId: undefined,
|
pnId: undefined,
|
||||||
stockNo: undefined,
|
stockNo: undefined,
|
||||||
stockType: undefined,
|
stockType: undefined,
|
||||||
headerNo: undefined
|
headerNo: undefined,
|
||||||
|
codeNo:undefined,
|
||||||
|
matSpec:undefined,
|
||||||
})
|
})
|
||||||
const queryFormRef = ref() // 搜索的表单
|
const queryFormRef = ref() // 搜索的表单
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user