Compare commits

..

No commits in common. "eda15da1a92fcfb104a71b7f76cbb662087bf059" and "6b38aebb5bafa50702443f42d870825f38728bbe" have entirely different histories.

8 changed files with 25 additions and 61 deletions

View File

@ -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 {

View File

@ -36,7 +36,6 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.text.DecimalFormat;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
@ -287,35 +286,10 @@ public class WoPackagingBoxSubstrateController {
return new Result();
}
@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("substrateList/{woSubstrateId}")
@ApiOperation("模组信息查询")
public List<WoPackagingBoxSubstrateDTO> substrateList(@PathVariable("woSubstrateId") String woSubstrateId){
return woPackagingBoxSubstrateService.substrateList(woSubstrateId);
}
@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);
}
}
}

View File

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

View File

@ -10,7 +10,6 @@ import org.apache.ibatis.annotations.Mapper;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;
/**
* 包装箱基板关联表
@ -28,5 +27,5 @@ 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);
}

View File

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

View File

@ -61,23 +61,24 @@ 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){
if(params.get("startTime")==null && params.get("endTime")==null && params.get("boxNo")==null && params.get("lineBody")==null && params.get("printStatus")==null){
wrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0");
}

View File

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

View File

@ -124,16 +124,9 @@
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