Merge branch 'b_lms' of http://121.40.234.130:8899/root/lanzhouhailiang_one into b_lms
This commit is contained in:
@@ -5,18 +5,27 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.mapper.PdmBiSubpackagerelationMapper;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.tasks.first_floor_area.ZxqTask;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxManageService;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
@@ -34,10 +43,15 @@ import java.util.stream.Collectors;
|
||||
public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpackagerelationMapper, PdmBiSubpackagerelation> implements IpdmBiSubpackagerelationService {
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private ZxqTask zxqTask;
|
||||
@Resource
|
||||
private OutBoxManageService outBoxManageService;
|
||||
|
||||
@Resource
|
||||
private PdmBiSubpackagerelationMapper pdmBiSubpackagerelationMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询数据分页
|
||||
*
|
||||
@@ -156,7 +170,9 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
* @param whereJson 分配信息
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateEntityList(JSONObject whereJson) {
|
||||
List<PdmBiSubpackagerelation> packagerelationList= JSONObject.parseArray(whereJson.getJSONArray("tableMater").toJSONString(), PdmBiSubpackagerelation.class);
|
||||
List<String> entityList = JSONObject.parseArray(whereJson.getJSONArray("tableMater").toJSONString(), PdmBiSubpackagerelation.class).stream()
|
||||
.map(PdmBiSubpackagerelation::getWorkorder_id)
|
||||
.map(String::valueOf)
|
||||
@@ -172,11 +188,71 @@ public class PdmBiSubpackagerelationServiceImpl extends ServiceImpl<PdmBiSubpack
|
||||
.map(Integer::parseInt)
|
||||
.max(Integer::compareTo)
|
||||
.orElse(0) + 1;
|
||||
UpdateWrapper<PdmBiSubpackagerelation> updateWrapper = new UpdateWrapper<>();
|
||||
updateWrapper.set("box_type", whereJson.getString("checked"));
|
||||
updateWrapper.set("box_group", maxBoxGroup);
|
||||
updateWrapper.in("workorder_id", entityList);
|
||||
pdmBiSubpackagerelationMapper.update(null, updateWrapper);
|
||||
try {
|
||||
// code:终点,material_code:木箱规格,num: 子卷数
|
||||
UpdateWrapper<PdmBiSubpackagerelation> updateWrapper = new UpdateWrapper<>();
|
||||
String boxType = whereJson.getString("checked");
|
||||
updateWrapper.set("box_type", boxType);
|
||||
updateWrapper.set("box_group", maxBoxGroup);
|
||||
updateWrapper.in("workorder_id", entityList);
|
||||
pdmBiSubpackagerelationMapper.update(null, updateWrapper);
|
||||
//下发空木箱出库任务
|
||||
JSONObject boxInfo = new JSONObject();
|
||||
//todo 测试,暂时默认ZXQ_1_1
|
||||
boxInfo.put("device_code", "ZXQ_1_1");
|
||||
boxInfo.put("material_code", boxType);
|
||||
boxInfo.put("num", entityList.size());
|
||||
// String boxSn = outBoxManageService.outBox(boxInfo);
|
||||
String boxSn = "111";
|
||||
if (StringUtils.isBlank(boxSn)) {
|
||||
throw new BadRequestException("满轴缓存位 -> 待检区,木箱码不能为空!");
|
||||
}
|
||||
//更新子卷包装关系更新木箱号
|
||||
UpdateWrapper<PdmBiSubpackagerelation> updateWrapper1 = new UpdateWrapper<>();
|
||||
updateWrapper1.set("package_box_sn", boxSn);
|
||||
updateWrapper1.in("workorder_id", entityList);
|
||||
pdmBiSubpackagerelationMapper.update(null, updateWrapper1);
|
||||
//创建子卷搬运到装箱区任务
|
||||
// List<BstIvtPackageinfoivt> zxqPointList = packageinfoivtService
|
||||
// .list(new LambdaUpdateWrapper<BstIvtPackageinfoivt>()
|
||||
// .eq(BstIvtPackageinfoivt::getPoint_status, PackageInfoIvtEnum.POINT_STATUS.code("装箱区"))
|
||||
// .eq(BstIvtPackageinfoivt::getIs_used, PackageInfoIvtEnum.IS_USED.code("启用"))
|
||||
// .eq(BstIvtPackageinfoivt::getIvt_status, PackageInfoIvtEnum.IVT_STATUS.code("空"))
|
||||
// .orderByAsc(BstIvtPackageinfoivt::getSort_seq));
|
||||
// //装箱区有点位,就下发
|
||||
// if (CollectionUtils.isNotEmpty(zxqPointList)) {
|
||||
//下发装箱区->装箱对接位桁架任务
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("待检区->装箱区"));
|
||||
//todo 测试,装箱点位-1-1
|
||||
jo.put("point_code1", "ZXQ_1_2");
|
||||
//todo 测试,装箱对接位01
|
||||
jo.put("point_code2", "ZXQ_1_1");
|
||||
jo.put("vehicle_code", packagerelationList.get(0).getContainer_name());
|
||||
jo.put("acs_task_type", PackageInfoIvtEnum.ACS_TASK_TYPE.code("桁架任务"));
|
||||
jo.put("is_send", "1");
|
||||
//todo 测试,扩展参数
|
||||
JSONObject param = new JSONObject();
|
||||
//木箱最大数量
|
||||
param.put("maxNo", "1");
|
||||
//木箱放入子卷数量
|
||||
param.put("boxNo", "1");
|
||||
//是否最后子卷
|
||||
param.put("lastOne", "1");
|
||||
//子卷号
|
||||
param.put("barcode", packagerelationList.get(0).getContainer_name());
|
||||
//子卷长度
|
||||
param.put("len", packagerelationList.get(0).getLength());
|
||||
//托盘类型 1小托盘 2大托盘
|
||||
param.put("containerType", "2");
|
||||
jo.put("request_param", param.toString());
|
||||
zxqTask.createTask(jo);
|
||||
// } else {
|
||||
// throw new BadRequestException("装箱区暂无空余库位!");
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class TwoInBoxTrussTask extends AbstractAcsTask {
|
||||
.class_type(json.getString("task_type"))
|
||||
.dtl_type(String.valueOf(dtl_type))
|
||||
.interaction_json(json.getJSONObject("request_param"))
|
||||
.remark(json.getString("rem ark"))
|
||||
.remark(json.getString("remark"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
}
|
||||
|
||||
@@ -110,25 +110,7 @@ public class DjqTask extends AbstractAcsTask {
|
||||
packageinfoivtService.update(new UpdateWrapper<BstIvtPackageinfoivt>().set("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("空")).set("container_name", null).eq("point_code", schBaseTask.getPoint_code1()));
|
||||
//更新库存记录
|
||||
packageinfoivtService.update(new UpdateWrapper<BstIvtPackageinfoivt>().set("ivt_status", PackageInfoIvtEnum.IVT_STATUS.code("有子卷")).set("container_name", schBaseTask.getVehicle_code()).eq("point_code", schBaseTask.getPoint_code2()));
|
||||
//PC子卷装箱界面确认包装关系,根据子卷号查询包装关系获取木箱规格
|
||||
String vehicleCode = schBaseTask.getVehicle_code();
|
||||
PdmBiSubpackagerelation pdmBiSubpackagerelation = pdmBiSubpackagerelationService
|
||||
.getOne(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, vehicleCode), false);
|
||||
if (pdmBiSubpackagerelation != null) {
|
||||
//如果子卷数大于0与木箱规格不为空,代表已确定子卷包装关系,则查询木箱号并木箱出库
|
||||
if (pdmBiSubpackagerelation.getQuanlity_in_box().compareTo(BigDecimal.ZERO) > 0 && StringUtils.isNotBlank(pdmBiSubpackagerelation.getBox_type())) {
|
||||
//device_code:终点,material_code:木箱规格,num: 子卷数
|
||||
JSONObject boxInfo = new JSONObject();
|
||||
boxInfo.put("device_code", schBaseTask.getPoint_code2());
|
||||
boxInfo.put("material_code", pdmBiSubpackagerelation.getBox_type());
|
||||
boxInfo.put("num", pdmBiSubpackagerelation.getQuanlity_in_box());
|
||||
outBoxManageService.outBox(boxInfo);
|
||||
//todo 4.根据子卷包装关系查询木箱号,调刘先源的空木箱出库服务创建出库任务
|
||||
String boxSn = "MX240115000152";
|
||||
//更新子卷包装关系更新木箱号
|
||||
pdmBiSubpackagerelationService.update(pdmBiSubpackagerelation, new UpdateWrapper<PdmBiSubpackagerelation>().set("package_box_sn", boxSn));
|
||||
}
|
||||
}
|
||||
//5.查询是否有未下发的输送线->满轴位任务,有就下发
|
||||
List<SchBaseTask> notIssueTaskList = taskService.list(new LambdaUpdateWrapper<SchBaseTask>()
|
||||
//确定起点
|
||||
@@ -141,24 +123,6 @@ public class DjqTask extends AbstractAcsTask {
|
||||
jo.put("is_send", true);
|
||||
mzhcwTask.createTask(jo);
|
||||
}
|
||||
//6.创建子卷搬运到装箱区任务
|
||||
List<BstIvtPackageinfoivt> zxqPointList = packageinfoivtService
|
||||
.list(new LambdaUpdateWrapper<BstIvtPackageinfoivt>()
|
||||
.eq(BstIvtPackageinfoivt::getPoint_status, PackageInfoIvtEnum.POINT_STATUS.code("装箱区"))
|
||||
.eq(BstIvtPackageinfoivt::getIs_used, PackageInfoIvtEnum.IS_USED.code("启用"))
|
||||
.eq(BstIvtPackageinfoivt::getIvt_status, PackageInfoIvtEnum.IVT_STATUS.code("空"))
|
||||
.orderByAsc(BstIvtPackageinfoivt::getSort_seq));
|
||||
//装箱区有点位,就下发
|
||||
if (CollectionUtils.isNotEmpty(zxqPointList)) {
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("待检区->装箱区"));
|
||||
jo.put("point_code1", schBaseTask.getPoint_code2());
|
||||
jo.put("point_code2", zxqPointList.get(0).getPoint_code());
|
||||
jo.put("vehicle_code", vehicleCode);
|
||||
zxqTask.createTask(jo);
|
||||
} else {
|
||||
throw new BadRequestException("装箱区暂无空余库位!");
|
||||
}
|
||||
}
|
||||
// 取消
|
||||
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
@@ -46,8 +47,10 @@ public class ZxqTask extends AbstractAcsTask {
|
||||
|
||||
@Resource
|
||||
private ZxDjwTask zxDjwTask;
|
||||
@Resource
|
||||
private DjqTask djqTask;
|
||||
|
||||
|
||||
|
||||
|
||||
@Resource
|
||||
private IschBaseTaskService taskService;
|
||||
@Resource
|
||||
@@ -68,7 +71,7 @@ public class ZxqTask extends AbstractAcsTask {
|
||||
);
|
||||
taskList.forEach(r -> {
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.ext_task_id(r.getTask_id().toString())
|
||||
.ext_task_id(r.getTask_id())
|
||||
.task_code(r.getTask_code())
|
||||
.task_type(r.getAcs_task_type())
|
||||
.start_device_code(r.getPoint_code1())
|
||||
@@ -79,10 +82,10 @@ public class ZxqTask extends AbstractAcsTask {
|
||||
.priority(r.getPriority())
|
||||
.remark(r.getRemark())
|
||||
.product_area(r.getProduct_area())
|
||||
.interaction_json(JSON.parseObject(r.getRequest_param()))
|
||||
.agv_system_type(PackageInfoIvtEnum.AGV_SYSTEM_TYPE.code("1楼叉车系统"))
|
||||
//.truss_type(PackageInfoIvtEnum.TRUSS_TYPE.code("点对点任务"))
|
||||
//.dtl_type(r.getDtl_type())
|
||||
//.params(r.getParams())
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
});
|
||||
@@ -187,6 +190,7 @@ public class ZxqTask extends AbstractAcsTask {
|
||||
.create_name(SecurityUtils.getCurrentUsername())
|
||||
.create_time(DateUtil.now())
|
||||
.is_send(isSend ? "1" : "0")
|
||||
.request_param(form.getString("request_param"))
|
||||
.acs_task_type(StrUtil.isEmpty(form.getString("acs_task_type")) ? PackageInfoIvtEnum.ACS_TASK_TYPE.code("agv任务") : form.getString("acs_task_type"))
|
||||
.task_status(StrUtil.isEmpty(form.getString("task_status")) ? TaskStatusEnum.START_AND_POINT.getCode() : form.getString("task_status"))
|
||||
.product_area(StrUtil.isEmpty(form.getString("product_area")) ? "A1" : form.getString("product_area"))
|
||||
|
||||
@@ -37,10 +37,10 @@ public class AppUpdateController {
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> appUpdate() {
|
||||
JSONObject obj = new JSONObject();
|
||||
// obj.put("versionName","1.0.1");
|
||||
// obj.put("versionName","1.0.1");
|
||||
String app_rul = iSysParamService.findByCode("APP_URL").getValue();
|
||||
String app_version = iSysParamService.findByCode("APP_VERSION").getValue();
|
||||
// obj.put("url","http://172.17.2.163:8080/apk/app.apk");
|
||||
// obj.put("url","http://172.17.2.163:8080/apk/app.apk");
|
||||
obj.put("url", app_rul);
|
||||
obj.put("versionName", app_version);
|
||||
return new ResponseEntity<>(obj, HttpStatus.OK);
|
||||
|
||||
@@ -199,6 +199,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleSearch() {
|
||||
debugger
|
||||
this.multipleSelection = this.multipleSelection.filter(i => { return this.$refs.dis_table.selection.includes(i) })
|
||||
this.currentSelection = [...this.$refs.dis_table.selection]
|
||||
},
|
||||
@@ -231,7 +232,6 @@ export default {
|
||||
table2.clearSelection()
|
||||
const selectedRows = this.multipleSelection
|
||||
selectedRows.forEach(row => {
|
||||
debugger
|
||||
table2.toggleRowSelection(row)
|
||||
})
|
||||
// this.$refs.dis_table.clearSelection()
|
||||
@@ -270,7 +270,6 @@ export default {
|
||||
},
|
||||
getMultipleSelection(multipleSelection) {
|
||||
return multipleSelection.reduce((acc, item) => {
|
||||
debugger
|
||||
const existingItem = acc.find(existing => existing.container_name === item.container_name)
|
||||
if (!existingItem) {
|
||||
acc.push(item)
|
||||
@@ -296,7 +295,6 @@ export default {
|
||||
},
|
||||
// 表格1的行点击事件
|
||||
handleRowClick(scope) {
|
||||
debugger
|
||||
const table2 = this.$refs.dis_table
|
||||
const table2Data = Array.from(this.openParam)
|
||||
const groupValue = scope.box_group === 0 ? scope.container_name : scope.box_group
|
||||
@@ -330,6 +328,7 @@ export default {
|
||||
tableChanged(row) {
|
||||
this.form.tableMater = this.currentSelection
|
||||
this.form.checked = row.material_code
|
||||
debugger
|
||||
this.form.sale_order_name = this.sale_order_name
|
||||
crudPackagerelation.updateEntityList(this.form).then(res => {
|
||||
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name }).then(res => {
|
||||
@@ -342,9 +341,7 @@ export default {
|
||||
})
|
||||
},
|
||||
divStruct() {
|
||||
debugger
|
||||
if (this.currentSelection.length > 0 && this.$refs.dis_table.selection.length > 0) {
|
||||
debugger
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(false)
|
||||
} else {
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
<DivDialog :dialog-show.sync="divShow" :open-param="openParam" :sale_order_name="sale_order_name" @childEvent="handleChildEvent" @AddChanged="querytable" />
|
||||
<DivDialog :dialog-show.sync="divShow" :open-param="openParam" :sale_order_name="this.sale_order_name" @childEvent="handleChildEvent" @AddChanged="querytable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -146,7 +146,7 @@ const defaultForm = {
|
||||
quanlity_in_box: null,
|
||||
box_weight: null,
|
||||
quality_guaran_period: null,
|
||||
sale_order_name: null,
|
||||
sale_order_names: null,
|
||||
customer_name: null,
|
||||
customer_description: null,
|
||||
product_name: null,
|
||||
@@ -225,13 +225,16 @@ export default {
|
||||
},
|
||||
// 双击
|
||||
divOpen(row) {
|
||||
debugger
|
||||
this.sale_order_name = row.sale_order_name
|
||||
crudSubpackagerelation.queryContainerization({ 'sale_order_name': row.sale_order_name }).then(res => {
|
||||
debugger
|
||||
this.openParam = res.content
|
||||
this.divShow = true
|
||||
})
|
||||
},
|
||||
divOpen1() {
|
||||
debugger
|
||||
this.sale_order_name = this.currentRow.sale_order_name
|
||||
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.currentRow.sale_order_name }).then(res => {
|
||||
this.openParam = res.content
|
||||
|
||||
Reference in New Issue
Block a user