From bf0d6108a1f37871d4b5bd9968a504fdc570cd34 Mon Sep 17 00:00:00 2001 From: yanyang Date: Mon, 6 Mar 2023 11:50:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cnbm/admin/utils/BaseSupportUtils.java | 2 +- .../ChangePackagingBoxHistoryController.java | 5 +- .../controller/PrintModelController.java | 3 +- .../controller/WoPackagingBoxController.java | 20 ++++ .../WoPackagingBoxSubstrateController.java | 3 +- .../entity/WoPackagingBoxSubstrate.java | 9 +- .../excel/ChangePackagingBoxHistoryExcel.java | 23 +--- .../excel/WoPackagingBoxSubstrateExcel.java | 102 ++---------------- .../service/WoPackagingBoxServiceBiz.java | 3 + .../impl/PrintModelServiceBizImpl.java | 4 + .../impl/WoPackagingBoxServiceBizImpl.java | 15 +++ ...WoPackagingBoxSubstrateServiceBizImpl.java | 3 - 12 files changed, 63 insertions(+), 129 deletions(-) diff --git a/ym-admin/src/main/java/com/cnbm/admin/utils/BaseSupportUtils.java b/ym-admin/src/main/java/com/cnbm/admin/utils/BaseSupportUtils.java index 4f86c50..d9ecd4e 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/utils/BaseSupportUtils.java +++ b/ym-admin/src/main/java/com/cnbm/admin/utils/BaseSupportUtils.java @@ -58,7 +58,7 @@ public abstract class BaseSupportUtils { */ public static T setCommonField(T t, String... ignoreProperties) { CommonField commonField = CommonField.builder() - .enabled(WhetherEnum.YES.getValue()) +// .enabled(WhetherEnum.YES.getValue()) .valid(WhetherEnum.YES.getValue()) .createTime(LocalDateTime.now()) .creatorId(getLoginUser().getId()) diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/ChangePackagingBoxHistoryController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/ChangePackagingBoxHistoryController.java index 95380d7..2c07411 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/controller/ChangePackagingBoxHistoryController.java +++ b/ym-packing/src/main/java/com/cnbm/packing/controller/ChangePackagingBoxHistoryController.java @@ -118,8 +118,9 @@ public class ChangePackagingBoxHistoryController { @PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = changePackagingBoxHistoryService.list(params); - - ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class); + if(list.size()>0) { + ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class); + } } } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java index 3d2c220..97782ea 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java +++ b/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java @@ -49,7 +49,8 @@ public class PrintModelController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "type", value = "类型,0:模组标签,1:等级标签", paramType = "query", dataTypeClass = Integer.class), - @ApiImplicitParam(name = "lineBody", value = "线体,1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class) + @ApiImplicitParam(name = "lineBody", value = "线体,1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "enabled", value = "启用状态:0 、停用,1、启用", paramType = "query", dataTypeClass = Integer.class) }) @PreAuthorize("@ex.hasAuthority('packing:printModel:page')") public Result> page(@ApiIgnore @RequestParam Map params){ diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java index a9f330e..5be0225 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java +++ b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java @@ -12,7 +12,9 @@ import com.cnbm.common.validator.group.DefaultGroup; import com.cnbm.common.validator.group.UpdateGroup; import com.cnbm.packing.dto.IdVo; import com.cnbm.packing.dto.WoPackagingBoxDTO; +import com.cnbm.packing.entity.WoPackagingBoxSubstrate; import com.cnbm.packing.excel.WoPackagingBoxExcel; +import com.cnbm.packing.excel.WoPackagingBoxSubstrateExcel; import com.cnbm.packing.service.WoPackagingBoxServiceBiz; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -132,4 +134,22 @@ public class WoPackagingBoxController { return new Result().ok(data); } + @GetMapping("exportSubstrateList") + @ApiOperation("箱单明细导出") + @LogOperation("箱单明细导出") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "boxNo", value = "boxid", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "lineBody", value = "线体", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "printStatus", value = "打印状态:0、未打印,1、已打印", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "model", value = "模式,1-手动模式;2-自动模式", paramType = "query", dataTypeClass = Integer.class) + }) + public void exportSubstrateList(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = woPackagingBoxService.substrateList(params); + if (list.size() > 0) { + ExcelUtils.exportExcelToTarget(response, "箱单明细", list, WoPackagingBoxSubstrateExcel.class); + } + } + } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java index add9f87..19364e4 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java +++ b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java @@ -144,10 +144,9 @@ public class WoPackagingBoxSubstrateController { @LogOperation("合箱") public Result insertSubstrate(@RequestBody ChangePackingBoxDTO dto){ - String woSubstrateId = dto.getWoSubstrateId(); //验证模组是否存在 QueryWrapper substrateQueryWrapper1 = new QueryWrapper<>(); - substrateQueryWrapper1.eq(StringUtils.isNotBlank(woSubstrateId), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, woSubstrateId); + substrateQueryWrapper1.eq(WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, dto.getWoSubstrateId()); if(woPackagingBoxSubstrateMapper.selectCount(substrateQueryWrapper1 )== 0){ return new Result().error(1,"该模组不存在,请重新输入"); } diff --git a/ym-packing/src/main/java/com/cnbm/packing/entity/WoPackagingBoxSubstrate.java b/ym-packing/src/main/java/com/cnbm/packing/entity/WoPackagingBoxSubstrate.java index 8543de4..25bc8f9 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/entity/WoPackagingBoxSubstrate.java +++ b/ym-packing/src/main/java/com/cnbm/packing/entity/WoPackagingBoxSubstrate.java @@ -14,7 +14,7 @@ import lombok.Data; *

* * @author codeGenerator - * @since 2023-02-21 + * @since 2023-03-03 */ @Data @TableName("t_wo_packaging_box_substrate") @@ -80,10 +80,6 @@ public class WoPackagingBoxSubstrate implements Serializable { @ApiModelProperty("订单名") private String orderName; - @ApiModelProperty("真实PMPP") - private Float actualPmpp; - - private Long binclassFl1; private Long binclassFl2; @@ -144,6 +140,9 @@ public class WoPackagingBoxSubstrate implements Serializable { private Float uocFl2; + @ApiModelProperty("真实PMPP") + private Float actualPmpp; + public static final String ID = "ID"; diff --git a/ym-packing/src/main/java/com/cnbm/packing/excel/ChangePackagingBoxHistoryExcel.java b/ym-packing/src/main/java/com/cnbm/packing/excel/ChangePackagingBoxHistoryExcel.java index abe8f60..fc10100 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/excel/ChangePackagingBoxHistoryExcel.java +++ b/ym-packing/src/main/java/com/cnbm/packing/excel/ChangePackagingBoxHistoryExcel.java @@ -16,41 +16,20 @@ import java.util.Date; */ @Data public class ChangePackagingBoxHistoryExcel { - @Excel(name = "ID") - private Long id; + @Excel(name = "基板ID") private String substrateId; @Excel(name = "源包装箱") private String sourceBoxNo; @Excel(name = "源位置") private Integer sourceSlot; - @Excel(name = "离开时间") - private LocalDateTime leaveTime; @Excel(name = "目的包装箱") private String targetBoxNo; @Excel(name = "目的位置") private Integer targetSlot; - @Excel(name = "进入时间") - private LocalDateTime inputTime; - @Excel(name = "等级") - private String grade; @Excel(name = "操作类型") private Integer type; - @Excel(name = "删除标志,是否有效:1 可用 0不可用") - private Integer valid; - @Excel(name = "创建人") - private Long creatorId; - @Excel(name = "创建人姓名") - private String creatorName; @Excel(name = "操作时间") private LocalDateTime createTime; - @Excel(name = "更新人") - private Long updaterId; - @Excel(name = "更新人姓名") - private String updaterName; - @Excel(name = "更新时间") - private LocalDateTime updateTime; - @Excel(name = "版本号") - private Integer version; } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java b/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java index 40bc9d6..0e8dcb4 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java +++ b/ym-packing/src/main/java/com/cnbm/packing/excel/WoPackagingBoxSubstrateExcel.java @@ -16,106 +16,22 @@ import java.util.Date; */ @Data public class WoPackagingBoxSubstrateExcel { - @Excel(name = "ID") - private Long id; - @Excel(name = "Box_ID") - private String packagingBoxId; + + @Excel(name = "产出时间") + private LocalDateTime createTime; @Excel(name = "substrate ID") private String woSubstrateId; - @Excel(name = "创建人") - private Long creatorId; - @Excel(name = "创建人姓名") - private String creatorName; - @Excel(name = "创建时间") - private LocalDateTime createTime; - @Excel(name = "更新人") - private Long updaterId; - @Excel(name = "更新人姓名") - private String updaterName; - @Excel(name = "更新时间") - private LocalDateTime updateTime; - @Excel(name = "版本号") - private Integer version; + @Excel(name = "Box_ID") + private String packagingBoxId; + @Excel(name = "Pmpp") + private Float pmpp; @Excel(name = "BOX_SLOT") private Integer slot; - @Excel(name = "进入时间") - private LocalDateTime inputTime; - @Excel(name = "删除标志,是否有效:1 可用 0不可用") - private Integer valid; - @Excel(name = "SAP MATERIAL,从t_wo_power_level 对应过来的") - private String sapMaterial; @Excel(name = "线体") private Integer lineBody; - @Excel(name = "功率等级") - private String powerLevel; - @Excel(name = "") - private LocalDateTime lastUpdateTime; - @Excel(name = "补偿后的功率,pmpp") - private Float pmpp; + @Excel(name = "实际功率") + private Float actualPmpp; @Excel(name = "订单") private String orderName; - @Excel(name = "") - private Long binclassFl1; - @Excel(name = "") - private Long binclassFl2; - @Excel(name = "") - private Float etaFl1; - @Excel(name = "") - private Float etaFl2; - @Excel(name = "") - private Float ffFl1; - @Excel(name = "") - private Float ffFl2; - @Excel(name = "") - private Float imppFl1; - @Excel(name = "") - private Float imppFl2; - @Excel(name = "") - private Float insolflashcontrolFl1; - @Excel(name = "") - private Float insolflashcontrolFl2; - @Excel(name = "") - private Float insolmppFl1; - @Excel(name = "") - private Float insolmppFl2; - @Excel(name = "") - private Float insolvocFl1; - @Excel(name = "") - private Float insolvocFl2; - @Excel(name = "") - private Float insolFl1; - @Excel(name = "") - private Float insolFl2; - @Excel(name = "") - private Float iscFl1; - @Excel(name = "") - private Float iscFl2; - @Excel(name = "") - private LocalDateTime measTimeFl1; - @Excel(name = "") - private LocalDateTime measTimeFl2; - @Excel(name = "") - private Float pmppFl1; - @Excel(name = "") - private Float pmppFl2; - @Excel(name = "") - private Float tcellFl1; - @Excel(name = "") - private Float tcellFl2; - @Excel(name = "") - private Float tmonicellFl1; - @Excel(name = "") - private Float tmonicellFl2; - @Excel(name = "") - private Float umppFl1; - @Excel(name = "") - private Float umppFl2; - @Excel(name = "") - private Float uocFl1; - @Excel(name = "") - private Float uocFl2; - @Excel(name = "真实PMPP") - private Float actualPmpp; - } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java index 8db6c17..0d24bdf 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java @@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService; import com.cnbm.packing.dto.IdVo; import com.cnbm.packing.dto.WoPackagingBoxDTO; import com.cnbm.packing.entity.WoPackagingBox; +import com.cnbm.packing.entity.WoPackagingBoxSubstrate; import java.util.List; import java.util.Map; @@ -31,6 +32,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService substrateList (Map params); + int updateIsArrivedByBoxNo(Integer isArrived, String boxNo); } \ No newline at end of file diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java index d5f8344..9144c7d 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java @@ -47,6 +47,10 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl substrateList(Map params) { + QueryWrapper boxQueryWrapper = getWrapper(params); + List boxList = mapper.selectList(boxQueryWrapper); + List substrateList = new ArrayList<>(); + for(WoPackagingBox box: boxList){ + QueryWrapper substrateQueryWrapper = new QueryWrapper<>(); + substrateQueryWrapper.eq(StringUtils.isNotBlank(box.getBoxNo()), WoPackagingBoxSubstrate.PACKAGING_BOX_ID, box.getBoxNo()); + List woPackagingBoxSubstrateList = substrateMapper.selectList(substrateQueryWrapper); + substrateList.addAll(woPackagingBoxSubstrateList); + } + return substrateList; + } + @Override public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) { return mapper.updateIsArrivedByBoxNo(isArrived,boxNo); diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java index 9be8657..c753d62 100644 --- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java +++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java @@ -14,17 +14,14 @@ import com.cnbm.packing.dto.ChangePackingBoxDTO; import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO; import com.cnbm.packing.entity.ChangePackagingBoxHistory; import com.cnbm.packing.entity.WoPackagingBoxSubstrate; -import com.cnbm.packing.mapper.WoPackagingBoxMapper; import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper; import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz; import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz; import org.apache.commons.lang3.StringUtils; -import org.omg.CORBA.PRIVATE_MEMBER; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import javax.annotation.Resource; import java.time.LocalDateTime; import java.util.Arrays; import java.util.Map;