Commit ad7cafb0 LN

20031:datalog中增加供应商字段。报表接口修改。

1 个父辈 6f3947c8
...@@ -693,6 +693,7 @@ public class BaseDeviceHandler implements IDeviceHandler { ...@@ -693,6 +693,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
//记录日志,完成 task //记录日志,完成 task
task.setBatchInfo(barcode.getBatch()); task.setBatchInfo(barcode.getBatch());
task.setNum(barcode.getAmount()); task.setNum(barcode.getAmount());
task.setProviderNumber(barcode.getProviderNumber());
} }
//更新缓存中的库存信息 //更新缓存中的库存信息
task.setStatus(OP_STATUS.FINISHED.name()); task.setStatus(OP_STATUS.FINISHED.name());
......
...@@ -503,6 +503,7 @@ public class OrderController { ...@@ -503,6 +503,7 @@ public class OrderController {
dataLog.setPartNumber(barcode.getPartNumber()); dataLog.setPartNumber(barcode.getPartNumber());
dataLog.setBarcode(barcode.getBarcode()); dataLog.setBarcode(barcode.getBarcode());
dataLog.setNum(num); dataLog.setNum(num);
dataLog.setProviderNumber(barcode.getProviderNumber());
dataLog.setMemo(barcode.getMemo()); dataLog.setMemo(barcode.getMemo());
dataLog.setPutInDate(barcode.getPutInDate()); dataLog.setPutInDate(barcode.getPutInDate());
......
...@@ -182,7 +182,7 @@ public class SolderBoxCache { ...@@ -182,7 +182,7 @@ public class SolderBoxCache {
} }
log.info(barcode.getBarcode() + "创建出库任务"); log.info(barcode.getBarcode() + "创建出库任务");
Storage storage = dataCache.getStorageById(storagePos.getStorageId()); Storage storage = dataCache.getStorageById(storagePos.getStorageId());
DataLog outTask = newTask(storage, storagePos,barcode); DataLog outTask = new DataLog(storage,barcode, storagePos);
outTask.setType(OP.CHECKOUT); outTask.setType(OP.CHECKOUT);
outTask.setMixTime(barcode.getMixTime()); outTask.setMixTime(barcode.getMixTime());
//outTask = dataLogDao.save(outTask); //outTask = dataLogDao.save(outTask);
...@@ -209,7 +209,7 @@ public class SolderBoxCache { ...@@ -209,7 +209,7 @@ public class SolderBoxCache {
} }
log.info(barcode.getBarcode() + "创建搅拌任务"); log.info(barcode.getBarcode() + "创建搅拌任务");
Storage storage = dataCache.getStorageById(storagePos.getStorageId()); Storage storage = dataCache.getStorageById(storagePos.getStorageId());
DataLog mixTask = newTask(storage, storagePos,barcode); DataLog mixTask = new DataLog(storage,barcode, storagePos);
mixTask.setType(OP.MIX); mixTask.setType(OP.MIX);
mixTask.setMixTime(barcode.getMixTime()); mixTask.setMixTime(barcode.getMixTime());
//mixTask = dataLogDao.save(mixTask); //mixTask = dataLogDao.save(mixTask);
...@@ -240,12 +240,12 @@ public class SolderBoxCache { ...@@ -240,12 +240,12 @@ public class SolderBoxCache {
StoragePos warmPos = storagePosManager.getEmptyWarmPos(storage, barcode, excludePosIds); StoragePos warmPos = storagePosManager.getEmptyWarmPos(storage, barcode, excludePosIds);
if(warmPos != null){ if(warmPos != null){
log.info(barcode.getBarcode() + "创建回温移库任务["+storagePos.getPosName()+"]=>" + warmPos.getPosName()); log.info(barcode.getBarcode() + "创建回温移库任务["+storagePos.getPosName()+"]=>" + warmPos.getPosName());
DataLog takingTask = newTask(storage, storagePos,barcode); DataLog takingTask = new DataLog(storage,barcode, storagePos);
takingTask.setType(OP.REWARM_TAKING); takingTask.setType(OP.REWARM_TAKING);
//takingTask = dataLogDao.save(takingTask); //takingTask = dataLogDao.save(takingTask);
taskService.addTaskToExecute(takingTask); taskService.addTaskToExecute(takingTask);
DataLog puttingTask = newTask(storage, warmPos,barcode); DataLog puttingTask = new DataLog(storage,barcode, warmPos);
puttingTask.setType(OP.REWARM_PUTTING); puttingTask.setType(OP.REWARM_PUTTING);
//puttingTask = dataLogDao.save(puttingTask); //puttingTask = dataLogDao.save(puttingTask);
taskService.addTaskToExecute(puttingTask); taskService.addTaskToExecute(puttingTask);
...@@ -255,23 +255,23 @@ public class SolderBoxCache { ...@@ -255,23 +255,23 @@ public class SolderBoxCache {
} }
} }
private DataLog newTask(Storage storage, StoragePos pos, Barcode barcode){ // private DataLog newTask(Storage storage, StoragePos pos, Barcode barcode){
//
DataLog task = new DataLog(); // DataLog task = new DataLog();
task.setPartNumber(barcode.getPartNumber()); // task.setPartNumber(barcode.getPartNumber());
task.setBarcode(barcode.getBarcode()); // task.setBarcode(barcode.getBarcode());
task.setNum(barcode.getAmount()); // task.setNum(barcode.getAmount());
task.setMemo(barcode.getMemo()); // task.setMemo(barcode.getMemo());
task.setStatus(OP_STATUS.WAIT.name()); // task.setStatus(OP_STATUS.WAIT.name());
task.setCid(storage.getCid()); // task.setCid(storage.getCid());
task.setStorageId(storage.getId()); // task.setStorageId(storage.getId());
task.setStorageName(storage.getName()); // task.setStorageName(storage.getName());
//
task.setPosId(pos.getId()); // task.setPosId(pos.getId());
task.setPosName(pos.getPosName()); // task.setPosName(pos.getPosName());
//
return task; // return task;
} // }
private boolean isInStatus(Barcode barcode, SOLDER_STATUS solder_status){ private boolean isInStatus(Barcode barcode, SOLDER_STATUS solder_status){
return barcode.getSolderStatus().equals(solder_status.name()); return barcode.getSolderStatus().equals(solder_status.name());
......
...@@ -31,6 +31,9 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog> ...@@ -31,6 +31,9 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
setBarcode(barcode.getBarcode()); setBarcode(barcode.getBarcode());
setNum(barcode.getAmount()); setNum(barcode.getAmount());
setMemo(barcode.getMemo()); setMemo(barcode.getMemo());
setProviderNumber(barcode.getProviderNumber());
setBatchInfo(barcode.getBatch());
setPutInDate(barcode.getPutInDate()); setPutInDate(barcode.getPutInDate());
msdAppendInfo = new MSDAppendInfo(); msdAppendInfo = new MSDAppendInfo();
...@@ -47,7 +50,6 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog> ...@@ -47,7 +50,6 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
setStatus(OP_STATUS.WAIT.name()); setStatus(OP_STATUS.WAIT.name());
} }
/** /**
* 是否是单盘出库(联电指出库项目,默认为false即默认批量出库) * 是否是单盘出库(联电指出库项目,默认为false即默认批量出库)
*/ */
...@@ -215,6 +217,11 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog> ...@@ -215,6 +217,11 @@ public class DataLog extends BasePo implements Serializable ,Comparable<DataLog>
* removed=1, withdrawn=2, offline=3 * removed=1, withdrawn=2, offline=3
*/ */
private String inOutType=""; private String inOutType="";
/**
* 供应商编号
*/
private String providerNumber;
/** /**
* MSD附加信息 * MSD附加信息
*/ */
......
...@@ -131,7 +131,6 @@ public class MicronInventoryReportsController { ...@@ -131,7 +131,6 @@ public class MicronInventoryReportsController {
baseCriteria.and("barcode.type").is(componentType); baseCriteria.and("barcode.type").is(componentType);
} }
String expire = criteria.getExpire(); String expire = criteria.getExpire();
if (!Strings.isNullOrEmpty(expire)) { if (!Strings.isNullOrEmpty(expire)) {
if ("solder".equalsIgnoreCase(expire)) { if ("solder".equalsIgnoreCase(expire)) {
...@@ -148,7 +147,7 @@ public class MicronInventoryReportsController { ...@@ -148,7 +147,7 @@ public class MicronInventoryReportsController {
@GetMapping("/emptyPosReport") @GetMapping("/emptyPosReport")
@AnonymousAccess @AnonymousAccess
public PageData<StoragePosDto> emptyPosReport(StoragePosFindCriteria criteria, Pageable pageable, HttpServletRequest request) { public PageData<StoragePosDto> emptyPosReport(StoragePosFindCriteria criteria, Pageable pageable, HttpServletRequest request) {
//TODO 空库位展示 // 空库位展示
Query query=QueryHelp.getQuery(criteria); Query query=QueryHelp.getQuery(criteria);
Criteria baseCriteria = Criteria.where("used").is(false); Criteria baseCriteria = Criteria.where("used").is(false);
query.addCriteria(baseCriteria); query.addCriteria(baseCriteria);
...@@ -159,7 +158,7 @@ public class MicronInventoryReportsController { ...@@ -159,7 +158,7 @@ public class MicronInventoryReportsController {
@ApiOperation("Inventory Summary Report- Fresh & Partial material inventory I4:新料,退料,过期料") @ApiOperation("Inventory Summary Report- Fresh & Partial material inventory I4:新料,退料,过期料")
@GetMapping("/summaryReport") @GetMapping("/summaryReport")
@AnonymousAccess @AnonymousAccess
public List<SpDailyLogDto> materialList( ) { public List<SpDailyLogDto> summaryReport( ) {
//TODO 根据partNo排序,每种物料的 新料,退料,过期料数量 //TODO 根据partNo排序,每种物料的 新料,退料,过期料数量
Criteria c = null; Criteria c = null;
...@@ -193,7 +192,37 @@ public class MicronInventoryReportsController { ...@@ -193,7 +192,37 @@ public class MicronInventoryReportsController {
return new ArrayList<>(dailyLogDtos.values()); return new ArrayList<>(dailyLogDtos.values());
} }
@ApiOperation("'- Material in stabilization :库存表格I3:增加过滤: StabilizationEndDate>=当前时间 ")
@GetMapping("/stabilizationReport")
@AnonymousAccess
public PageData<StoragePosDto> stabilizationReport(StoragePosFindCriteria criteria, Pageable pageable, HttpServletRequest request) {
Query query=getPosFindCriteria(criteria);
if (criteria.getExpireDate() != null && criteria.getExpireDate().getFrom() != null && criteria.getExpireDate().getTo() != null) {
//根据过滤时间查询
} else {
//需要查询已经超过过期日期的物料
query.addCriteria(Criteria.where("barcode.expireDate").lte(new Date()));
}
PageData<StoragePos> pages = storagePosManager.findByPage(query, pageable);
List<StoragePosDto> StoragePosDtos = storagePosMapper.toDto(pages.getContent());
return new PageData(StoragePosDtos, pages.getTotalElements());
}
@ApiOperation("Expiry based report I3:库存中过期的物料")
@GetMapping("/expiryReport")
@AnonymousAccess
public PageData<StoragePosDto> expiryReport(StoragePosFindCriteria criteria, Pageable pageable, HttpServletRequest request) {
Query query=getPosFindCriteria(criteria);
if (criteria.getExpireDate() != null && criteria.getExpireDate().getFrom() != null && criteria.getExpireDate().getTo() != null) {
//根据过滤时间查询
} else {
//需要查询已经超过过期日期的物料
query.addCriteria(Criteria.where("barcode.expireDate").lte(new Date()));
}
PageData<StoragePos> pages = storagePosManager.findByPage(query, pageable);
List<StoragePosDto> StoragePosDtos = storagePosMapper.toDto(pages.getContent());
return new PageData(StoragePosDtos, pages.getTotalElements());
}
@ApiOperation("Self-Audit Report - Audit report(monthly-finance , when door is opened,etc) I7") @ApiOperation("Self-Audit Report - Audit report(monthly-finance , when door is opened,etc) I7")
@GetMapping("/selfAuditReport") @GetMapping("/selfAuditReport")
......
...@@ -24,6 +24,12 @@ public class SpReportQueryCondition { ...@@ -24,6 +24,12 @@ public class SpReportQueryCondition {
@DateTimeFormat(pattern = "yyyy-MM-dd") @DateTimeFormat(pattern = "yyyy-MM-dd")
private BetweenData<Date> updateDate; private BetweenData<Date> updateDate;
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "appendData.StabilizationEndDate")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private BetweenData<Date> StabilizationEndDate;
@QueryCondition @QueryCondition
@ApiModelProperty("來源ID") @ApiModelProperty("來源ID")
private String sourceId; private String sourceId;
...@@ -56,4 +62,15 @@ public class SpReportQueryCondition { ...@@ -56,4 +62,15 @@ public class SpReportQueryCondition {
@QueryCondition @QueryCondition
@ApiModelProperty("操作人") @ApiModelProperty("操作人")
private String operator; private String operator;
@QueryCondition
@ApiModelProperty("数量")
private Integer num;
@QueryCondition
@ApiModelProperty("批次")
private String batchInfo;
@QueryCondition
@ApiModelProperty("供应商")
private String providerNumber;
} }
package com.neotel.smfcore.custom.micron20031.bean.query;
import com.neotel.smfcore.common.annotation.QueryCondition;
import com.neotel.smfcore.common.bean.BetweenData;
import com.neotel.smfcore.core.barcode.enums.COMPONENT_TYPE;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import java.util.List;
@Data
public class SpStoragePosFindCriteria {
@QueryCondition(blurry = "barcode.partNumber,barcode.barcode,barcode.subCodeList.barcode,barcode.subCodeList.partNumber,posName")
private String blurry;
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "barcode.putInDate")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private BetweenData<Date> updateDate;
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "barcode.putInDate")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private BetweenData<Date> putInDate;
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "barcode.expireDate")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private BetweenData<Date> expireDate;
@QueryCondition(type = QueryCondition.Type.BETWEEN, propName = "barcode.sluggishTime")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private BetweenData<Date> sluggishTime;
@QueryCondition
@ApiModelProperty("料仓ID")
private String storageId;
@QueryCondition(type = QueryCondition.Type.IN, propName = "storageId")
private List<String> storageIdList;
@QueryCondition(propName = "barcode.barcode")
@ApiModelProperty("条码")
private String barcode;
@QueryCondition
@ApiModelProperty("库位号")
private String posName;
@QueryCondition
@ApiModelProperty("标签ID")
private String labelId;
@ApiModelProperty("分组")
private String groupId = "";
@ApiModelProperty("类型")
private int type =-1 ;
@ApiModelProperty("是否过期")
private String expire;
@QueryCondition(blurry = "barcode.providerNumber" )
private String providerNumber;
@QueryCondition(blurry = "barcode.partNumber")
private String partNumber;
@QueryCondition(blurry = "barcode.memo")
private String memo;
@QueryCondition(propName = "barcode.lockId")
private String lockId;
@QueryCondition(blurry = "barcode.batch")
private String batch;
@QueryCondition(blurry = "barcode.provider")
private String provider;
@QueryCondition(propName = "barcode.msl")
@ApiModelProperty("等级")
private String msl;
@ApiModelProperty("锡膏状态")
@QueryCondition(type = QueryCondition.Type.IN, propName = "barcode.solderStatus")
private List<String> solderStatus;
public int getComponentType(){
int componentType = getType();
if (componentType != -1) {
int type = componentType;
if (componentType == 41) {//锡膏夹具
type = COMPONENT_TYPE.FIXTURE;
} else if (componentType == 42) {//PCB夹具
type = COMPONENT_TYPE.FIXTURE;
}
return type;
}
return -1;
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!