# Conflicts:
#	ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java
#	ym-packing/src/main/java/com/cnbm/packing/mapper/WoPackagingBoxSubstrateMapper.java
Šī revīzija ir iekļauta:
caixiang 2023-03-17 12:41:54 +08:00
revīzija c37f25a874
8 mainīti faili ar 61 papildinājumiem un 24 dzēšanām

Parādīt failu

@ -55,8 +55,8 @@ public class WoPackagingBoxController {
@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 = "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)
})
@PreAuthorize("@ex.hasAuthority('packing:woPackagingBox:page')")
@ -142,8 +142,8 @@ public class WoPackagingBoxController {
@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 = "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<String, Object> params, HttpServletResponse response) throws Exception {

Parādīt failu

@ -37,6 +37,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@ -327,10 +328,35 @@ public class WoPackagingBoxSubstrateController {
return new Result();
}
@GetMapping("substrateList/{woSubstrateId}")
@ApiOperation("模组信息查询")
public List<WoPackagingBoxSubstrateDTO> substrateList(@PathVariable("woSubstrateId") String woSubstrateId){
return woPackagingBoxSubstrateService.substrateList(woSubstrateId);
@GetMapping("substrateList")
@ApiOperation("装箱单信息查询")
@ApiImplicitParams({
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "model", value = "模式1-手动模式2-自动模式", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "packagingBoxId", value = "包装箱IDBoxId", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "woSubstrateId", value = "基板ID关联T_SUBSTRATE表", paramType = "query", dataTypeClass = String.class)
})
public List<WoPackagingBoxSubstrateDTO> substrateList(@ApiIgnore @RequestParam Map<String, Object> params){
return woPackagingBoxSubstrateService.substrateList(params);
}
@GetMapping("exportPackingInfo")
@ApiOperation("装箱单信息导出")
@LogOperation("装箱单信息导出")
@ApiImplicitParams({
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class),
@ApiImplicitParam(name = "model", value = "模式1-手动模式2-自动模式", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "packagingBoxId", value = "包装箱IDBoxId", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "woSubstrateId", value = "基板ID关联T_SUBSTRATE表", paramType = "query", dataTypeClass = String.class)
})
public void exportPackingInfo(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<WoPackagingBoxSubstrateDTO> list = woPackagingBoxSubstrateService.list(params);
if(list.size()>0) {
ExcelUtils.exportExcelToTarget(response, "装箱单信息", list, WoPackagingBoxSubstrateExcel.class);
}
}
}

Parādīt failu

@ -1,6 +1,7 @@
package com.cnbm.packing.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
@ -18,12 +19,12 @@ import java.util.Date;
public class WoPackagingBoxSubstrateExcel {
@Excel(name = "创建时间")
private LocalDateTime createTime;
private LocalDateTime boxCreateTime;
@Excel(name = "模组ID")
private String woSubstrateId;
@Excel(name = "Box_ID")
@Excel(name = "BoxID")
private String packagingBoxId;
@Excel(name = "BOX_SLOT")
@Excel(name = "模组所在包装箱位置")
private Integer slot;
@Excel(name = "档位功率")
private String powerLevel;
@ -37,5 +38,7 @@ public class WoPackagingBoxSubstrateExcel {
private Integer lineBody;
@Excel(name = "SAP物料号")
private String sapMaterial;
@Excel(name = "最近打印时间")
private LocalDateTime printTime;
}

Parādīt failu

@ -14,6 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 包装箱基板关联表
@ -31,6 +32,7 @@ public interface WoPackagingBoxSubstrateMapper extends BaseDao<WoPackagingBoxSub
List<PowerReportDTO> powerReport(@Param("queryParam") PowerReportQueryParam queryParam);
List<String> orderNameList();
List<WoPackagingBoxSubstrateDTO> substrateList(Map<String, Object> params);
List<WoPackagingBoxSubstrateDTO> substrateList(@Param("woSubstrateId") String woSubstrateId);
IPage<SubIdPageVo> subIdPage(Page<?> page, @Param("param") SubIdQueryParam param);

Parādīt failu

@ -39,7 +39,7 @@ public interface WoPackagingBoxSubstrateServiceBiz extends CrudService<WoPackagi
WoPackagingBoxSubstrate getBySubId(String subId);
List<WoPackagingBoxSubstrateDTO> substrateList (String woSubstrateId);
List<WoPackagingBoxSubstrateDTO> substrateList (Map<String, Object> params);
int updatePackagingBoxIdAndSlotByWoSubstrateId(String packagingBoxId,Integer slot,String woSubstrateId);

Parādīt failu

@ -65,24 +65,23 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
LocalDateTime startTime = LocalDateTime.parse(params.get("startTime").toString(),df);
LocalDateTime endTime = LocalDateTime.parse(params.get("endTime").toString(),df);
wrapper.between(startTime!=null && endTime!=null, WoPackagingBox.CREATE_TIME, startTime, endTime);
}
String boxNo = (String) params.get("boxNo");
wrapper.like(StringUtils.isNotBlank(boxNo), WoPackagingBox.BOX_NO, boxNo);
if(params.get("lineBody")!=null) {
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), WoPackagingBox.LINE_BODY, lineBody);
}
if(params.get("printStatus")!=null) {
Integer printStatus = Integer.parseInt(params.get("printStatus").toString());
wrapper.eq(ObjectUtils.isNotNull(printStatus), WoPackagingBox.PRINT_STATUS, printStatus);
}
// if(params.get("lineBody")!=null) {
// Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
// wrapper.eq(ObjectUtils.isNotNull(lineBody), WoPackagingBox.LINE_BODY, lineBody);
// }
// if(params.get("printStatus")!=null) {
// Integer printStatus = Integer.parseInt(params.get("printStatus").toString());
// wrapper.eq(ObjectUtils.isNotNull(printStatus), WoPackagingBox.PRINT_STATUS, printStatus);
// }
if(params.get("model")!=null) {
Integer model = Integer.parseInt(params.get("model").toString());
wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model);
}
if(params.get("startTime")==null && params.get("endTime")==null && params.get("boxNo")==null && params.get("lineBody")==null && params.get("printStatus")==null){
if(params.get("startTime")==null && params.get("endTime")==null && params.get("boxNo")==null){
wrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0");
}

Parādīt failu

@ -207,8 +207,8 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl<WoPac
}
@Override
public List<WoPackagingBoxSubstrateDTO> substrateList(String woSubstrateId) {
return mapper.substrateList(woSubstrateId);
public List<WoPackagingBoxSubstrateDTO> substrateList(Map<String, Object> params) {
return mapper.substrateList(params);
}
@Override

Parādīt failu

@ -128,9 +128,16 @@
from t_wo_packaging_box_substrate twpbs
left join t_wo_packaging_box twpb on twpbs.PACKAGING_BOX_ID = twpb.BOX_NO
<where>
twpb.model = #{model}
<if test="woSubstrateId != null and woSubstrateId != ''">
and twpbs.WO_SUBSTRATE_ID like CONCAT(CONCAT('%',#{woSubstrateId}),'%')
</if>
<if test="packagingBoxId != null and packagingBoxId != ''">
and twpbs.PACKAGING_BOX_ID like CONCAT(CONCAT('%',#{packagingBoxId}),'%')
</if>
<if test="startTime != null and endTime != null">
and twpb.CREATE_TIME between #{startTime} AND #{endTime}
</if>
AND twpbs.valid = 1
</where>
order by twpb.CREATE_TIME desc