Merge remote-tracking branch 'origin/master'

This commit is contained in:
Stang 2024-11-19 15:13:45 +08:00
commit 9f3cc12a53
3 changed files with 64 additions and 20 deletions

View File

@ -323,7 +323,7 @@ public class BaseKnifeController extends BaseController {
// 齐套性检查
AjaxResult ajaxResult = this.checkForAlignment(processCodeList);
if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200){
if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200) {
return AjaxResult.error(ajaxResult.get("msg").toString(), ajaxResult.get("data"));
}
@ -990,7 +990,15 @@ public class BaseKnifeController extends BaseController {
@PreAuthorize("@ss.hasPermi('md:baseKnife:query')")
@GetMapping(value = "/isDuplicateRfid/{rfid}")
public AjaxResult isDuplicateRfid(@PathVariable("rfid") String rfid) {
return AjaxResult.success(baseKnifeService.isDuplicateRfid(rfid));
String[] split = rfid.split(",");
// 验证失败的rfid
ArrayList<String> errorList = new ArrayList<>();
for (String s : split) {
if (baseKnifeService.isDuplicateRfid(rfid)) {
errorList.add(s);
}
}
return AjaxResult.success(errorList);
}
/**

View File

@ -18,43 +18,36 @@ public class WmsInPlanDetailEntity extends BaseEntity {
* $column.columnComment
*/
private Long id;
/**
* 入库计划ID
*/
@Excel(name = "入库计划ID")
private Long planId;
/**
* 入库计划明细ID
*/
@Excel(name = "入库计划明细ID")
private Long planDetailsId;
/**
* 来源
*/
@Excel(name = "来源")
private String source;
/**
* 台账ID
*/
@Excel(name = "台账ID")
private Long knifeId;
/**
* rfid
*/
@Excel(name = "rfid")
private String rfid;
/**
* 消耗寿命
*/
@Excel(name = "消耗寿命")
private Integer consumeLife;
/**
* 入库计划编码
*/
@ -71,7 +64,6 @@ public class WmsInPlanDetailEntity extends BaseEntity {
* 入库计划类型
*/
private String planType;
/**
* 库位编码
*/
@ -85,6 +77,11 @@ public class WmsInPlanDetailEntity extends BaseEntity {
*/
private String detailBatch;
private String warehouseName;
private String warehouseCode;
private String warehouseTypeName;
private String warehouseTypeCode;
public void setId(Long id) {
this.id = id;
}
@ -197,6 +194,38 @@ public class WmsInPlanDetailEntity extends BaseEntity {
this.detailBatch = detailBatch;
}
public String getWarehouseName() {
return warehouseName;
}
public void setWarehouseName(String warehouseName) {
this.warehouseName = warehouseName;
}
public String getWarehouseCode() {
return warehouseCode;
}
public void setWarehouseCode(String warehouseCode) {
this.warehouseCode = warehouseCode;
}
public String getWarehouseTypeName() {
return warehouseTypeName;
}
public void setWarehouseTypeName(String warehouseTypeName) {
this.warehouseTypeName = warehouseTypeName;
}
public String getWarehouseTypeCode() {
return warehouseTypeCode;
}
public void setWarehouseTypeCode(String warehouseTypeCode) {
this.warehouseTypeCode = warehouseTypeCode;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@ -208,6 +237,10 @@ public class WmsInPlanDetailEntity extends BaseEntity {
.append("planType", getPlanType())
.append("cellCode", getCellCode())
.append("cellName", getCellName())
.append("warehouseName", getWarehouseName())
.append("warehouseCode", getWarehouseCode())
.append("warehouseTypeName", getWarehouseTypeName())
.append("warehouseTypeCode", getWarehouseTypeCode())
.append("detailBatch", getDetailBatch())
.append("planDetailsId", getPlanDetailsId())
.append("source", getSource())

View File

@ -5,15 +5,10 @@ import java.util.*;
import com.ktg.common.utils.DateUtils;
import com.ktg.mes.md.domain.WmsBusinessType;
import com.ktg.mes.md.mapper.WmsBusinessTypeMapper;
import com.ktg.mes.wm.domain.WmStorageArea;
import com.ktg.mes.wm.domain.WmsInPlan;
import com.ktg.mes.wm.domain.WmsInPlanDetails;
import com.ktg.mes.wm.mapper.WmStorageAreaMapper;
import com.ktg.mes.wm.mapper.WmsInPlanMapper;
import com.ktg.mes.wm.domain.*;
import com.ktg.mes.wm.mapper.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktg.mes.wm.mapper.WmsInPlanDetailEntityMapper;
import com.ktg.mes.wm.domain.WmsInPlanDetailEntity;
import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
/**
@ -26,15 +21,16 @@ import com.ktg.mes.wm.service.IWmsInPlanDetailEntityService;
public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityService {
@Autowired
private WmsInPlanDetailEntityMapper wmsInPlanDetailEntityMapper;
@Autowired
private WmsInPlanMapper wmsInPlanMapper;
@Autowired
private WmsBusinessTypeMapper wmsBusinessTypeMapper;
@Autowired
private WmStorageAreaMapper wmStorageAreaMapper;
@Autowired
private WmStorageLocationMapper wmStorageLocationMapper;
@Autowired
private WmWarehouseMapper wmWarehouseMapper;
/**
* 查询入库计划明细实体
@ -83,6 +79,13 @@ public class WmsInPlanDetailEntityServiceImpl implements IWmsInPlanDetailEntityS
// 设置库位信息
entity.setCellCode(wmStorageArea.getAreaCode());
entity.setCellName(wmStorageArea.getAreaName());
// 查询库区信息
WmStorageLocation wmStorageLocation = wmStorageLocationMapper.selectWmStorageLocationByLocationId(wmStorageArea.getLocationId());
// 查询库房信息
WmWarehouse wmWarehouse = wmWarehouseMapper.selectWmWarehouseByWarehouseId(wmStorageLocation.getWarehouseId());
entity.setWarehouseCode(wmWarehouse.getWarehouseCode());
entity.setWarehouseName(wmWarehouse.getWarehouseName());
entity.setWarehouseTypeCode(wmWarehouse.getAttr2());
}
}