生产计划-功能 12.16

zhc4dev
zhc077 2 years ago
parent 4ff41ec636
commit 520ce4fb7b
  1. 108
      ant-design-vue-jeecg/src/views/productplan/ZyPlanProcessList.vue
  2. 44
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  3. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/ZyPlanProcess.java
  4. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java

@ -55,16 +55,51 @@
class="j-table-force-nowrap"
@change="handleTableChange">
<!-- <span slot="action1" slot-scope="text, record">-->
<!-- <a @click="jumpPage1(record)">班组成员管理</a>-->
<!-- &lt;!&ndash; <a-divider type="vertical"/>&ndash;&gt;-->
<!-- &lt;!&ndash; <a @click="jumpPage2(record)">工位工具管理</a>&ndash;&gt;-->
<!-- </span>-->
<span slot="processId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="stationId_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="toolsIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="machineIds_dictText" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="userIds" slot-scope="text, record">
<a-popover>
<template slot="content">
<p>{{ text }}</p>
</template>
<a style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;display: inline-block;width: 100px">{{ text }}</a>
</a-popover>
</span>
<span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>-->
<!-- <a-divider type="vertical"/>-->
<!-- <a @click="handleDetail(record)">详情</a>-->
<!-- <a-divider type="vertical"/>-->
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
@ -108,33 +143,39 @@ export default {
}
},
{
title: '生产计划id',
title: '生产计划',
align: "center",
dataIndex: 'planId'
}, {
title: '工位id',
},
{
title: '工序',
align: "center",
dataIndex: 'stationId'
dataIndex: 'processId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '设备id列表',
title: '工位',
align: "center",
dataIndex: 'machineIds'
dataIndex: 'stationId_dictText',
scopedSlots: {customRender: 'stationId_dictText'}
},
{
title: '工具id列表',
title: '设备',
align: "center",
dataIndex: 'toolsIds'
dataIndex: 'machineIds_dictText',
scopedSlots: {customRender: 'machineIds_dictText'}
},
{
title: '工序id列表',
title: '工',
align: "center",
dataIndex: 'processIds'
dataIndex: 'toolsIds_dictText',
scopedSlots: {customRender: 'toolsIds_dictText'}
},
{
title: '成员id列表',
title: '成员',
align: "center",
dataIndex: 'userIds'
dataIndex: 'userIds',
scopedSlots: {customRender: 'userIds'}
},
{
title: '操作',
@ -146,7 +187,8 @@ export default {
}
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
// list: "/org.jeecg.modules.productplan/zyPlanProcess/list",
list: "/org.jeecg.modules.productplan/zyPlanProcess/list2",
productPlanlist: "/org.jeecg.modules.productplan/zyProductPlan/list",
delete: "/org.jeecg.modules.productplan/zyPlanProcess/delete",
deleteBatch: "/org.jeecg.modules.productplan/zyPlanProcess/deleteBatch",
@ -195,17 +237,17 @@ export default {
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// getAction("productPlanlist", {id: record.id}).then((res) => {
// if (res.success) {
// this.$router.push({
// path: '/src/views/processassessment/assessmentCourse/ClassOpeningTaskList',
// query: { //
// }
// });
// } else {
// this.$message.error(res.message)
// }
// });
// },
}
}

@ -16,6 +16,7 @@ import org.jeecg.modules.productplan.entity.ZyPlanProcess;
import org.jeecg.modules.productplan.entity.vo.ProcessDataVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@ -48,7 +49,7 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
* @param req
* @return
*/
@AutoLog(value = "生产计划工序-分页列表查询")
// @AutoLog(value = "生产计划工序-分页列表查询")
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyPlanProcess zyPlanProcess,
@ -61,12 +62,47 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
return Result.OK(pageList);
}
// @AutoLog(value = "生产计划工序-分页列表查询")
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/list2")
public Result<?> queryPageList2(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
if (!ObjectUtils.isEmpty(pageList)) {
String processIdList = "";
String stationIdList = "";
String machineIdList = "";
String toolsIdList = "";
String userIdList = "";
List<ZyPlanProcess> records = pageList.getRecords();
for (ZyPlanProcess e : records) {
processIdList += e.getProcessId();
stationIdList += e.getStationId();
machineIdList += e.getMachineIds();
toolsIdList += e.getToolsIds();
userIdList += e.getUserIds();
}
for (ZyPlanProcess e : records) {
e.setProcessId(processIdList);
e.setStationId(stationIdList);
e.setMachineIds(machineIdList);
e.setToolsIds(toolsIdList);
e.setUserIds(userIdList);
}
}
return Result.OK(pageList);
}
@ApiOperation(value = "生产计划工序-查询产品工序&计划", notes = "生产计划工序-查询产品工序&计划")
@GetMapping(value = "/getProcessDatalist")
public Result<?> getProcessDatalist(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
List<ProcessDataVo> processDatalist = zyPlanProcessService.getProcessDatalist(zyPlanProcess);

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@ -66,34 +67,39 @@ public class ZyPlanProcess implements Serializable {
@Excel(name = "生产计划id", width = 15)
@ApiModelProperty(value = "生产计划id")
private String planId;
/**
* 工序id列表
*/
@Excel(name = "工序id", width = 15)
@ApiModelProperty(value = "工序id列表")
@Dict(dictTable = "zy_process",dicText = "process_name",dicCode = "id")
private String processId;
/**
* 工位id
*/
@Excel(name = "工位id", width = 15)
@ApiModelProperty(value = "工位id")
@Dict(dictTable = "station",dicText = "station_name",dicCode = "id")
private String stationId;
/**
* 设备id列表
*/
@Excel(name = "设备id列表", width = 15)
@ApiModelProperty(value = "设备id列表")
@Dict(dictTable = "zy_devicetype", dicText = "name", dicCode = "id")
private String machineIds;
/**
* 工具id列表
*/
@Excel(name = "工具id列表", width = 15)
@ApiModelProperty(value = "工具id列表")
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
private String toolsIds;
/**
* 工序id列表
*/
@Excel(name = "工序id列表", width = 15)
@ApiModelProperty(value = "工序id列表")
private String processIds;
/**
* 成员id列表
*/
@Excel(name = "成员id列表", width = 15)
@ApiModelProperty(value = "成员id列表")
// @Dict(dictTable = "sys_user", dicText = "name", dicCode = "id")
private String userIds;
}

@ -56,7 +56,6 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
ZyProductPlan zyProductPlan = iZyProductPlanService.getById(planId);
if (ObjectUtils.isEmpty(zyPlanProcess)) {
throw new JeecgBootException("生产计划不存在!");
}
//工单id
String productCode = zyProductPlan.getProductCode();

Loading…
Cancel
Save