Merge pull request 'yanyang' (#16) from yanyang into master
Reviewed-on: #16
This commit is contained in:
commit
5b3f6f6f5d
@ -58,7 +58,7 @@ public abstract class BaseSupportUtils {
|
||||
*/
|
||||
public static <T extends Serializable> 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())
|
||||
|
@ -118,8 +118,9 @@ public class ChangePackagingBoxHistoryController {
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||
if(list.size()>0) {
|
||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -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<PageData<PrintModelDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
|
||||
|
@ -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<WoPackagingBoxDTO>().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<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<WoPackagingBoxSubstrate> list = woPackagingBoxService.substrateList(params);
|
||||
if (list.size() > 0) {
|
||||
ExcelUtils.exportExcelToTarget(response, "箱单明细", list, WoPackagingBoxSubstrateExcel.class);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -205,10 +205,9 @@ public class WoPackagingBoxSubstrateController {
|
||||
@LogOperation("合箱")
|
||||
public Result insertSubstrate(@RequestBody ChangePackingBoxDTO dto){
|
||||
|
||||
String woSubstrateId = dto.getWoSubstrateId();
|
||||
//验证模组是否存在
|
||||
QueryWrapper<WoPackagingBoxSubstrate> 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,"该模组不存在,请重新输入");
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ import lombok.Data;
|
||||
* </p>
|
||||
*
|
||||
* @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";
|
||||
|
||||
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
|
||||
|
||||
}
|
@ -6,6 +6,7 @@ import com.cnbm.packing.dto.IdVo;
|
||||
import com.cnbm.packing.dto.PowerReportDTO;
|
||||
import com.cnbm.packing.dto.WoPackagingBoxDTO;
|
||||
import com.cnbm.packing.entity.WoPackagingBox;
|
||||
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
|
||||
import com.cnbm.packing.param.PowerReportQueryParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -35,6 +36,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
|
||||
|
||||
WoPackagingBoxDTO printList(Long id);
|
||||
|
||||
List<WoPackagingBoxSubstrate> substrateList (Map<String, Object> params);
|
||||
|
||||
|
||||
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
||||
|
||||
|
@ -47,6 +47,10 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper,
|
||||
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
|
||||
wrapper.eq(ObjectUtils.isNotNull(lineBody), PrintModel.LINE_BODY, lineBody);
|
||||
}
|
||||
if(params.get("enabled")!=null) {
|
||||
Integer enabled = Integer.parseInt(params.get("enabled").toString());
|
||||
wrapper.eq(ObjectUtils.isNotNull(enabled), PrintModel.ENABLED, enabled);
|
||||
}
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -126,6 +127,20 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
return dto;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WoPackagingBoxSubstrate> substrateList(Map<String, Object> params) {
|
||||
QueryWrapper<WoPackagingBox> boxQueryWrapper = getWrapper(params);
|
||||
List<WoPackagingBox> boxList = mapper.selectList(boxQueryWrapper);
|
||||
List<WoPackagingBoxSubstrate> substrateList = new ArrayList<>();
|
||||
for(WoPackagingBox box: boxList){
|
||||
QueryWrapper<WoPackagingBoxSubstrate> substrateQueryWrapper = new QueryWrapper<>();
|
||||
substrateQueryWrapper.eq(StringUtils.isNotBlank(box.getBoxNo()), WoPackagingBoxSubstrate.PACKAGING_BOX_ID, box.getBoxNo());
|
||||
List<WoPackagingBoxSubstrate> woPackagingBoxSubstrateList = substrateMapper.selectList(substrateQueryWrapper);
|
||||
substrateList.addAll(woPackagingBoxSubstrateList);
|
||||
}
|
||||
return substrateList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
||||
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user