fix: 解决冲突
This commit is contained in:
@@ -5,7 +5,6 @@ import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -14,14 +13,11 @@ import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproducti
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.dao.PdmBiSubpackagerelation;
|
||||
import org.nl.b_lms.pdm.subpackagerelation.service.IpdmBiSubpackagerelationService;
|
||||
import org.nl.b_lms.pdm_manage.enums.SUBEnum;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.dto.SchBaseTaskVO;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
@@ -32,9 +28,7 @@ import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -53,15 +47,14 @@ public class ZxqTask extends AbstractAcsTask {
|
||||
@Resource
|
||||
private ZxDjwTask zxDjwTask;
|
||||
@Resource
|
||||
private DjqTask djqTask;
|
||||
@Resource
|
||||
private IschBaseTaskService taskService;
|
||||
@Resource
|
||||
private IbstIvtPackageinfoivtService packageinfoivtService;
|
||||
@Resource
|
||||
private IpdmBiSubpackagerelationService subpackageRelationService;
|
||||
|
||||
@Resource
|
||||
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||
|
||||
@Resource
|
||||
private IPdmBiSlittingproductionplanService productionPlanService;
|
||||
private final String THIS_CLASS = ZxqTask.class.getName();
|
||||
@@ -126,34 +119,14 @@ public class ZxqTask extends AbstractAcsTask {
|
||||
PdmBiSubpackagerelation pdmBiSubpackagerelation = subpackageRelationService
|
||||
.getOne(new LambdaUpdateWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getContainer_name, schBaseTask.getVehicle_code()), false);
|
||||
if (pdmBiSubpackagerelation != null) {
|
||||
// 装箱区点位,获取装箱区所在区块
|
||||
//查询目标点位信息
|
||||
BstIvtPackageinfoivt zxqPoint = packageinfoivtService.getOne(new LambdaUpdateWrapper<BstIvtPackageinfoivt>().eq(BstIvtPackageinfoivt::getPoint_code, schBaseTask.getPoint_code2()));
|
||||
//查询装箱对接位的木箱号和区域与子卷对应的木箱号与区域是否匹配
|
||||
//装箱对接位的container_name存的是木箱号
|
||||
BstIvtPackageinfoivt zxdjwPoint = packageinfoivtService.getOne(new LambdaUpdateWrapper<BstIvtPackageinfoivt>()
|
||||
.eq(BstIvtPackageinfoivt::getContainer_name, pdmBiSubpackagerelation.getPackage_box_sn()).eq(BstIvtPackageinfoivt::getBlock, zxqPoint.getBlock()));
|
||||
if (zxdjwPoint != null) {
|
||||
//创建搬运任务到装箱位
|
||||
JSONObject jo = new JSONObject();
|
||||
//该子卷改为包装关系
|
||||
pdmBiSubpackagerelation.update(new UpdateWrapper<PdmBiSubpackagerelation>().set("status", SUBEnum.STATUS.code("包装")));
|
||||
BstIvtBoxinfo boxInfo = iBstIvtBoxinfoService.getOne(new LambdaQueryWrapper<BstIvtBoxinfo>().eq(BstIvtBoxinfo::getBox_no, pdmBiSubpackagerelation.getPackage_box_sn()), false);
|
||||
if (boxInfo == null) {
|
||||
throw new BadRequestException("待检区 -> 装箱区,子卷所属的木箱信息不能为空!");
|
||||
}
|
||||
List<PdmBiSubpackagerelation> containerList = subpackageRelationService.list(new LambdaQueryWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getPackage_box_sn, pdmBiSubpackagerelation.getPackage_box_sn()));
|
||||
long packagingCount = containerList.stream().filter(r -> r.getStatus().equals(SUBEnum.STATUS.code("包装"))).count();
|
||||
// 给桁架任务添加尾卷信息
|
||||
if (BigDecimal.valueOf(packagingCount).equals(pdmBiSubpackagerelation.getQuanlity_in_box())) {
|
||||
JSONObject interactionJson = new JSONObject();
|
||||
//是否最后子卷
|
||||
interactionJson.put("lastOne", "1");
|
||||
//木箱最大子卷数
|
||||
interactionJson.put("maxNo", boxInfo.getNum());
|
||||
//木箱实际放的子卷数
|
||||
interactionJson.put("boxNo", pdmBiSubpackagerelation.getQuanlity_in_box());
|
||||
jo.put("interaction_json", interactionJson);
|
||||
}
|
||||
jo.put("task_type", PackageInfoIvtEnum.TASK_TYPE.code("装箱区->装箱对接位"));
|
||||
jo.put("acs_task_type", PackageInfoIvtEnum.ACS_TASK_TYPE.code("桁架任务"));
|
||||
jo.put("point_code1", schBaseTask.getPoint_code2());
|
||||
|
||||
@@ -61,4 +61,4 @@ public enum PackageInfoIvtEnum {
|
||||
}
|
||||
throw new BadRequestException(this.name() + "对应类型" + code + "未定义");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -8,9 +8,10 @@ export function getToken() {
|
||||
}
|
||||
|
||||
export function setToken(token, rememberMe) {
|
||||
const domain = window.localStorage.getItem('sso_domain')
|
||||
if (rememberMe) {
|
||||
return Cookies.set(TokenKey, token)
|
||||
} else return Cookies.set(TokenKey, token)
|
||||
return Cookies.set(TokenKey, token, { domain: domain, path: '/', expires: Config.tokenCookieExpires })
|
||||
} else return Cookies.set(TokenKey, token, { domain: domain, path: '/' })
|
||||
}
|
||||
|
||||
export function removeToken() {
|
||||
|
||||
@@ -18,7 +18,7 @@ const service = axios.create({
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
if (getToken()) {
|
||||
config.headers['Authorization'] = getToken() ? getToken() : undefined // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
config.headers['Authorization'] = getToken() ? 'Bearer ' + getToken() : undefined // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
config.headers['Content-Type'] = 'application/json'
|
||||
return config
|
||||
|
||||
@@ -131,20 +131,18 @@
|
||||
{{ dict.label.point_location[scope.row.point_location] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="up_point_code" width="150" label="上料位点位编码" />
|
||||
<el-table-column prop="up_scroll" width="150" label="上料位轴编码" />
|
||||
<el-table-column prop="up_pcsn" width="150" label="上料位母卷号" />
|
||||
<el-table-column prop="down_point_code" width="150" label="下料位点位编码" />
|
||||
<el-table-column prop="down_scroll" width="150" label="下料位轴编码" />
|
||||
<el-table-column prop="down_pcsn" width="150" label="下料位母卷号" />
|
||||
<el-table-column prop="ext_code" label="外部编码" width="100"/>
|
||||
<el-table-column prop="up_scroll" width="150" label="表处上料位轴编码" />
|
||||
<el-table-column prop="up_pcsn" width="150" label="表处上料位母卷号" />
|
||||
<el-table-column prop="down_scroll" width="150" label="表处下料位轴编码" />
|
||||
<el-table-column prop="down_pcsn" width="150" label="表处下料位母卷号" />
|
||||
<el-table-column prop="ext_code" label="外部编码" />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column prop="is_used" label="是否启用">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.is_used[scope.row.is_used] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="151" show-overflow-tooltip />
|
||||
<el-table-column prop="update_time" label="修改时间" min-width="150" show-overflow-tooltip />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -169,7 +167,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { point_id: null, point_code: null, product_area: null, point_location: null, up_point_code: null, up_scroll: null, up_pcsn: null, down_point_code: null, down_scroll: null, down_pcsn: null, ext_code: null, remark: null, is_used: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
const defaultForm = { point_id: null, point_code: null, product_area: null, point_location: null, up_scroll: null, up_pcsn: null, down_scroll: null, down_pcsn: null, ext_code: null, remark: null, is_used: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
|
||||
export default {
|
||||
name: 'SbPointIvt',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
|
||||
@@ -59,8 +59,22 @@
|
||||
placeholder="请输入子卷号"
|
||||
class="search-input"
|
||||
clearable
|
||||
@clear="clearSearch"
|
||||
@clear="handleInput"
|
||||
@input="handleSearch"
|
||||
/>
|
||||
|
||||
<span class="crud-opts-right2">
|
||||
<el-button
|
||||
slot="left"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-circle-close"
|
||||
size="mini"
|
||||
@click="clearSearch()"
|
||||
>
|
||||
清空
|
||||
</el-button>
|
||||
</span>
|
||||
<span class="crud-opts-right2" style="margin-left: 15px;">
|
||||
<el-button
|
||||
slot="left"
|
||||
@@ -214,12 +228,11 @@ export default {
|
||||
})
|
||||
console.log('multipleSelection2:', this.multipleSelection)
|
||||
const table2 = this.$refs.dis_table
|
||||
this.$nextTick(() => {
|
||||
table2.clearSelection()
|
||||
const selectedRows = this.multipleSelection
|
||||
selectedRows.forEach(row => {
|
||||
table2.toggleRowSelection(row)
|
||||
})
|
||||
table2.clearSelection()
|
||||
const selectedRows = this.multipleSelection
|
||||
selectedRows.forEach(row => {
|
||||
debugger
|
||||
table2.toggleRowSelection(row)
|
||||
})
|
||||
// this.$refs.dis_table.clearSelection()
|
||||
// this.multipleSelection.forEach(row => {
|
||||
@@ -257,6 +270,7 @@ 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)
|
||||
@@ -282,7 +296,7 @@ export default {
|
||||
},
|
||||
// 表格1的行点击事件
|
||||
handleRowClick(scope) {
|
||||
this.clearSelection()
|
||||
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
|
||||
@@ -313,24 +327,24 @@ export default {
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
row.index = rowIndex
|
||||
},
|
||||
async tableChanged(row) {
|
||||
tableChanged(row) {
|
||||
this.form.tableMater = this.currentSelection
|
||||
this.form.checked = row.material_code
|
||||
// 父组件传过来的订单号
|
||||
this.form.sale_order_name = this.sale_order_name
|
||||
try {
|
||||
await crudPackagerelation.updateEntityList(this.form)
|
||||
const res = await crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name })
|
||||
this.openParam = res.content
|
||||
this.clearSelection()
|
||||
crudPackagerelation.updateEntityList(this.form).then(res => {
|
||||
crudSubpackagerelation.queryContainerization({ 'sale_order_name': this.sale_order_name }).then(res => {
|
||||
this.openParam = res.content
|
||||
this.$emit('childEvent')
|
||||
this.clearSelection()
|
||||
})
|
||||
this.form.tableMater = []
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
} catch (error) {
|
||||
console.error('更新数据出错:', error)
|
||||
this.crud.notify('更新数据出错', CRUD.NOTIFICATION_TYPE.ERROR)
|
||||
}
|
||||
})
|
||||
},
|
||||
divStruct() {
|
||||
debugger
|
||||
if (this.currentSelection.length > 0 && this.$refs.dis_table.selection.length > 0) {
|
||||
debugger
|
||||
this.structShow = true
|
||||
this.$refs.child.getMsg(false)
|
||||
} else {
|
||||
@@ -364,7 +378,7 @@ export default {
|
||||
}
|
||||
|
||||
.search-input {
|
||||
width: 251px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.clear-icon {
|
||||
|
||||
@@ -63,9 +63,9 @@ export default {
|
||||
return CRUD({
|
||||
title: '木箱规格',
|
||||
optShow: {},
|
||||
url: 'api/boxinfo',
|
||||
idField: 'material_code',
|
||||
sort: 'material_code,desc',
|
||||
url: 'api/Materialbase',
|
||||
idField: 'material_id',
|
||||
sort: 'material_id,desc',
|
||||
query: { search: '', material_id: '' },
|
||||
crudMethod: { ...crudMaterattr }
|
||||
})
|
||||
@@ -168,6 +168,7 @@ export default {
|
||||
this.$emit('update:dialogShow', false)
|
||||
},
|
||||
submit() {
|
||||
debugger
|
||||
this.rows = this.$refs.table.selection
|
||||
if (this.rows.length <= 0) {
|
||||
this.$message('请先选择木箱信息')
|
||||
|
||||
@@ -158,7 +158,8 @@ const defaultForm = {
|
||||
mass_per_unit_area: null,
|
||||
net_weight: null,
|
||||
length: null,
|
||||
date_of_production: null, is_un_plan_production: null,
|
||||
date_of_production: null,
|
||||
is_un_plan_production: null,
|
||||
un_plan_product_property1: null,
|
||||
un_plan_product_property2: null,
|
||||
un_plan_product_property3: null,
|
||||
@@ -278,6 +279,7 @@ export default {
|
||||
if (this.currentRow !== null) {
|
||||
crud.downloadLoading = true
|
||||
download('/api/packagerelation/download', this.crud.query).then(result => {
|
||||
debugger
|
||||
downloadFile(result, '子卷包装', 'xlsx')
|
||||
crud.downloadLoading = false
|
||||
}).catch(() => {
|
||||
|
||||
@@ -131,6 +131,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
import DateRangePicker from '@/components/DateRangePicker'
|
||||
import crudMaterialbase from '@/views/wms/basedata/master/material/materialbase'
|
||||
import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -191,6 +192,20 @@ export default {
|
||||
crudUserStor.getUserStor().then(res => {
|
||||
this.storList = res
|
||||
})
|
||||
const param = {
|
||||
'materOpt_code': '00'
|
||||
}
|
||||
/* crudMaterialbase.getMaterOptType(param).then(res => {
|
||||
this.class_idStr = res.class_idStr
|
||||
this.crud.query.class_idStr = res.class_idStr
|
||||
this.queryClassId()
|
||||
})*/
|
||||
/* crudBucketrecord.getQualityList().then(res => {
|
||||
this.QualityList = res
|
||||
})
|
||||
crudBucketrecord.getIvtList().then(res => {
|
||||
this.IvtList = res
|
||||
})*/
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
|
||||
Reference in New Issue
Block a user