喻忠伟 1 year ago
commit 3ff3e9426b
  1. 52
      ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList.vue
  2. 314
      ant-design-vue-jeecg/src/views/zyplanprocess/ZyPlanProcessList1.vue
  3. 504
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/ZyOrders.java
  4. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/controller/ProductionLargeScreenController.java
  5. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/service/ProductionLargeService.java
  6. 134
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/service/impl/ProductionLargeServiceImpl.java
  7. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/vo/ProductRecordVo.java
  8. 24
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/controller/ZyPlanProcessController.java
  9. 30
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ChanXianShiShiXinXiVo.java
  10. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/entity/vo/ZyPlanProcessVo.java
  11. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/IZyProductPlanAutoServiceImpl.java
  12. 16
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/vo/WorkOrderVo.java
  13. 32
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workproduct/controller/ZyProductController.java

@ -61,6 +61,15 @@
<template slot="gd" slot-scope="text, record"> <template slot="gd" slot-scope="text, record">
<a @click="gd(record.productNo)">{{text}}</a> <a @click="gd(record.productNo)">{{text}}</a>
</template> </template>
<template slot="cp" slot-scope="text, record">
<a @click="cp(record.productCode)">{{text}}</a>
</template>
<template slot="gx" slot-scope="text, record">
<a @click="gx(record.processId)">{{text}}</a>
</template>
<template slot="sb" slot-scope="text, record">
<a @click="sb(record.machineIds)">{{text}}</a>
</template>
<template slot="nodata" slot-scope="text, record"> <template slot="nodata" slot-scope="text, record">
<span v-if="!text" style="font-size: 14px;font-style: italic;"></span> <span v-if="!text" style="font-size: 14px;font-style: italic;"></span>
<span v-else style="font-size: 14px;font-style: italic;">{{record.proProcessName}}</span> <span v-else style="font-size: 14px;font-style: italic;">{{record.proProcessName}}</span>
@ -107,10 +116,18 @@
</a-table> </a-table>
</div> </div>
<a-tabs defaultActiveKey="1">
<a-tab-pane key="1" tab="已完成" >
<ZyPlanProcessList1 />
</a-tab-pane>
</a-tabs>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal> <zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
<station-modal1 ref="modalFormgw"></station-modal1> <station-modal1 ref="modalFormgw"></station-modal1>
<work-order-modal ref="modalFormgd"></work-order-modal> <work-order-modal ref="modalFormgd"></work-order-modal>
<zy-product-modal ref="modalFormcp"></zy-product-modal>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
<ZyDeviceDetail ref="ZyDeviceDetail"></ZyDeviceDetail>
</a-card> </a-card>
</template> </template>
@ -124,6 +141,10 @@
import StationModal1 from "../team/modules/StationModal1"; import StationModal1 from "../team/modules/StationModal1";
import WorkOrderModal from "../workorder/modules/WorkOrderModal"; import WorkOrderModal from "../workorder/modules/WorkOrderModal";
import {deleteAction, getAction} from "@api/manage"; import {deleteAction, getAction} from "@api/manage";
import ZyProductModal from "../zyWorkProduct/modules/ZyProductModal";
import ZyProcessDetail from "../process/modules/ZyProcessDetail";
import ZyDeviceDetail from "../device/modules/ZyDeviceDetail";
import ZyPlanProcessList1 from './ZyPlanProcessList1'
export default { export default {
name: 'ZyPlanProcessList', name: 'ZyPlanProcessList',
@ -131,7 +152,11 @@
components: { components: {
ZyPlanProcessModal, ZyPlanProcessModal,
StationModal1, StationModal1,
WorkOrderModal WorkOrderModal,
ZyProductModal,
ZyProcessDetail,
ZyDeviceDetail,
ZyPlanProcessList1
}, },
data () { data () {
return { return {
@ -157,12 +182,14 @@
{ {
title:'产品名称', title:'产品名称',
align:"center", align:"center",
dataIndex: 'productCode_dictText' dataIndex: 'productCode_dictText',
scopedSlots: {customRender: 'cp'}
}, },
{ {
title:'工序名称', title:'工序名称',
align:"center", align:"center",
dataIndex: 'processName' dataIndex: 'processName',
scopedSlots: {customRender: 'gx'}
}, },
{ {
title:'工位名称', title:'工位名称',
@ -178,7 +205,8 @@
{ {
title:'设备名称', title:'设备名称',
align:"center", align:"center",
dataIndex: 'machineNames' dataIndex: 'machineNames',
scopedSlots: {customRender: 'sb'}
}, },
/* { /* {
title:'工具名称', title:'工具名称',
@ -267,6 +295,22 @@
} }
}) })
}, },
cp(productCode){
getAction("/zyproduct/zyProduct/queryByProductCode", {productCode: productCode}).then((res) => {
if (res.success) {
this.$refs.modalFormcp.edit(res.result);
this.$refs.modalFormcp.title="详情";
this.$refs.modalFormcp.disableSubmit = true;
} else {
}
})
},
gx(processId){
this.$refs.zyProcessDetail.showModal(processId);
},
sb(machineIds){
this.$refs.ZyDeviceDetail.showModal(machineIds.split(",")[0]);
},
initDictConfig(){ initDictConfig(){
}, },
} }

@ -0,0 +1,314 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称">
<a-input placeholder="请输入工序名称" v-model="queryParam.processName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="设备名称">
<a-input placeholder="请输入设备名称" v-model="queryParam.machineNames"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload"
style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<!-- 高级查询区域 -->
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="gw" slot-scope="text, record">
<a @click="gw(record.stationId)">{{text}}</a>
</template>
<template slot="gd" slot-scope="text, record">
<a @click="gd(record.productNo)">{{text}}</a>
</template>
<template slot="cp" slot-scope="text, record">
<a @click="cp(record.productCode)">{{text}}</a>
</template>
<template slot="gx" slot-scope="text, record">
<a @click="gx(record.processId)">{{text}}</a>
</template>
<template slot="sb" slot-scope="text, record">
<a @click="sb(record.machineIds)">{{text}}</a>
</template>
<template slot="nodata" slot-scope="text, record">
<span v-if="!text" style="font-size: 14px;font-style: italic;"></span>
<span v-else style="font-size: 14px;font-style: italic;">{{record.proProcessName}}</span>
</template>
<template slot="nodata1" slot-scope="text, record">
<span v-if="!text" style="font-size: 14px;font-style: italic;"></span>
<span v-else style="font-size: 14px;font-style: italic;">{{record.postProcessName}}</span>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<zy-plan-process-modal ref="modalForm" @ok="modalFormOk"></zy-plan-process-modal>
<station-modal1 ref="modalFormgw"></station-modal1>
<work-order-modal ref="modalFormgd"></work-order-modal>
<zy-product-modal ref="modalFormcp"></zy-product-modal>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
<ZyDeviceDetail ref="ZyDeviceDetail"></ZyDeviceDetail>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyPlanProcessModal from './modules/ZyPlanProcessModal'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import StationModal1 from "../team/modules/StationModal1";
import WorkOrderModal from "../workorder/modules/WorkOrderModal";
import {deleteAction, getAction} from "@api/manage";
import ZyProductModal from "../zyWorkProduct/modules/ZyProductModal";
import ZyProcessDetail from "../process/modules/ZyProcessDetail";
import ZyDeviceDetail from "../device/modules/ZyDeviceDetail";
export default {
name: 'ZyPlanProcessList1',
mixins:[JeecgListMixin, mixinDevice],
components: {
ZyPlanProcessModal,
StationModal1,
WorkOrderModal,
ZyProductModal,
ZyProcessDetail,
ZyDeviceDetail
},
data () {
return {
description: '生产计划工序管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'工单编号',
align:"center",
dataIndex: 'productNo',
scopedSlots: {customRender: 'gd'}
},
{
title:'产品名称',
align:"center",
dataIndex: 'productCode_dictText',
scopedSlots: {customRender: 'cp'}
},
{
title:'工序名称',
align:"center",
dataIndex: 'processName',
scopedSlots: {customRender: 'gx'}
},
{
title:'工位名称',
align:"center",
dataIndex: 'stationName',
scopedSlots: {customRender: 'gw'}
},
{
title:'工位序号',
align:"center",
dataIndex: 'stationNum'
},
{
title:'设备名称',
align:"center",
dataIndex: 'machineNames',
scopedSlots: {customRender: 'sb'}
},
/* {
title:'工具名称',
align:"center",
dataIndex: 'toolsNames'
},*/
{
title:'前导工序',
align:"center",
dataIndex: 'proProcessName',
scopedSlots: {customRender: 'nodata'}
},
{
title:'后导工序',
align:"center",
dataIndex: 'postProcessName',
scopedSlots: {customRender: 'nodata1'}
},
/* {
title:'输入产品',
align:"center",
dataIndex: 'inputProduct'
},
{
title:'成品/半成品',
align:"center",
dataIndex: 'semiProduct'
},
{
title:'工人名称',
align:"center",
dataIndex: 'userNames'
},*/
{
title:'机器时长',
align:"center",
dataIndex: 'totalMachine'
},
{
title:'人工时长',
align:"center",
dataIndex: 'totalMaunal'
},
/* {
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}*/
],
url: {
list: "/org.jeecg.modules.productplan/zyPlanProcess/pagelist1",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
//this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
gw(stationId){
getAction("/team/station/queryById", {id: stationId}).then((res) => {
if (res.success) {
this.$refs.modalFormgw.edit(res.result);
this.$refs.modalFormgw.title="详情";
} else {
}
})
},
gd(orderCode){
getAction("/workOrder/workOrder/queryByOrderCode", {orderCode: orderCode}).then((res) => {
if (res.success) {
this.$refs.modalFormgd.edit(res.result);
this.$refs.modalFormgd.title="详情";
this.$refs.modalFormgd.disableSubmit = true;
} else {
}
})
},
cp(productCode){
getAction("/zyproduct/zyProduct/queryByProductCode", {productCode: productCode}).then((res) => {
if (res.success) {
this.$refs.modalFormcp.edit(res.result);
this.$refs.modalFormcp.title="详情";
this.$refs.modalFormcp.disableSubmit = true;
} else {
}
})
},
gx(processId){
this.$refs.zyProcessDetail.showModal(processId);
},
sb(machineIds){
this.$refs.ZyDeviceDetail.showModal(machineIds.split(",")[0]);
},
initDictConfig(){
},
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -1,211 +1,293 @@
package org.jeecg.modules.demo.zyorders.entity; package org.jeecg.modules.demo.zyorders.entity;
import java.io.Serializable; import java.io.Serializable;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.jeecgframework.poi.excel.annotation.Excel; import org.springframework.format.annotation.DateTimeFormat;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.annotations.ApiModel; import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModel;
import lombok.EqualsAndHashCode; import io.swagger.annotations.ApiModelProperty;
import lombok.experimental.Accessors; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 订单基本信息管理 /**
* @Author: jeecg-boot * @Description: 订单基本信息管理
* @Date: 2022-12-26 * @Author: jeecg-boot
* @Version: V1.0 * @Date: 2022-12-26
*/ * @Version: V1.0
@Data */
@TableName("zy_orders") @Data
@Accessors(chain = true) @TableName("zy_orders")
@EqualsAndHashCode(callSuper = false) @Accessors(chain = true)
@ApiModel(value="zy_orders对象", description="订单基本信息管理") @EqualsAndHashCode(callSuper = false)
public class ZyOrders implements Serializable { @ApiModel(value = "zy_orders对象", description = "订单基本信息管理")
private static final long serialVersionUID = 1L; public class ZyOrders implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID) /**
@ApiModelProperty(value = "主键") * 主键
private java.lang.String id; */
/**创建人*/ @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "主键")
private java.lang.String createBy; private java.lang.String id;
/**创建日期*/ /**
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") * 创建人
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") */
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建人")
private java.util.Date createTime; private java.lang.String createBy;
/**更新人*/ /**
@ApiModelProperty(value = "更新人") * 创建日期
private java.lang.String updateBy; */
/**更新日期*/ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "创建日期")
@ApiModelProperty(value = "更新日期") private java.util.Date createTime;
private java.util.Date updateTime; /**
/**所属部门*/ * 更新人
@ApiModelProperty(value = "所属部门") */
private java.lang.String sysOrgCode; @ApiModelProperty(value = "更新人")
/**是否子单*/ private java.lang.String updateBy;
@Excel(name = "是否子单", width = 15, dicCode = "ischild") /**
@Dict(dicCode = "ischild") * 更新日期
@ApiModelProperty(value = "是否子单") */
private java.lang.Integer ischild; @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
/**原订单id*/ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "原订单id", width = 15) @ApiModelProperty(value = "更新日期")
@Dict(dictTable = "zy_orders", dicText = "orders_num", dicCode = "id") private java.util.Date updateTime;
@ApiModelProperty(value = "原订单id") /**
private java.lang.String orderId; * 所属部门
/**下单时间*/ */
@Excel(name = "下单时间", width = 15, format = "yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "所属部门")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") private java.lang.String sysOrgCode;
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") /**
@ApiModelProperty(value = "下单时间") * 是否子单
private java.util.Date orderTime; */
/**订单编号*/ @Excel(name = "是否子单", width = 15, dicCode = "ischild")
@Excel(name = "订单编号", width = 15) @Dict(dicCode = "ischild")
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "是否子单")
private java.lang.String ordersNum; private java.lang.Integer ischild;
/**总金额*/ /**
@Excel(name = "总金额", width = 15) * 原订单id
@ApiModelProperty(value = "总金额") */
private java.lang.Double money; @Excel(name = "原订单id", width = 15)
/**运费*/ @Dict(dictTable = "zy_orders", dicText = "orders_num", dicCode = "id")
@Excel(name = "运费", width = 15) @ApiModelProperty(value = "原订单id")
@ApiModelProperty(value = "运费") private java.lang.String orderId;
private java.lang.Double freight; /**
/**促销*/ * 下单时间
@Excel(name = "促销", width = 15) */
@ApiModelProperty(value = "促销") @Excel(name = "下单时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
private java.lang.Double promotionPrice; @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
/**实付款*/ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "实付款", width = 15) @ApiModelProperty(value = "下单时间")
@ApiModelProperty(value = "实付款") private java.util.Date orderTime;
private java.lang.Double actualPayment; /**
/**交货期*/ * 订单编号
@Excel(name = "交货期", width = 15) */
@ApiModelProperty(value = "交货期") @Excel(name = "订单编号", width = 15)
private java.lang.Integer deliveryTime; @ApiModelProperty(value = "订单编号")
/**订单类型*/ private java.lang.String ordersNum;
@Excel(name = "订单类型", width = 15, dicCode = "orders_type") /**
@Dict(dicCode = "orders_type") * 总金额
@ApiModelProperty(value = "订单类型") */
private java.lang.Integer ordersType; @Excel(name = "总金额", width = 15)
/**顾客id*/ @ApiModelProperty(value = "总金额")
@Excel(name = "顾客id", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") private java.lang.Double money;
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id") /**
@ApiModelProperty(value = "顾客id") * 运费
private java.lang.String userId; */
/**商品条目数量*/ @Excel(name = "运费", width = 15)
@Excel(name = "商品条目数量", width = 15) @ApiModelProperty(value = "运费")
@ApiModelProperty(value = "商品条目数量") private java.lang.Double freight;
private java.lang.Integer goodsQuantity; /**
/**支付方式*/ * 促销
@Excel(name = "支付方式", width = 15, dicCode = "payment_method") */
@Dict(dicCode = "payment_method") @Excel(name = "促销", width = 15)
@ApiModelProperty(value = "支付方式") @ApiModelProperty(value = "促销")
private java.lang.Integer paymentMethod; private java.lang.Double promotionPrice;
/**支付状态*/ /**
@Excel(name = "支付状态", width = 15, dicCode = "payment_status") * 实付款
@Dict(dicCode = "payment_status") */
@ApiModelProperty(value = "支付状态") @Excel(name = "实付款", width = 15)
private java.lang.Integer paymentStatus; @ApiModelProperty(value = "实付款")
/**账号/卡号*/ private java.lang.Double actualPayment;
@Excel(name = "账号/卡号", width = 15) /**
@ApiModelProperty(value = "账号/卡号") * 交货期
private java.lang.String accountNo; */
/**开户银行*/ @Excel(name = "交货期", width = 15)
@Excel(name = "开户银行", width = 15) @ApiModelProperty(value = "交货期")
@ApiModelProperty(value = "开户银行") private java.lang.Integer deliveryTime;
private java.lang.String bankDeposit; /**
/**支付时间*/ * 订单类型
@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd hh:mm:ss") */
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @Excel(name = "订单类型", width = 15, dicCode = "orders_type")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @Dict(dicCode = "orders_type")
@ApiModelProperty(value = "支付时间") @ApiModelProperty(value = "订单类型")
private java.util.Date paymentTime; private java.lang.Integer ordersType;
/**城市*/ /**
@Excel(name = "城市", width = 15) * 顾客id
@ApiModelProperty(value = "城市") */
private java.lang.String cityId; @Excel(name = "顾客id", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
/**地址*/ @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@Excel(name = "地址", width = 15) @ApiModelProperty(value = "顾客id")
@ApiModelProperty(value = "地址") private java.lang.String userId;
private java.lang.String address; /**
/**邮编*/ * 商品条目数量
@Excel(name = "邮编", width = 15) */
@ApiModelProperty(value = "邮编") @Excel(name = "商品条目数量", width = 15)
private java.lang.String zipCode; @ApiModelProperty(value = "商品条目数量")
/**收货人*/ private java.lang.Integer goodsQuantity;
@Excel(name = "收货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") /**
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") * 支付方式
@ApiModelProperty(value = "收货人") */
private java.lang.String receiver; @Excel(name = "支付方式", width = 15, dicCode = "payment_method")
/**联系电话*/ @Dict(dicCode = "payment_method")
@Excel(name = "联系电话", width = 15) @ApiModelProperty(value = "支付方式")
@ApiModelProperty(value = "联系电话") private java.lang.Integer paymentMethod;
private java.lang.String mobile; /**
/**发票客户类型*/ * 支付状态
@Excel(name = "发票客户类型", width = 15, dicCode = "invoice_customer_type") */
@Dict(dicCode = "invoice_customer_type") @Excel(name = "支付状态", width = 15, dicCode = "payment_status")
@ApiModelProperty(value = "发票客户类型") @Dict(dicCode = "payment_status")
private java.lang.Integer invoiceCustomerType; @ApiModelProperty(value = "支付状态")
/**发票类型*/ private java.lang.Integer paymentStatus;
@Excel(name = "发票类型", width = 15, dicCode = "invoice_type") /**
@Dict(dicCode = "invoice_type") * 账号/卡号
@ApiModelProperty(value = "发票类型") */
private java.lang.Integer invoiceType; @Excel(name = "账号/卡号", width = 15)
/**纳税人识别号*/ @ApiModelProperty(value = "账号/卡号")
@Excel(name = "纳税人识别号", width = 15) private java.lang.String accountNo;
@ApiModelProperty(value = "纳税人识别号") /**
private java.lang.String taxIdentificationNumber; * 开户银行
/**开票地址*/ */
@Excel(name = "开票地址", width = 15) @Excel(name = "开户银行", width = 15)
@ApiModelProperty(value = "开票地址") @ApiModelProperty(value = "开户银行")
private java.lang.String addressBilling; private java.lang.String bankDeposit;
/**电话*/ /**
@Excel(name = "电话", width = 15) * 支付时间
@ApiModelProperty(value = "电话") */
private java.lang.String telephone; @Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd hh:mm:ss")
/**公户开户行*/ @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "公户开户行", width = 15) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "公户开户行") @ApiModelProperty(value = "支付时间")
private java.lang.String bankPublic; private java.util.Date paymentTime;
/**公户账号*/ /**
@Excel(name = "公户账号", width = 15) * 城市
@ApiModelProperty(value = "公户账号") */
private java.lang.String accountNumber; @Excel(name = "城市", width = 15)
/**销售门店*/ @ApiModelProperty(value = "城市")
@Excel(name = "销售门店", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") private java.lang.String cityId;
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") /**
@ApiModelProperty(value = "销售门店") * 地址
private java.lang.String salesEnterpriseId; */
/**销售员*/ @Excel(name = "地址", width = 15)
@Excel(name = "销售员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") @ApiModelProperty(value = "地址")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") private java.lang.String address;
@ApiModelProperty(value = "销售员") /**
private java.lang.String salespersonId; * 邮编
/**物流企业*/ */
@Excel(name = "物流企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @Excel(name = "邮编", width = 15)
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @ApiModelProperty(value = "邮编")
@ApiModelProperty(value = "物流企业") private java.lang.String zipCode;
private java.lang.String logisticsEnterprisesId; /**
/**交付状态*/ * 收货人
@Excel(name = "交付状态", width = 15, dicCode = "delivery_status") */
@Dict(dicCode = "delivery_status") @Excel(name = "收货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "交付状态") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
private java.lang.Integer deliveryStatus; @ApiModelProperty(value = "收货人")
private java.lang.String receiver;
/**是否虚拟订单*/ /**
@Dict(dicCode = "isvirtual") * 联系电话
@ApiModelProperty(value = "是否虚拟订单") */
private java.lang.String isvirtual; @Excel(name = "联系电话", width = 15)
} @ApiModelProperty(value = "联系电话")
private java.lang.String mobile;
/**
* 发票客户类型
*/
@Excel(name = "发票客户类型", width = 15, dicCode = "invoice_customer_type")
@Dict(dicCode = "invoice_customer_type")
@ApiModelProperty(value = "发票客户类型")
private java.lang.Integer invoiceCustomerType;
/**
* 发票类型
*/
@Excel(name = "发票类型", width = 15, dicCode = "invoice_type")
@Dict(dicCode = "invoice_type")
@ApiModelProperty(value = "发票类型")
private java.lang.Integer invoiceType;
/**
* 纳税人识别号
*/
@Excel(name = "纳税人识别号", width = 15)
@ApiModelProperty(value = "纳税人识别号")
private java.lang.String taxIdentificationNumber;
/**
* 开票地址
*/
@Excel(name = "开票地址", width = 15)
@ApiModelProperty(value = "开票地址")
private java.lang.String addressBilling;
/**
* 电话
*/
@Excel(name = "电话", width = 15)
@ApiModelProperty(value = "电话")
private java.lang.String telephone;
/**
* 公户开户行
*/
@Excel(name = "公户开户行", width = 15)
@ApiModelProperty(value = "公户开户行")
private java.lang.String bankPublic;
/**
* 公户账号
*/
@Excel(name = "公户账号", width = 15)
@ApiModelProperty(value = "公户账号")
private java.lang.String accountNumber;
/**
* 销售门店
*/
@Excel(name = "销售门店", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "销售门店")
private java.lang.String salesEnterpriseId;
/**
* 销售员
*/
@Excel(name = "销售员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "销售员")
private java.lang.String salespersonId;
/**
* 物流企业
*/
@Excel(name = "物流企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "物流企业")
private java.lang.String logisticsEnterprisesId;
/**
* 交付状态
* 未支付0已支付1待生产中2生产中3已发货4已到货5已签收6申请撤销8已撤销9默认0
*/
@Excel(name = "交付状态", width = 15, dicCode = "delivery_status")
@Dict(dicCode = "delivery_status")
@ApiModelProperty(value = "交付状态")
private java.lang.Integer deliveryStatus;
/**
* 是否虚拟订单
*/
@Dict(dicCode = "isvirtual")
@ApiModelProperty(value = "是否虚拟订单")
private java.lang.String isvirtual;
}

@ -47,4 +47,11 @@ public class ProductionLargeScreenController {
return Result.OK(data); return Result.OK(data);
} }
@ApiOperation(value = "生产大屏-工单&订单(转换关系)", notes = "生产大屏-工单&订单(转换关系)")
@GetMapping("/gongdan_data")
public Result<?> gongdan_data() {
Map<String, Object> data = productionLargeService.gongdan_data();
return Result.OK(data);
}
} }

@ -7,4 +7,7 @@ public interface ProductionLargeService {
Map<String, Object> shebeixinxi_data(); Map<String, Object> shebeixinxi_data();
Map<String, Object> shengchanxian_data(); Map<String, Object> shengchanxian_data();
Map<String, Object> gongdan_data();
} }

@ -2,9 +2,11 @@ package org.jeecg.modules.largeScreen.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.models.auth.In; import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.demo.base.entity.ZyProcess; import org.jeecg.modules.demo.base.entity.ZyProcess;
import org.jeecg.modules.demo.base.service.IZyProcessService; import org.jeecg.modules.demo.base.service.IZyProcessService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.device.entity.ZyDevice; import org.jeecg.modules.device.entity.ZyDevice;
import org.jeecg.modules.device.service.IZyDeviceService; import org.jeecg.modules.device.service.IZyDeviceService;
import org.jeecg.modules.largeScreen.service.ProductionLargeService; import org.jeecg.modules.largeScreen.service.ProductionLargeService;
@ -15,11 +17,16 @@ import org.jeecg.modules.productplan.entity.vo.ZyPlanProcessVo;
import org.jeecg.modules.productplan.service.IZyPlanProcessService; import org.jeecg.modules.productplan.service.IZyPlanProcessService;
import org.jeecg.modules.productplan.service.IZyProductPlanService; import org.jeecg.modules.productplan.service.IZyProductPlanService;
import org.jeecg.modules.system.entity.SysDepart; import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysDepartService; import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecg.modules.team.entity.Groupx; import org.jeecg.modules.team.entity.Groupx;
import org.jeecg.modules.team.entity.Station; import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IGroupxService; import org.jeecg.modules.team.service.IGroupxService;
import org.jeecg.modules.team.service.IStationService; import org.jeecg.modules.team.service.IStationService;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workorder.vo.WorkOrderVo;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -27,9 +34,8 @@ import org.springframework.util.ObjectUtils;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.time.LocalDate;
import java.util.*; import java.util.*;
import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors;
@Service @Service
public class ProductionLargeServiceImpl implements ProductionLargeService { public class ProductionLargeServiceImpl implements ProductionLargeService {
@ -54,6 +60,15 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
@Autowired @Autowired
private ISysDepartService iSysDepartService; private ISysDepartService iSysDepartService;
@Autowired
private IWorkOrderService iWorkOrderService;
@Autowired
private ISysUserService iSysUserService;
@Autowired
private IZyOrdersService iZyOrdersService;
// D00010:智能定制生产吊挂系统 // D00010:智能定制生产吊挂系统
private static final String DIAOGUA = "D00010"; private static final String DIAOGUA = "D00010";
@ -107,7 +122,7 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
//吊挂编码 //吊挂编码
diaoguaData.put("code", diaogua.getCode()); diaoguaData.put("code", diaogua.getCode());
//负载 //负载
String ratioStr = getRatioStr(productPlanList.size(), diaogua.getVal()); String ratioStr = getRatioStr(diaogua.getVal(), productPlanList.size());
diaoguaData.put("ratio", ratioStr); diaoguaData.put("ratio", ratioStr);
resultMap.put("diaogua_", diaoguaData); resultMap.put("diaogua_", diaoguaData);
@ -118,7 +133,7 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
//吊挂编码 //吊挂编码
caichuangData.put("code", caichuang.getCode()); caichuangData.put("code", caichuang.getCode());
//负载 //负载
caichuangData.put("ratio", getRatioStr(productPlanList.size(), caichuang.getVal())); caichuangData.put("ratio", getRatioStr(caichuang.getVal(), productPlanList.size()));
resultMap.put("caichuang_", caichuangData); resultMap.put("caichuang_", caichuangData);
} }
@ -164,6 +179,8 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
List<Station> stationGroup = iStationService.list(new LambdaQueryWrapper<Station>().groupBy(Station::getDepartId)); List<Station> stationGroup = iStationService.list(new LambdaQueryWrapper<Station>().groupBy(Station::getDepartId));
Map<String, Object> shengchanxianMap = new LinkedHashMap<>(); Map<String, Object> shengchanxianMap = new LinkedHashMap<>();
// Map<String, Object> chanxianxinxiMap = new LinkedHashMap<>();
List<ProductRecordVo> chanxianxinxiVos = new LinkedList<>();
if (!ObjectUtils.isEmpty(stationGroup)) { if (!ObjectUtils.isEmpty(stationGroup)) {
stationGroup.stream().forEach(station -> { stationGroup.stream().forEach(station -> {
Map<String, Object> departMap = new LinkedHashMap<>(); Map<String, Object> departMap = new LinkedHashMap<>();
@ -181,7 +198,6 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
.last("limit 1")); .last("limit 1"));
if (!ObjectUtils.isEmpty(zyPlanProcess)) { if (!ObjectUtils.isEmpty(zyPlanProcess)) {
ZyProductPlan productPlan = iZyProductPlanService.getById(zyPlanProcess.getPlanId()); ZyProductPlan productPlan = iZyProductPlanService.getById(zyPlanProcess.getPlanId());
// Optional.ofNullable(productPlan).orElseThrow(() -> new JeecgBootException("生产计划:" + zyPlanProcess.getPlanId() + "不存在!"));
ProductRecordVo vo = new ProductRecordVo(); ProductRecordVo vo = new ProductRecordVo();
if (!ObjectUtils.isEmpty(productPlan)) { if (!ObjectUtils.isEmpty(productPlan)) {
vo.setWorkOrder(productPlan.getProductNo()); vo.setWorkOrder(productPlan.getProductNo());
@ -193,14 +209,33 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
vo.setMachineNames(zyPlanProcess.getMachineNames()); vo.setMachineNames(zyPlanProcess.getMachineNames());
vo.setStationNum(zyPlanProcess.getStationNum()); vo.setStationNum(zyPlanProcess.getStationNum());
vo.setProcessStatus(zyPlanProcess.getStatus()); vo.setProcessStatus(zyPlanProcess.getStatus());
ZyPlanProcessVo zyPlanProcessVo = new ZyPlanProcessVo(); productRecordVos.add(vo);
BeanUtils.copyProperties(zyPlanProcess, zyPlanProcessVo);
ZyPlanProcessVo chanxianxinxiVo = new ZyPlanProcessVo();
BeanUtils.copyProperties(vo, chanxianxinxiVo);
ZyProcess zyProcess = iZyProcessService.getById(zyPlanProcess.getProcessId()); ZyProcess zyProcess = iZyProcessService.getById(zyPlanProcess.getProcessId());
if (!ObjectUtils.isEmpty(zyProcess)) { if (!ObjectUtils.isEmpty(zyProcess)) {
zyPlanProcessVo.setImage(zyProcess.getImage()); Map<String, Object> stationInfoMap = new LinkedHashMap<>();
stationInfoMap.put("stationNum", chanxianxinxiVo.getStationNum());
stationInfoMap.put("workOrder", chanxianxinxiVo.getWorkOrder());
stationInfoMap.put("processCode", zyProcess.getProcessCode());
stationInfoMap.put("status", chanxianxinxiVo.getProcessStatus());
stationInfoMap.put("processImage", zyProcess.getImage());
chanxianxinxiVo.setStationInfo(stationInfoMap);
} }
vo.setZyPlanProcessVo(zyPlanProcessVo);
productRecordVos.add(vo); if (StringUtils.isNotBlank(zyPlanProcess.getUserIds())) {
String[] userIdsArrs = zyPlanProcess.getUserIds().split(",");
SysUser sysUser = iSysUserService.getById(userIdsArrs[0]);
Map<String, Object> userInfoMap = new LinkedHashMap<>();
userInfoMap.put("realName", sysUser.getRealname());
userInfoMap.put("userCode", sysUser.getUsername());
userInfoMap.put("stationName", chanxianxinxiVo.getStationName());
userInfoMap.put("status", "工作中");
chanxianxinxiVo.setUserInfo(userInfoMap);
}
chanxianxinxiVos.add(chanxianxinxiVo);
// vo.setZyPlanProcessVo(zyPlanProcessVo);
} else { //没有工序返回工位信息 } else { //没有工序返回工位信息
ProductRecordVo vo = new ProductRecordVo(); ProductRecordVo vo = new ProductRecordVo();
vo.setStationName(obj.getStationName()); vo.setStationName(obj.getStationName());
@ -209,11 +244,84 @@ public class ProductionLargeServiceImpl implements ProductionLargeService {
} }
}); });
SysDepart depart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getId, station.getDepartId())); SysDepart depart = iSysDepartService.getOne(new LambdaQueryWrapper<SysDepart>().eq(SysDepart::getId, station.getDepartId()));
departMap.put(depart.getDepartName(), productRecordVos); List<ProductRecordVo> voList = productRecordVos.stream().filter(v -> StringUtils.isNotBlank(v.getTeamName())).collect(Collectors.toList());
departMap.put(depart.getDepartName() + "#" + voList.get(0).getTeamName(), productRecordVos);
shengchanxianMap.putAll(departMap); shengchanxianMap.putAll(departMap);
}); });
} }
resultMap.put("shengchanxian_", shengchanxianMap); //生产线实时状态
resultMap.put("shengchanxianzhuangtai_", shengchanxianMap);
//产线实时信息
resultMap.put("chanxianxinxi_", chanxianxinxiVos);
return resultMap;
}
@Override
public Map<String, Object> gongdan_data() {
Map<String, Object> resultMap = new HashMap<>();
List<WorkOrderVo> workOrderVoList = new LinkedList<>();
List<ZyOrders> zyOrdersVoList = new LinkedList<>();
List<WorkOrder> workOrderList = iWorkOrderService.list(new LambdaQueryWrapper<WorkOrder>().orderByDesc(WorkOrder::getCreateTime).last("limit 20"));
Map<String, Object> workOrderMap = new HashMap<>();
Optional.ofNullable(workOrderList).orElse(new LinkedList<>()).forEach(workOrder -> {
WorkOrderVo vo = new WorkOrderVo();
BeanUtils.copyProperties(workOrder, vo);
ZyOrders zyOrders = iZyOrdersService.getById(workOrder.getOrdersId());
if (!ObjectUtils.isEmpty(zyOrders)) {
// String ordersNum = zyOrders.getOrdersNum();
// String ordersNum2 = ordersNum.substring(ordersNum.length() - 8);
// zyOrders.setOrdersNum(ordersNum2);
//// vo.setOrdersInfo(zyOrders);
//
// String productCode = vo.getProductCode();
// String code = productCode.substring(productCode.length() - 8);
// vo.setProductCode(code);
workOrderVoList.add(vo);
SysUser sysUser = iSysUserService.getById(zyOrders.getUserId());
if (!ObjectUtils.isEmpty(sysUser) && StringUtils.isNotBlank(sysUser.getRealname())) {
zyOrders.setUserId(sysUser.getRealname());
}
zyOrdersVoList.add(zyOrders);
}
});
//工单列表
Collections.sort(workOrderVoList, Comparator.comparing(WorkOrderVo::getOrdersId));
workOrderMap.put("workOrderList_", workOrderVoList);
//订单列表
Collections.sort(zyOrdersVoList, Comparator.comparing(ZyOrders::getId));
workOrderMap.put("zyOrdersList_", zyOrdersVoList);
//统计占率比
List<WorkOrder> workOrderList1 = iWorkOrderService.list();
if (!ObjectUtils.isEmpty(workOrderList1)) {
// 工单状态值:未排产0、已排产1、生产中2、已完成3、已撤销8、异常9,默认0
//待生产
List<WorkOrder> tobeProducedWorkOrders = Optional.ofNullable(workOrderList1).orElse(new LinkedList<>()).stream().filter(b -> !ObjectUtils.isEmpty(b.getWorkOrderStatus()) && b.getWorkOrderStatus().equals(1)).collect(Collectors.toList());
//已完成
List<WorkOrder> doneWorkOrders = Optional.ofNullable(workOrderList1).orElse(new LinkedList<>()).stream().filter(b -> !ObjectUtils.isEmpty(b.getWorkOrderStatus()) && b.getWorkOrderStatus().equals(3)).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(tobeProducedWorkOrders)) {
resultMap.put("workOrder_tobeDone_ratio_", getRatioStr(tobeProducedWorkOrders.size(), workOrderList1.size()));
}
if (!ObjectUtils.isEmpty(doneWorkOrders)) {
resultMap.put("workOrder_done_ratio_", getRatioStr(doneWorkOrders.size(), workOrderList1.size()));
}
}
List<ZyOrders> zyOrdersList = iZyOrdersService.list();
if (!ObjectUtils.isEmpty(zyOrdersList)) {
// 订单交付状态值:值:未支付0、已支付1、待生产中2、生产中3、已发货4、已到货5、已签收6、申请撤销8、已撤销9,默认0
//待生产
List<ZyOrders> tobeProducedZyOrders = zyOrdersList.stream().filter(b -> !ObjectUtils.isEmpty(b.getDeliveryStatus()) && b.getDeliveryStatus().equals(2)).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(tobeProducedZyOrders)) {
resultMap.put("zyOrder_tobeDone_ratio_", getRatioStr(tobeProducedZyOrders.size(), zyOrdersList.size()));
}
//已完成
List<ZyOrders> doneZyOrders = zyOrdersList.stream().filter(c -> !ObjectUtils.isEmpty(c.getDeliveryStatus()) && c.getDeliveryStatus().equals(5)).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(doneZyOrders)) {
resultMap.put("zyOrder_done_ratio_", getRatioStr(doneZyOrders.size(), zyOrdersList.size()));
}
}
resultMap.putAll(workOrderMap);
return resultMap; return resultMap;
} }
} }

@ -58,6 +58,6 @@ public class ProductRecordVo implements Serializable {
@ApiModelProperty(value = "工位工序状态") @ApiModelProperty(value = "工位工序状态")
private Integer processStatus; private Integer processStatus;
@ApiModelProperty(value = "工序信息Vo") // @ApiModelProperty(value = "工序信息Vo")
private ZyPlanProcessVo zyPlanProcessVo; // private ZyPlanProcessVo zyPlanProcessVo;
} }

@ -381,6 +381,30 @@ public class ZyPlanProcessController extends JeecgController<ZyPlanProcess, IZyP
String stationid = useridstationid.get(username).toString(); String stationid = useridstationid.get(username).toString();
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap()); QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
queryWrapper.eq("station_id",stationid); queryWrapper.eq("station_id",stationid);
queryWrapper.in("status",1,2);
Page<ZyPlanProcess> page = new Page<ZyPlanProcess>(pageNo, pageSize);
IPage<ZyPlanProcess> pageList = zyPlanProcessService.page(page, queryWrapper);
for(int i = 0 ; i < pageList.getRecords().size() ; i++){
ZyProductPlan zyProductPlan = zyProductPlanService.getById(pageList.getRecords().get(i).getPlanId());
pageList.getRecords().get(i).setProductCode(zyProductPlan.getProductNo());
pageList.getRecords().get(i).setProductNo(zyProductPlan.getProductCode());
}
return Result.OK(pageList);
}
@ApiOperation(value = "生产计划工序-分页列表查询", notes = "生产计划工序-分页列表查询")
@GetMapping(value = "/pagelist1")
public Result<?> pagelist1(ZyPlanProcess zyPlanProcess,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
//这里方便获取当前登陆信息
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String username = loginUser.getUsername();
String stationid = useridstationid.get(username).toString();
QueryWrapper<ZyPlanProcess> queryWrapper = QueryGenerator.initQueryWrapper(zyPlanProcess, req.getParameterMap());
queryWrapper.eq("station_id",stationid);
queryWrapper.eq("status",3);
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);
for(int i = 0 ; i < pageList.getRecords().size() ; i++){ for(int i = 0 ; i < pageList.getRecords().size() ; i++){

@ -0,0 +1,30 @@
package org.jeecg.modules.productplan.entity.vo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.team.vo.GroupxMemeberVo;
import org.jeecg.modules.team.vo.StationVo;
import java.io.Serializable;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ChanXianShiShiXinXiVo implements Serializable {
private static final long serialVersionUID = 1009888L;
//工单id
private String workOrderId;
// private String departId;
// private String departName;
//工位
private String stationName;
// private String groupName;
private String processName;
}

@ -3,12 +3,18 @@ package org.jeecg.modules.productplan.entity.vo;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.jeecg.modules.productplan.entity.ZyPlanProcess; import org.jeecg.modules.largeScreen.vo.ProductRecordVo;
import java.util.Map;
import java.util.Objects;
@Data @Data
@ApiModel(value="ZyPlanProcessVo", description="ZyPlanProcessVo") @ApiModel(value = "ZyPlanProcessVo", description = "ZyPlanProcessVo")
public class ZyPlanProcessVo extends ZyPlanProcess { public class ZyPlanProcessVo extends ProductRecordVo {
@ApiModelProperty(value = "工位信息")
private Map<String, Object> stationInfo;
@ApiModelProperty(value = "工序图片") @ApiModelProperty(value = "工人信息")
private String image; private Map<String,Object> userInfo;
} }

@ -338,6 +338,7 @@ public class IZyProductPlanAutoServiceImpl extends ServiceImpl<ZyProductPlanMapp
String code = productCode.substring(productCode.length() - 6); String code = productCode.substring(productCode.length() - 6);
String mess = "工单尾号" + code + ",生产计划已完成制定,请跟进后续生产作业."; String mess = "工单尾号" + code + ",生产计划已完成制定,请跟进后续生产作业.";
zySpeechMessage.setMessage(mess); zySpeechMessage.setMessage(mess);
zySpeechMessage.setMessageType(2);
zySpeechMessage.setWorkorderId(productCode); zySpeechMessage.setWorkorderId(productCode);
iZySpeechMessageService.save(zySpeechMessage); iZySpeechMessageService.save(zySpeechMessage);
} }

@ -0,0 +1,16 @@
package org.jeecg.modules.workorder.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.workorder.entity.WorkOrder;
@Data
@ApiModel(value = "WorkOrderVo", description = "WorkOrderVo")
public class WorkOrderVo extends WorkOrder {
@ApiModelProperty(value = "订单信息")
private ZyOrders ordersInfo;
}

@ -50,7 +50,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyProductController extends JeecgController<ZyProduct, IZyProductService> { public class ZyProductController extends JeecgController<ZyProduct, IZyProductService> {
@Autowired @Autowired
private IZyProductService zyProductService; private IZyProductService zyProductService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -72,7 +72,7 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
IPage<ZyProduct> pageList = zyProductService.selectListPage(page, zyProduct); IPage<ZyProduct> pageList = zyProductService.selectListPage(page, zyProduct);
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 添加 * 添加
* *
@ -86,7 +86,7 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
zyProductService.save(zyProduct); zyProductService.save(zyProduct);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
/** /**
* 编辑 * 编辑
* *
@ -100,7 +100,7 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
zyProductService.updateById(zyProduct); zyProductService.updateById(zyProduct);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -114,7 +114,7 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
zyProductService.removeById(id); zyProductService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
@ -128,7 +128,7 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
this.zyProductService.removeByIds(Arrays.asList(ids.split(","))); this.zyProductService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *
@ -146,6 +146,26 @@ public class ZyProductController extends JeecgController<ZyProduct, IZyProductSe
return Result.OK(zyProduct); return Result.OK(zyProduct);
} }
/**
* 通过productCode查询
*
* @param productCode
* @return
*/
@AutoLog(value = "产品表-通过id查询")
@ApiOperation(value="产品表-通过id查询", notes="产品表-通过id查询")
@GetMapping(value = "/queryByProductCode")
public Result<?> queryByProductCode(@RequestParam(name="productCode",required=true) String productCode,HttpServletRequest req) {
ZyProduct zyProduct = new ZyProduct();
QueryWrapper<ZyProduct> queryWrapper = QueryGenerator.initQueryWrapper(zyProduct, req.getParameterMap());
queryWrapper.eq("product_code",productCode);
zyProduct = zyProductService.list(queryWrapper).get(0);
if(zyProduct==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyProduct);
}
/** /**
* 导出excel * 导出excel
* *

Loading…
Cancel
Save