Commit 33d99616 zshaohui

1.物料日志报表修改

2.提供料箱是否流走接口
1 个父辈 a065e42b
...@@ -94,6 +94,8 @@ public class TaskController { ...@@ -94,6 +94,8 @@ public class TaskController {
@PreAuthorize("@el.check('taskLog')") @PreAuthorize("@el.check('taskLog')")
public PageData<TaskDto> query(TaskQueryCondition criteria, Pageable pageable) { public PageData<TaskDto> query(TaskQueryCondition criteria, Pageable pageable) {
Query query = getQuery(criteria); Query query = getQuery(criteria);
query.fields().include("partNumber","barcode","cartonId","posName","storageName","num","type","sourceName"
,"status","currentLoc","creator","createDate","updateDate");
PageData<DataLog> taskList = dataLogManager.findByPage(query, pageable); PageData<DataLog> taskList = dataLogManager.findByPage(query, pageable);
PageData<TaskDto> result= taskMapper.toDto(taskList); PageData<TaskDto> result= taskMapper.toDto(taskList);
return result; return result;
...@@ -104,6 +106,8 @@ public class TaskController { ...@@ -104,6 +106,8 @@ public class TaskController {
@PreAuthorize("@el.check('taskLog')") @PreAuthorize("@el.check('taskLog')")
public void download(HttpServletResponse response, TaskQueryCondition criteria, Pageable pageable, HttpServletRequest request) throws IOException { public void download(HttpServletResponse response, TaskQueryCondition criteria, Pageable pageable, HttpServletRequest request) throws IOException {
Query query = getQuery(criteria); Query query = getQuery(criteria);
query.fields().include("partNumber","barcode","cartonId","posName","storageName","num","type","sourceName"
,"status","currentLoc","creator","createDate","updateDate");
FileUtil.downloadExcel(query, pageable, response, new IExcelDownLoad() { FileUtil.downloadExcel(query, pageable, response, new IExcelDownLoad() {
@Override @Override
public List<List<String>> getHeader() { public List<List<String>> getHeader() {
......
...@@ -14,14 +14,23 @@ import java.util.Date; ...@@ -14,14 +14,23 @@ import java.util.Date;
@ApiModel("查询条件") @ApiModel("查询条件")
public class TaskQueryCondition { public class TaskQueryCondition {
@QueryCondition(blurry = "barcode,partNumber,posName,sourceName") /* @QueryCondition(blurry = "barcode,partNumber,posName,sourceName")
@ApiModelProperty("模糊搜索") @ApiModelProperty("模糊搜索")
private String blurry; private String blurry;*/
@QueryCondition @QueryCondition(type = QueryCondition.Type.EQ,propName = "barcode")
@ApiModelProperty("条码编号") @ApiModelProperty("条码编号")
private String barcode; private String barcode;
@QueryCondition(type = QueryCondition.Type.EQ,propName = "partNumber")
@ApiModelProperty("料号")
private String partNumber;
@QueryCondition(type = QueryCondition.Type.EQ,propName = "posName")
@ApiModelProperty("库位号")
private String posName;
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "updateDate") @QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "updateDate")
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private BetweenData<Date> updateDate; private BetweenData<Date> updateDate;
......
...@@ -1523,4 +1523,54 @@ public class CDeviceController { ...@@ -1523,4 +1523,54 @@ public class CDeviceController {
MaterialLocUtil.updateStackerLoc(stacker,"","",status,""); MaterialLocUtil.updateStackerLoc(stacker,"","",status,"");
return ResultBean.newOkResult(""); return ResultBean.newOkResult("");
} }
@ApiOperation("入库的料箱是否可以放走")
@RequestMapping("/putInBoxCanLeave")
@AnonymousAccess
public ResultBean putInBoxCanLeave(String boxStr) {
//kafkaService.sendMachineParameterStackerAndBox(stacker, "", 0, "", 0, 6);
log.info("入料机构是否可以放走料箱:"+boxStr);
String newBoxStr = BoxUtil.getBoxStr(boxStr);
Barcode barcode = codeResolve.resolveOneValideBarcode(newBoxStr);
if (barcode == null){
return ResultBean.newErrorResult(-1,"",boxStr+"解析错误");
}
Map<String,String> countMap = new HashMap<>();
boolean full = true;
List<Barcode> subCodeList = barcode.getSubCodeList();
if (subCodeList == null || subCodeList.isEmpty()){
full = false;
return ResultBean.newOkResult(full);
} else {
for (Barcode subCode : subCodeList) {
String posName = subCode.getPosName();
if (StringUtils.isNotEmpty(posName)){
countMap.put(posName,posName);
}
}
}
String barcodeStr = barcode.getBarcode();
if (barcodeStr.startsWith("C13") || barcodeStr.startsWith("C15")){
String key = barcodeStr + "-01";
String value = countMap.get(key);
if (StringUtils.isEmpty(value)){
log.info(key+"料箱未满");
full = false;
}
} else {
for (int i = 1; i <= 6; i++) {
String key = barcodeStr + "-0" + i;
String value = countMap.get(key);
if (StringUtils.isEmpty(value)){
log.info(key+"料箱未满");
full = false;
//break;
}
}
}
return ResultBean.newOkResult(full);
}
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!