优化
This commit is contained in:
parent
70f4f0bb27
commit
17e64f7c75
@ -541,6 +541,10 @@ public class BaseKnifeController extends BaseController
|
||||
@PutMapping("/zdTask")
|
||||
public AjaxResult zdTask(@RequestBody WmsZdTask zdTask)
|
||||
{
|
||||
String planSheet = "JHD001";
|
||||
String batchNum = "ZZPC001";
|
||||
|
||||
|
||||
// 判断物料是否充足
|
||||
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(zdTask.getAttr1());
|
||||
BaseKnife baseKnifeWrapper = new BaseKnife();
|
||||
@ -582,7 +586,7 @@ public class BaseKnifeController extends BaseController
|
||||
baseKnife.setKnifeLife(100);
|
||||
baseKnife.setKnifeFineState(0);
|
||||
baseKnife.setIsLocked(0);
|
||||
baseKnife.setPlanSheet("");
|
||||
baseKnife.setPlanSheet(planSheet);
|
||||
baseKnife.setItemOrProduct("PRODUCT");
|
||||
baseKnife.setCreateBy(getUsername());
|
||||
baseKnife.setCreateTime(DateUtils.getNowDate());
|
||||
@ -604,7 +608,7 @@ public class BaseKnifeController extends BaseController
|
||||
outPlanDetail.setMdItemUnit(mdItemOutPlan.getUnitName());
|
||||
outPlanDetail.setPlannedQuantity(mbbProduBom.getStandardDosage() * zdTask.getProductIdQty());
|
||||
outPlanDetail.setRealQuantity(mbbProduBom.getStandardDosage() * zdTask.getProductIdQty());
|
||||
outPlanDetail.setDetailBatchNum("1");
|
||||
outPlanDetail.setDetailBatchNum(batchNum);
|
||||
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaCode(zdTask.getAttr3());
|
||||
outPlanDetail.setWmStorageAreaId(wmStorageArea.getAreaId());
|
||||
outPlanDetail.setWmStorageAreaCode(wmStorageArea.getAreaCode());
|
||||
@ -656,7 +660,7 @@ public class BaseKnifeController extends BaseController
|
||||
wmsOutTask.setTaskNumber(outPlanDetail.getPlannedQuantity());
|
||||
wmsOutTask.setOutNumber(outPlanDetail.getRealQuantity());
|
||||
wmsOutTask.setWmStorageAreaId(outPlanDetail.getWmStorageAreaId());
|
||||
wmsOutTask.setBatchNum("1");
|
||||
wmsOutTask.setBatchNum(batchNum);
|
||||
wmsOutTask.setMdItemId(outPlanDetail.getMdItemId());
|
||||
wmsOutTask.setMdItemCode(outPlanDetail.getMdItemCode());
|
||||
wmsOutTask.setMdItemName(outPlanDetail.getMdItemName());
|
||||
@ -672,7 +676,6 @@ public class BaseKnifeController extends BaseController
|
||||
WmsInPlan wmsInPlan = new WmsInPlan();
|
||||
wmsInPlan.setState("1");
|
||||
wmsInPlan.setSourceType("SGLR");
|
||||
wmsInPlan.setWareId("10");
|
||||
wmsInPlan.setCellCode(zdTask.getAttr3());
|
||||
wmsInPlan.setPlanCode(zdTask.getCode() + random.nextInt(100));
|
||||
wmsInPlan.setRelBillCode("组装单据");
|
||||
@ -683,7 +686,7 @@ public class BaseKnifeController extends BaseController
|
||||
List<WmsInPlanDetails> wmsInPlanDetailsList = new ArrayList<>();
|
||||
WmsInPlanDetails wmsInPlanDetails = new WmsInPlanDetails();
|
||||
wmsInPlanDetails.setMaterialId(zdTask.getmProductId().toString());
|
||||
wmsInPlanDetails.setBatch("10112");
|
||||
wmsInPlanDetails.setBatch(batchNum);
|
||||
wmsInPlanDetails.setCellId("1");
|
||||
wmsInPlanDetails.setQuantity(zdTask.getProductIdQty().toString());
|
||||
wmsInPlanDetails.setQuantityIn(zdTask.getProductIdQty().toString());
|
||||
@ -701,7 +704,7 @@ public class BaseKnifeController extends BaseController
|
||||
wmsInTask.setActualInQuantity(zdTask.getProductIdQty());
|
||||
WmStorageArea wmStorageArea = wmStorageAreaService.selectWmStorageAreaByAreaCode(zdTask.getAttr3());
|
||||
wmsInTask.setCellTgt(wmStorageArea.getAreaId());
|
||||
wmsInTask.setBatch("11011");
|
||||
wmsInTask.setBatch(batchNum);
|
||||
wmsInTask.setMaterialId(zdTask.getmProductId().toString());
|
||||
wmsInTask.setPlanTypeId("9");
|
||||
wmsInTask.setPlanInStatus("1");
|
||||
|
@ -252,10 +252,10 @@ public class MdItemController extends BaseController {
|
||||
mdItem.setItemTypeName(type.getItemTypeName());
|
||||
mdItem.setItemOrProduct(type.getItemOrProduct());
|
||||
}
|
||||
if (StringUtils.isNotNull(mdItem.getSafeStockFlag()) && "N".equals(mdItem.getSafeStockFlag())) {
|
||||
mdItem.setMinStock(0D);
|
||||
mdItem.setMaxStock(0D);
|
||||
}
|
||||
// if (StringUtils.isNotNull(mdItem.getSafeStockFlag()) && "N".equals(mdItem.getSafeStockFlag())) {
|
||||
// mdItem.setMinStock(0D);
|
||||
// mdItem.setMaxStock(0D);
|
||||
// }
|
||||
MdUnitMeasure measure = mdUnitMeasureService.selectMdUnitByCode(mdItem.getUnitOfMeasure());
|
||||
if (StringUtils.isNotNull(measure)) {
|
||||
mdItem.setUnitName(measure.getMeasureName());
|
||||
|
@ -9,7 +9,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 工具台账对象 BASE_KNIFE
|
||||
* 刀具台账对象 BASE_KNIFE
|
||||
*
|
||||
* @author yinjinlu
|
||||
* @date 2024-10-31
|
||||
@ -35,15 +35,15 @@ public class BaseKnife extends BaseEntity {
|
||||
private String rfid;
|
||||
|
||||
/**
|
||||
* 工具编码
|
||||
* 刀具编码
|
||||
*/
|
||||
@Excel(name = "工具编码")
|
||||
@Excel(name = "刀具编码")
|
||||
private String knifeCode;
|
||||
|
||||
/**
|
||||
* 工具名称
|
||||
* 刀具名称
|
||||
*/
|
||||
@Excel(name = "工具名称")
|
||||
@Excel(name = "刀具名称")
|
||||
private String knifeName;
|
||||
|
||||
/**
|
||||
@ -53,9 +53,9 @@ public class BaseKnife extends BaseEntity {
|
||||
private String knifeUnit;
|
||||
|
||||
/**
|
||||
* 工具类型(物料分类)
|
||||
* 刀具类型(物料分类)
|
||||
*/
|
||||
@Excel(name = "工具类型", readConverterExp = "物料分类")
|
||||
@Excel(name = "刀具类型", readConverterExp = "物料分类")
|
||||
private String knifeType;
|
||||
|
||||
/**
|
||||
@ -77,15 +77,15 @@ public class BaseKnife extends BaseEntity {
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 工具寿命
|
||||
* 刀具寿命
|
||||
*/
|
||||
@Excel(name = "工具寿命")
|
||||
@Excel(name = "刀具寿命")
|
||||
private Integer knifeLife;
|
||||
|
||||
/**
|
||||
* 工具状态
|
||||
* 刀具状态
|
||||
*/
|
||||
@Excel(name = "工具状态")
|
||||
@Excel(name = "刀具状态")
|
||||
private Integer knifeFineState;
|
||||
|
||||
/**
|
||||
|
@ -38,7 +38,7 @@ public class MdItem extends BaseEntity {
|
||||
private Double maxStock;
|
||||
private String highValue;
|
||||
private Integer attr1;
|
||||
private String attr2;
|
||||
private Integer attr2;
|
||||
private String attr3;
|
||||
private String attr4;
|
||||
|
||||
@ -195,11 +195,11 @@ public class MdItem extends BaseEntity {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
public Integer getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
|
||||
public void setAttr2(String attr2) {
|
||||
public void setAttr2(Integer attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@
|
||||
max_stock,
|
||||
high_value,
|
||||
attr1,
|
||||
attr2,
|
||||
create_by,
|
||||
create_time,
|
||||
remark
|
||||
@ -183,7 +184,7 @@
|
||||
enable_flag,
|
||||
</if>
|
||||
safe_stock_flag,
|
||||
<if test="safeStockFlag == 'Y'.toString()">
|
||||
<if test="minStock != null and minStock != ''">
|
||||
min_stock,
|
||||
</if>
|
||||
<if test="safeStockFlag == 'Y'.toString()">
|
||||
|
Loading…
Reference in New Issue
Block a user