Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9b88927224
@ -29,6 +29,8 @@ import com.ktg.common.enums.BusinessType;
|
||||
import com.ktg.common.utils.poi.ExcelUtil;
|
||||
import com.ktg.common.core.page.TableDataInfo;
|
||||
|
||||
import static com.ktg.generator.util.MultiModuleCodeGenerator.generateTaskCode;
|
||||
|
||||
/**
|
||||
* 工具台账Controller
|
||||
*
|
||||
@ -166,7 +168,6 @@ public class BaseKnifeController extends BaseController
|
||||
return AjaxResult.error("物料台账查询错误", techBom.getKnifeCode());
|
||||
}
|
||||
|
||||
// 查询台账数据
|
||||
baseKnifeWrapper.setMbbBdMrlId(mdItemTemp.getItemId());
|
||||
baseKnifeWrapper.setIsLocked(0);
|
||||
List<BaseKnife> tempList = this.baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||
@ -184,7 +185,7 @@ public class BaseKnifeController extends BaseController
|
||||
operLogService.insertOperlog(operLog);
|
||||
return AjaxResult.error("Bom头查询错误", techBom.getKnifeCode());
|
||||
}
|
||||
|
||||
|
||||
BomRoute bomRoute = bomRouteService.selectBomRouteByBomRouteId(bomRouteList.get(0).getBomRouteId());
|
||||
|
||||
if (!bomRoute.getMbbProduBomList().isEmpty()) {
|
||||
@ -194,7 +195,6 @@ public class BaseKnifeController extends BaseController
|
||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||
baseKnifeWrapper.setIsLocked(0);
|
||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||
|
||||
if (sitmTempList.isEmpty()){
|
||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||
@ -233,6 +233,7 @@ public class BaseKnifeController extends BaseController
|
||||
// 将物料填入集合
|
||||
tempList.forEach(item -> {
|
||||
if (knifeCount.get() > 0 && tempList.size() > countMap.get(item.getKnifeCode())) {
|
||||
// 更新数量
|
||||
knifeCount.getAndDecrement();
|
||||
countMap.put(item.getKnifeCode(), countMap.get(item.getKnifeCode()) + 1);
|
||||
}
|
||||
@ -241,6 +242,7 @@ public class BaseKnifeController extends BaseController
|
||||
if ("PRODUCT".equals(mdItemTemp.getItemOrProduct())){
|
||||
// 查询整刀bom项, 如果不存在说明 为基础物料,或者没有记录此整刀的组装
|
||||
bomRouteTemp.setMdItemId(mdItemTemp.getItemId());
|
||||
|
||||
List<BomRoute> bomRouteList = bomRouteService.selectBomRouteList(bomRouteTemp);
|
||||
if (bomRouteList.isEmpty()){
|
||||
operLog.setJsonResult("Bom头查询错误:" + techBom.getKnifeCode());
|
||||
@ -257,7 +259,6 @@ public class BaseKnifeController extends BaseController
|
||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||
baseKnifeWrapper.setIsLocked(0);
|
||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||
|
||||
if (sitmTempList.isEmpty()){
|
||||
operLog.setJsonResult("基础物料不足进行组装工具:" + bom.getMdItemCode());
|
||||
@ -378,7 +379,6 @@ public class BaseKnifeController extends BaseController
|
||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||
baseKnifeWrapper.setIsLocked(0);
|
||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||
|
||||
if (sitmTempList.isEmpty()){
|
||||
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||
@ -456,7 +456,6 @@ public class BaseKnifeController extends BaseController
|
||||
baseKnifeWrapper.setMbbBdMrlId(bom.getMdItemId());
|
||||
baseKnifeWrapper.setIsLocked(0);
|
||||
List<BaseKnife> sitmTempList = baseKnifeService.selectBaseKnifeList(baseKnifeWrapper);
|
||||
sitmTempList.removeIf(baseKnife -> baseKnife.getKnifeLife() + baseKnife.getResetCount() * 100 < techBom.getExpendLife());
|
||||
|
||||
if (sitmTempList.isEmpty()){
|
||||
baseKnifeOriginList.forEach(baseKnife -> baseKnifeService.updateBaseKnife(baseKnife));
|
||||
@ -755,7 +754,7 @@ public class BaseKnifeController extends BaseController
|
||||
MdItem mdItem = mdItemService.selectMdItemById(zdTask.getmProductId());
|
||||
WmsInTask wmsInTask = new WmsInTask();
|
||||
wmsInTask.setPlanInId(wmsInPlan.getPlanId());
|
||||
wmsInTask.setPlanInCode(wmsInPlan.getPlanCode());
|
||||
wmsInTask.setPlanInCode(generateTaskCode(wmsInPlan.getPlanCode()));
|
||||
wmsInTask.setMaterialCode(mdItem.getItemCode());
|
||||
wmsInTask.setTaskInQuantity(zdTask.getProductIdQty());
|
||||
wmsInTask.setActualInQuantity(zdTask.getProductIdQty());
|
||||
|
@ -19,6 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="attr2" column="ATTR2" />
|
||||
<result property="attr3" column="ATTR3" />
|
||||
<result property="attr4" column="ATTR4" />
|
||||
<result property="figureCode" column="figure_code" />
|
||||
<result property="planSheet" column="plan_sheet" />
|
||||
<result property="createBy" column="CREATE_BY" />
|
||||
<result property="createTime" column="CREATE_TIME" />
|
||||
@ -29,8 +30,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<sql id="selectWmsZdTaskVo">
|
||||
select wzt.WMS_ZD_TASK_ID, wzt.CODE, wzt."name", wzt.M_PRODUCT_ID, wzt."product_id_qty", wzt.QTY, wzt.PLAN_OUT_ID,
|
||||
wzt.PLAN_OUT_TYPE, wzt.QTY_OK, wzt.REMARK, wzt.ATTR1, wzt.ATTR3, wzt.CREATE_BY, wzt.CREATE_TIME,
|
||||
wzt.UPDATE_BY, wzt.UPDATE_TIME, wzt.STATUS, mi.item_name attr2, btb.figure_code attr4
|
||||
wzt.PLAN_OUT_TYPE, wzt.QTY_OK, wzt.REMARK, wzt.ATTR1, wzt.ATTR3, wzt.ATTR4, wzt.CREATE_BY, wzt.CREATE_TIME,
|
||||
wzt.UPDATE_BY, wzt.UPDATE_TIME, wzt.STATUS, mi.item_name attr2, btb.figure_code plan_sheet
|
||||
from WMS_ZD_TASK wzt
|
||||
left join md_item mi on wzt.m_product_id = mi.item_id
|
||||
left join base_technology_bom btb on btb.technology_bom_id = wzt.attr4
|
||||
@ -50,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="attr1 != null and attr1 != ''"> and ATTR1 = #{attr1}</if>
|
||||
<if test="attr2 != null and attr2 != ''"> and ATTR2 = #{attr2}</if>
|
||||
<if test="attr3 != null and attr3 != ''"> and ATTR3 = #{attr3}</if>
|
||||
<if test="attr4 != null and attr4 != ''"> and ATTR4 = #{attr4}</if>
|
||||
<if test="attr4 != null "> and ATTR4 = #{attr4}</if>
|
||||
<if test="createBy != null and createBy != ''"> and CREATE_BY = #{createBy}</if>
|
||||
<if test="createTime != null and createTime != ''"> and CREATE_TIME = #{createTime}</if>
|
||||
<if test="updateBy != null and updateBy != ''"> and UPDATE_BY = #{updateBy}</if>
|
||||
@ -123,7 +124,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="attr1 != null">ATTR1 = #{attr1},</if>
|
||||
<if test="attr2 != null">ATTR2 = #{attr2},</if>
|
||||
<if test="attr3 != null">ATTR3 = #{attr3},</if>
|
||||
<if test="attr4 != null">ATTR4 = #{attr4},</if>
|
||||
<if test="createBy != null">CREATE_BY = #{createBy},</if>
|
||||
<if test="createTime != null">CREATE_TIME = #{createTime},</if>
|
||||
<if test="updateBy != null">UPDATE_BY = #{updateBy},</if>
|
||||
|
Loading…
Reference in New Issue
Block a user