生产计划管理优化 1.19

zhc4dev
zhc077 2 years ago
parent 9ce997e082
commit 828cd91ea3
  1. 61
      ant-design-vue-jeecg/src/views/productplan/ProductplanManage.vue
  2. 166
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessDataDetail.vue
  3. 95
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  4. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java
  5. 23
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java

@ -48,7 +48,9 @@
> >
<template v-slot:toolbarSuffix> <template v-slot:toolbarSuffix>
<a-button type="primary" icon="plus-circle" @click="syncProductProcess()">读取工序</a-button> <a-button type="primary" icon="plus-circle" @click="syncProductProcess()">读取工序</a-button>
<!-- <a-button type="primary" icon="plus-circle" @click="syncProductProcess()">生成物料单(计划面料&计划辅料)</a-button>--> <a-button type="primary" icon="redo" @click="autoFilling()">自动排位</a-button>
<!-- <a-button type="primary" icon="plus-circle" @click="syncProductProcess()">生成物料单(计划面料&计划辅料)-->
<!-- </a-button>-->
<!-- <a-button type="primary" icon="plus-circle" @click="syncProductProcess()">自动排位(计划面料&计划辅料)</a-button>--> <!-- <a-button type="primary" icon="plus-circle" @click="syncProductProcess()">自动排位(计划面料&计划辅料)</a-button>-->
<a-button type="primary" icon="download" @click="handleExportXls('计划工序')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('计划工序')">导出</a-button>
<a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button> <a-button type="primary" icon="rollback" @click="fanHui()">返回</a-button>
@ -58,11 +60,13 @@
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="jump2FuLiao(props)">辅料</a> <a @click="jump2FuLiao(props)">辅料</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="detail(props)">详情</a> <a @click="viewDetail(props)">详情</a>
</template> </template>
</j-vxe-table> </j-vxe-table>
</div> </div>
<ZyPlanProcessDataDetail ref="zyPlanProcessDataDetail"></ZyPlanProcessDataDetail>
</a-card> </a-card>
</template> </template>
<script> <script>
@ -74,10 +78,14 @@ import {getAction, postAction} from "@api/manage";
import {filterObj, pushIfNotExist, randomNumber, randomUUID} from "@/utils/util"; import {filterObj, pushIfNotExist, randomNumber, randomUUID} from "@/utils/util";
import {JVXETypes} from '@/components/jeecg/JVxeTable' import {JVXETypes} from '@/components/jeecg/JVxeTable'
import Area from "@comp/_util/Area"; import Area from "@comp/_util/Area";
import ZyPlanProcessDataDetail from '@views/productplan/ZyPlanProcessDataDetail'
export default { export default {
name: 'ZyPlanProcessDataList', name: 'ZyPlanProcessDataList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessDataDetail,
},
data() { data() {
return { return {
toolbarConfig: { toolbarConfig: {
@ -106,6 +114,11 @@ export default {
options: [], options: [],
placeholder: '请选择${title}', placeholder: '请选择${title}',
}, },
{
title: '工位序号',
key: 'stationNum',
width: '80px',
},
{ {
title: '设备名称', title: '设备名称',
key: 'machineIds', key: 'machineIds',
@ -158,7 +171,19 @@ export default {
}, },
{key: 'inputProduct', title: '输入产品', width: '150', type: JVXETypes.input}, {key: 'inputProduct', title: '输入产品', width: '150', type: JVXETypes.input},
{key: 'semiProduct', title: '成品/半成品', width: '150', type: JVXETypes.input}, {key: 'semiProduct', title: '成品/半成品', width: '150', type: JVXETypes.input},
// {key: 'semiProduct', title: '', width: '150', type: JVXETypes.input}, {
title: '工人id',
key: 'userIds',
type: JVXETypes.hidden,
},
{
title: '工人名称',
key: 'userNames',
type: JVXETypes.selectMultiple,
width: '200px',
options: [],
placeholder: '请选择${title}',
},
{key: 'totalMachine', title: '机器时长', width: '80', type: JVXETypes.normal}, {key: 'totalMachine', title: '机器时长', width: '80', type: JVXETypes.normal},
{key: 'totalMaunal', title: '人工时长', width: '80', type: JVXETypes.normal}, {key: 'totalMaunal', title: '人工时长', width: '80', type: JVXETypes.normal},
{ {
@ -185,6 +210,7 @@ export default {
planInfo: {}, planInfo: {},
superFieldList: [], superFieldList: [],
stationIdList: [], stationIdList: [],
userIdList: [],
toolsList: [], toolsList: [],
machineList: [], machineList: [],
clickTrue: true, clickTrue: true,
@ -195,6 +221,12 @@ export default {
this.getPlanInfo(this.planId); this.getPlanInfo(this.planId);
}, },
methods: { methods: {
//
viewDetail(props) {
// alert("deatil row id:"+props.row.id);
this.$refs.zyPlanProcessDataDetail.showModal(props.row.id)
},
jump2MianLiao(props) { jump2MianLiao(props) {
console.log("mianLiao() ----props:", props) console.log("mianLiao() ----props:", props)
this.$router.push({ this.$router.push({
@ -216,9 +248,6 @@ export default {
}, },
}); });
}, },
detail(props){
alert("稍等,正在开发中。。。")
},
getPlanInfo(planId) { getPlanInfo(planId) {
// debugger; // debugger;
getAction(this.url.getPlanInfo, {"planId": planId}).then((res) => { getAction(this.url.getPlanInfo, {"planId": planId}).then((res) => {
@ -254,6 +283,7 @@ export default {
} }
}).finally(() => { }).finally(() => {
this.loading = false this.loading = false
this.loadData();
}) })
} }
}) })
@ -263,6 +293,9 @@ export default {
path: '/productplan/ZyProductPlanList', path: '/productplan/ZyProductPlanList',
}); });
}, },
autoFilling() {
alert("请稍等,正在开发中。。。")
},
// //
syncProductProcess() { syncProductProcess() {
@ -304,8 +337,8 @@ export default {
getAction(this.url.list, params).then((res) => { getAction(this.url.list, params).then((res) => {
if (res.success) { if (res.success) {
this.dataSource = res.result.records || res.result; this.dataSource = res.result.records || res.result;
// this.stationId = this.dataSource[0].stationId;
this.stationIdList = this.dataSource[0].stationIdList; this.stationIdList = this.dataSource[0].stationIdList;
this.userIdList = this.dataSource[0].userIdList;
} else { } else {
// this.stationIdCode = "station,station_name,id,depart_id in (select workshop_id from zy_product_plan where id='" + this.planId + "')"; // this.stationIdCode = "station,station_name,id,depart_id in (select workshop_id from zy_product_plan where id='" + this.planId + "')";
this.$message.warning(res.message) this.$message.warning(res.message)
@ -335,7 +368,9 @@ export default {
console.log("handleSelectRowChange-event:", event) console.log("handleSelectRowChange-event:", event)
const {type, row, column, value, target, $table} = event const {type, row, column, value, target, $table} = event
console.log("stationIdList", JSON.stringify(this.stationIdList)); console.log("stationIdList", JSON.stringify(this.stationIdList));
console.log("---------userIdList", JSON.stringify(this.userIdList));
target.$refs.vxe.columns[4].options = this.stationIdList; target.$refs.vxe.columns[4].options = this.stationIdList;
target.$refs.vxe.columns[17].options = this.userIdList;
}, },
/** 当选项被改变时,联动其他组件 */ /** 当选项被改变时,联动其他组件 */
handleValueChange(event) { handleValueChange(event) {
@ -354,14 +389,14 @@ export default {
rowKey: row.id, rowKey: row.id,
values: {machineIds: '', toolsIds: '', machineNames: '', toolsNames: ''} values: {machineIds: '', toolsIds: '', machineNames: '', toolsNames: ''}
}]) }])
target.$refs.vxe.columns[6].options = [] target.$refs.vxe.columns[7].options = []
target.$refs.vxe.columns[8].options = [] target.$refs.vxe.columns[9].options = []
getAction(this.url.stationMachinelist, {"stationId": selectedStationId}).then((res) => { getAction(this.url.stationMachinelist, {"stationId": selectedStationId}).then((res) => {
if (res.success) { if (res.success) {
this.machineList = res.result.records || res.result; this.machineList = res.result.records || res.result;
console.log("machineList", JSON.stringify(this.machineList)) console.log("machineList", JSON.stringify(this.machineList))
target.$refs.vxe.columns[6].options = this.machineList; target.$refs.vxe.columns[7].options = this.machineList;
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
@ -371,7 +406,7 @@ export default {
if (res.success) { if (res.success) {
this.toolsList = res.result.records || res.result; this.toolsList = res.result.records || res.result;
console.log("toolsList", JSON.stringify(this.toolsList)) console.log("toolsList", JSON.stringify(this.toolsList))
target.$refs.vxe.columns[8].options = this.toolsList; target.$refs.vxe.columns[9].options = this.toolsList;
} else { } else {
this.$message.warning(res.message) this.$message.warning(res.message)
} }
@ -385,6 +420,10 @@ export default {
if (column.key === 'toolsNames') { if (column.key === 'toolsNames') {
row.toolsIds = event.value; row.toolsIds = event.value;
} }
if (column.key === 'userNames') {
row.userIds = event.value;
}
} }
}, },
}; };

@ -0,0 +1,166 @@
<template>
<div>
<a-modal
title="生产计划工序详情"
:visible="visible"
:confirm-loading="confirmLoading"
:width='1440'
@ok="handleOk"
@cancel="handleCancel">
<a-spin :spinning="confirmLoading">
<!-- <h3 style="width: 98%;;margin:0px auto">款式详情</h3>-->
<!-- <a-table style="width: 98%;font-size:14px;margin:10px auto" :columns="columns1" :data-source="data1" bordered-->
<!-- rowKey="nums" :pagination="false">-->
<!-- </a-table>-->
<!-- <h3 style="width: 98%;;margin:20px auto 0">管理型号</h3>-->
<a-table :columns="columns" :data-source="data4"
rowKey="id" bordered :pagination="false">
</a-table>
</a-spin>
</a-modal>
</div>
</template>
<script>
import {getAction} from "@api/manage";
export default {
name: "ZyStyleModelListDetails",
data() {
return {
visible: false,
model: {},
confirmLoading: true,
//
columns: [
{
title: '工序名称',
// key: 'processName',
dataIndex: 'processName',
// width: '180px',
align: 'center'
},
{
title: '工位名称',
dataIndex: 'stationName',
// width: '180px',
align: 'center'
},{
title: '工位序号',
dataIndex: 'stationNun',
// width: '180px',
align: 'center'
},
{
title: '设备名称',
dataIndex: 'machineNames',
// width: '180px',
align: 'center'
},
{
title: '工具名称',
dataIndex: 'toolsNames',
// width: '180px',
align: 'center'
},
{
title: '前导工序',
dataIndex: 'proProcessName',
// width: '180px',
align: 'center'
},
{
title: '后导工序',
dataIndex: 'postProcessName',
// width: '180px',
align: 'center'
},
{
dataIndex: 'inputProduct',
title: '输入产品',
// width: '180px',
align: 'center'
},
{
dataIndex: 'semiProduct',
title: '成品/半成品',
// width: '180px',
align: 'center'
},
{
title: '工人名称',
dataIndex: 'userNames',
// width: '180px',
align: 'center'
},
{
dataIndex: 'totalMachine',
title: '机器时长',
width: '80',
align: 'center'
},
{
dataIndex: 'totalMaunal',
title: '人工时长',
width: '80',
align: 'center'
},
],
data4: [],
id: '',
url: {
detail: "/org.jeecg.modules.productplan/zyPlanProcess/list",
},
}
},
methods: {
showModal(id) {
this.visible = true;
this.id = id
this.getDetailData()
},
getDetailData() {
getAction(this.url.detail, {id: this.id}).then((res) => {
// this.confirmLoading = false
if (res.success) {
this.data4 = res.result.records || res.result.records;
console.log("data4------------:" + JSON.stringify(this.data4));
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
},
handleOk(e) {
this.confirmLoading = true;
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
handleCancel(e) {
this.visible = false;
},
},
}
</script>
<style scoped>
.table {
border-color: #d9d9d9;
border-radius: 3px
}
.table td {
padding: 10px 20px;
max-width: 380px;
}
.table td span {
color: #333
}
</style>

@ -19,6 +19,8 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.modules.productplan.entity.ZyPlanProcess; import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.vo.ProcessDataVo; import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService; import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.team.entity.Station; import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.entity.StationMachine; import org.jeecg.modules.team.entity.StationMachine;
import org.jeecg.modules.team.service.IStationMachineService; import org.jeecg.modules.team.service.IStationMachineService;
@ -32,10 +34,7 @@ import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.Arrays; import java.util.*;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
/** /**
* @Description: 生产计划工序 * @Description: 生产计划工序
@ -50,7 +49,8 @@ import java.util.Map;
public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyPlanProcessService> { public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyPlanProcessService> {
@Autowired @Autowired
private IZyPlanProcessService zyPlanProcessService; private IZyPlanProcessService zyPlanProcessService;
@Autowired
private ISysUserService iSysUserService;
@Autowired @Autowired
private IStationService iStationService; private IStationService iStationService;
@Autowired @Autowired
@ -81,39 +81,39 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
} }
// @AutoLog(value = "生产计划工序-分页列表查询") // @AutoLog(value = "生产计划工序-分页列表查询")
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询") // @ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/list2") // @GetMapping(value = "/list2")
public Result<?> queryPageList2(ZyPlanProcess zyPlanProcess, // public Result<?> queryPageList2(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, // @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, // @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { // HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); // QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize); // Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper); // IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
if (!ObjectUtils.isEmpty(pageList)) { // if (!ObjectUtils.isEmpty(pageList)) {
String processIdList = ""; // String processIdList = "";
String stationIdList = ""; // String stationIdList = "";
String machineIdList = ""; // String machineIdList = "";
String toolsIdList = ""; // String toolsIdList = "";
String userIdList = ""; // String userIdList = "";
List<ZyPlanProcess> records = pageList.getRecords(); // List<ZyPlanProcess> records = pageList.getRecords();
for (ZyPlanProcess e : records) { // for (ZyPlanProcess e : records) {
processIdList += e.getProcessId(); // processIdList += e.getProcessId();
stationIdList += e.getStationId(); // stationIdList += e.getStationId();
machineIdList += e.getMachineIds(); // machineIdList += e.getMachineIds();
toolsIdList += e.getToolsIds(); // toolsIdList += e.getToolsIds();
userIdList += e.getUserIds(); // userIdList += e.getUserIds();
} // }
for (ZyPlanProcess e : records) { // for (ZyPlanProcess e : records) {
e.setProcessId(processIdList); // e.setProcessId(processIdList);
e.setStationId(stationIdList); // e.setStationId(stationIdList);
e.setMachineIds(machineIdList); // e.setMachineIds(machineIdList);
e.setToolsIds(toolsIdList); // e.setToolsIds(toolsIdList);
e.setUserIds(userIdList); // e.setUserIds(userIdList);
} // }
} // }
return Result.OK(pageList); // return Result.OK(pageList);
} // }
@ApiOperation(value = "生产计划工序-查询产品工序&计划", notes = "生产计划工序-查询产品工序&计划") @ApiOperation(value = "生产计划工序-查询产品工序&计划", notes = "生产计划工序-查询产品工序&计划")
@GetMapping(value = "/getProcessDatalist") @GetMapping(value = "/getProcessDatalist")
@ -121,11 +121,9 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); // QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize); // Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
// List<ProcessDataVo> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
List<ZyPlanProcess> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess); List<ZyPlanProcess> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess);
// PageList<ProcessDataVo> processDataVos = new PageList<>(processDatalist, processDatalist.size());
return Result.OK(processDatalist); return Result.OK(processDatalist);
} }
@ -195,6 +193,7 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
if (StringUtils.isNotBlank(e.getStationId())) { if (StringUtils.isNotBlank(e.getStationId())) {
Station station = iStationService.getById(e.getStationId()); Station station = iStationService.getById(e.getStationId());
e.setStationName(StringUtils.isNotBlank(station.getStationName()) ? station.getStationName() : ""); e.setStationName(StringUtils.isNotBlank(station.getStationName()) ? station.getStationName() : "");
e.setStationNum(!ObjectUtils.isEmpty(station.getStationNum()) ? station.getStationNum() : null);
if (StringUtils.isNotBlank(e.getMachineIds())) { if (StringUtils.isNotBlank(e.getMachineIds())) {
e.setMachineNames(iStationMachineService.convertByMachineId(e.getStationId())); e.setMachineNames(iStationMachineService.convertByMachineId(e.getStationId()));
@ -206,6 +205,18 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
e.setMachineIds(""); e.setMachineIds("");
e.setToolsIds(""); e.setToolsIds("");
} }
if (StringUtils.isNotBlank(e.getUserIds())) {
StringBuffer stringBuffer = new StringBuffer();
String userNames = "";
List<String> userIds = Arrays.asList(e.getUserIds().split(","));
List<SysUser> userList = iSysUserService.list(new LambdaQueryWrapper<SysUser>().in(SysUser::getId, userIds));
Optional.ofNullable(userList).orElse(new ArrayList<>()).forEach(e2 -> {
stringBuffer.append(e2.getRealname()).append(",");
});
userNames = stringBuffer.toString();
userNames = userNames.substring(0, userNames.length() - 1);
e.setUserNames(userNames);
}
}); });
zyPlanProcessService.saveOrUpdateBatch(zyPlanProcessList); zyPlanProcessService.saveOrUpdateBatch(zyPlanProcessList);
} }

@ -13,6 +13,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.team.vo.GroupxMemeberVo;
import org.jeecg.modules.team.vo.StationVo; import org.jeecg.modules.team.vo.StationVo;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
@ -92,6 +93,9 @@ public class ZyPlanProcess implements Serializable {
@TableField(exist = false) @TableField(exist = false)
private List<StationVo> stationIdList; private List<StationVo> stationIdList;
@TableField(exist = false)
private List<GroupxMemeberVo> userIdList;
/** /**
* 设备id列表 * 设备id列表
*/ */
@ -115,6 +119,7 @@ public class ZyPlanProcess implements Serializable {
@ApiModelProperty(value = "成员id列表") @ApiModelProperty(value = "成员id列表")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
private String userIds; private String userIds;
private String userNames;
/** /**
* 前导工序 * 前导工序
@ -155,4 +160,6 @@ public class ZyPlanProcess implements Serializable {
@Excel(name = "机器时长", width = 15) @Excel(name = "机器时长", width = 15)
@ApiModelProperty(value = "机器时长") @ApiModelProperty(value = "机器时长")
private Integer totalMachine; private Integer totalMachine;
private Integer stationNum;
} }

@ -159,12 +159,28 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
stationVoList.add(stationVo); stationVoList.add(stationVo);
}); });
} }
if (!ObjectUtils.isEmpty(planProcessList)) { Groupx groupx = iGroupxService.getOne(new LambdaQueryWrapper<Groupx>().eq(Groupx::getDepartId, departId).eq(Groupx::getId,zyProductPlan.getTeamId()));
List<GroupxMember> groupMembers = iGroupxMemberService.list(new LambdaQueryWrapper<GroupxMember>().eq(GroupxMember::getGroupxId, groupx.getId()));
List<GroupxMemeberVo> groupxMemeberVoList = new LinkedList<>();
if (!ObjectUtils.isEmpty(groupMembers)) {
groupMembers.forEach(en -> {
GroupxMemeberVo memberVo = new GroupxMemeberVo();
memberVo.setId(en.getUserId());
memberVo.setValue(en.getUserId());
SysUser sysUser = iSysUserService.getById(en.getUserId());
memberVo.setText(StringUtils.isNotBlank(sysUser.getRealname()) ? sysUser.getRealname() : "");
memberVo.setTitle(StringUtils.isNotBlank(sysUser.getRealname()) ? sysUser.getRealname() : "");
groupxMemeberVoList.add(memberVo);
});
}
planProcessList.forEach(e -> { planProcessList.forEach(e -> {
//设备工位列表
e.setStationIdList(stationVoList); e.setStationIdList(stationVoList);
// 设置部门工人列表
e.setUserIdList(groupxMemeberVoList);
}); });
} }
}
return planProcessList; return planProcessList;
} }
@ -172,7 +188,6 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
@Transactional(readOnly = false, rollbackFor = Exception.class) @Transactional(readOnly = false, rollbackFor = Exception.class)
public List<ZyPlanProcess> syncProductBaseProcess(ZyPlanProcess zyPlanProcess) { public List<ZyPlanProcess> syncProductBaseProcess(ZyPlanProcess zyPlanProcess) {
//重新同步数据,先删除之前已同步数据 //重新同步数据,先删除之前已同步数据
this.delSyncData(zyPlanProcess); this.delSyncData(zyPlanProcess);
@ -192,7 +207,7 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
//产品基本工序 //产品基本工序
List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>() List<ZyProductProcess> productProcessesList = iZyProductProcessService.list(new LambdaQueryWrapper<ZyProductProcess>()
.eq(ZyProductProcess::getProductId, zyProduct.getId())); .eq(ZyProductProcess::getProductId, zyProduct.getId()).orderByAsc(ZyProductProcess::getNumber));
if (!ObjectUtils.isEmpty(productProcessesList)) { if (!ObjectUtils.isEmpty(productProcessesList)) {
List<ZyPlanProcess> saveList = new LinkedList<>(); List<ZyPlanProcess> saveList = new LinkedList<>();
productProcessesList.forEach(o -> { productProcessesList.forEach(o -> {

Loading…
Cancel
Save