Merge remote-tracking branch 'origin/master' into zhc4dev

zhc4dev
zhc077 2 years ago
commit 16d752c3a6
  1. 1
      ant-design-vue-jeecg/package.json
  2. 8
      ant-design-vue-jeecg/src/views/device/modules/ZyDeviceForm.vue
  3. 4
      ant-design-vue-jeecg/src/views/erp/accessories/ZyAccessoriesList.vue
  4. 2
      ant-design-vue-jeecg/src/views/erp/accessories/modules/ZyAccessoriesForm.vue
  5. 10
      ant-design-vue-jeecg/src/views/erp/fabric/modules/ZyFabricTypeForm.vue
  6. 927
      ant-design-vue-jeecg/src/views/process/ZyProcessList.vue
  7. 2
      ant-design-vue-jeecg/src/views/process/modules/ZyProcessForm.vue
  8. 2
      ant-design-vue-jeecg/src/views/system/modules/DepartModal.vue
  9. 86
      jeecg-boot/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/XJobUtils.java
  10. 13
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/controller/ZyAccessoriesController.java
  11. 6
      jeecg-boot/jeecg-boot-module-erp/src/main/java/org/jeecg/modules/demo/accessories/entity/ZyAccessories.java
  12. 8
      jeecg-boot/jeecg-boot-module-system/pom.xml
  13. 38
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
  14. 86
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangerlocation/service/impl/HangerLocationServiceImpl.java
  15. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hangermaker/service/impl/HangerMakerServiceImpl.java
  16. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java
  17. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyProductPlanServiceImpl.java
  18. 1199
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java

@ -11,7 +11,6 @@
}, },
"dependencies": { "dependencies": {
"@antv/data-set": "^0.11.4", "@antv/data-set": "^0.11.4",
"@jeecg/antd-online-mini": "2.4.5-RC",
"@jiaminghi/data-view": "^2.10.0", "@jiaminghi/data-view": "^2.10.0",
"@tinymce/tinymce-vue": "2.1.0", "@tinymce/tinymce-vue": "2.1.0",
"@toast-ui/editor": "^2.1.2", "@toast-ui/editor": "^2.1.2",

@ -77,8 +77,8 @@
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="设备品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status"> <a-form-model-item label="设备品牌" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="status">
<j-dict-select-tag v-model="model.canshu" dictCode="zy_devicebrand,brand,id" <j-dict-select-tag v-model="model.brandId" dictCode="zy_devicebrand,brand,id"
placeholder="设备品牌" @change="canshu"></j-dict-select-tag> placeholder="设备品牌" ></j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -139,7 +139,7 @@
validatorRules: { validatorRules: {
name:[ name:[
{ required: true, message: '请输入设备名称!'}, { required: true, message: '请输入设备名称!'},
{min: 1, max: 50, message: '最多输入50字!', trigger: 'blur'}, {min: 1, max: 200, message: '最多输入200字!', trigger: 'blur'},
], ],
}, },
url: { url: {
@ -161,7 +161,7 @@
methods: { methods: {
canshu(){ canshu(){
this.parm1.brand_id=this.model.canshu this.parm1.brand_id=this.model.canshu
console.log(this.parm1) // console.log(this.parm1)
}, },
add () { add () {
this.edit(this.modelDefault); this.edit(this.modelDefault);

@ -84,9 +84,9 @@
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<!-- <a @click="handleEdit(record)">编辑</a>--> <a @click="handleEdit(record)">编辑</a>
<!-- <a-divider type="vertical" />--> <a-divider type="vertical" />
<!-- --> <!-- -->
<a @click="handleDetail(record.id)">详情</a> <a @click="handleDetail(record.id)">详情</a>

@ -8,7 +8,7 @@
<j-popup <j-popup
v-model="model.typeName" v-model="model.typeName"
field="typeName" field="typeName"
org-fields="nums,contents" org-fields="id,contents"
dest-fields="typeId,typeName" dest-fields="typeId,typeName"
code="zy_accessories_type" code="zy_accessories_type"
:multi="false" :multi="false"

@ -82,7 +82,15 @@
add () { add () {
var n=4 var n=4
getAction(this.url.weiyi,{id:this.model.nums}).then((res)=>{ getAction(this.url.weiyi,{id:this.model.nums}).then((res)=>{
var num=parseInt(res.result,10)+1 var num="";
if(res.message!="")
{
num=parseInt(res.message,10)+1
}else
{
num="0001";
}
var num=parseInt(res.message,10)+1
num=num.toString() num=num.toString()
while(num.length<n){ while(num.length<n){
num="0"+num num="0"+num

@ -1,460 +1,469 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="服装类型"> <a-form-item label="服装类型">
<j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_type,type_name,nums" <j-dict-select-tag placeholder="请选择服装款式" dictCode="zy_cloths_type,type_name,nums"
v-model="styleId"></j-dict-select-tag> v-model="styleId"></j-dict-select-tag>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序代码"> <a-form-item label="工序代码">
<a-input placeholder="工序代码" v-model="processCode"></a-input> <a-input placeholder="工序代码" v-model="processCode"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="工序名称"> <a-form-item label="工序名称">
<a-input placeholder="工序名称" v-model="processName"></a-input> <a-input placeholder="工序名称" v-model="processName"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId"> <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId">
<j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" /> <j-select-depart v-model="enterpriseId" placeholder="请输入企业名称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <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="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<!-- 查询区域-END --> <!-- 查询区域-END -->
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</a-button> <a-button type="primary" icon="download" @click="handleExportXls('zy_process')">导出</a-button>
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> <!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">导入</a-button>--> <!-- <a-button type="primary" icon="import">导入</a-button>-->
<!-- </a-upload>--> <!-- </a-upload>-->
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" <j-super-query :fieldList="superFieldList" ref="superQueryModal"
@handleSuperQuery="handleSuperQuery"></j-super-query> @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"> <a-menu-item key="1" @click="batchDel">
<a-icon type="delete"/> <a-icon type="delete"/>
删除 删除
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-button style="margin-left: 8px"> 批量操作
<a-icon type="down"/> <a-icon type="down"/>
</a-button> </a-button>
</a-dropdown> </a-dropdown>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
style="font-weight: 600">{{ selectedRowKeys.length }}</a> style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a> <a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div> </div>
<a-table <a-table
ref="table" ref="table"
size="middle" size="middle"
:scroll="{x:true}" :scroll="{x:true}"
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div> <div v-html="text"></div>
</template> </template>
<template slot="imgSlot" slot-scope="text"> <template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" <img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"/> style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button <a-button
v-else v-else
:ghost="true" :ghost="true"
type="primary" type="primary"
icon="download" icon="download"
size="small" size="small"
@click="downloadFile(text)"> @click="downloadFile(text)">
下载 下载
</a-button> </a-button>
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="fuzhi(record)">复制</a> <a @click="fuzhi(record)">复制</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="dongzuo(record.id,record.processName)">动作</a> <a @click="dongzuo(record.id,record.processName)">动作</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="fuliao(record.id,record.processName)">面料</a> <a @click="fuliao(record.id,record.processName)">面料</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="mianliao(record.id,record.processName)">辅料</a> <a @click="mianliao(record.id,record.processName)">辅料</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="shebei(record.id,record.processName)">设备</a> <a @click="shebei(record.id,record.processName)">设备</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a @click="gongju(record.id,record.processName)">工具</a> <a @click="gongju(record.id,record.processName)">工具</a>
<a-divider type="vertical"/> <a-divider type="vertical"/>
<a-dropdown> <a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a> <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item> <a-menu-item>
<a @click="openDetail(record.id)">详情</a> <a @click="openDetail(record.id)">详情</a>
</a-menu-item> </a-menu-item>
<a-menu-item> <a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a> <a>删除</a>
</a-popconfirm> </a-popconfirm>
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
</a-dropdown> </a-dropdown>
</span> </span>
<!-- 新建一个管理列--> <!-- 新建一个管理列-->
<!-- <span slot="action1" slot-scope="text, record">--> <!-- <span slot="action1" slot-scope="text, record">-->
<!-- --> <!-- -->
<!-- </span>--> <!-- </span>-->
</a-table> </a-table>
</div> </div>
<ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail> <ZyProcessDetail ref="zyProcessDetail"></ZyProcessDetail>
<zy-process-modal ref="modalForm" @ok="modalFormOk"></zy-process-modal> <zy-process-modal ref="modalForm" @ok="modalFormOk"></zy-process-modal>
<zy-process-modal1 ref="modalForm1" @ok="modalFormOk"></zy-process-modal1> <zy-process-modal1 ref="modalForm1" @ok="modalFormOk"></zy-process-modal1>
<zy-process-modal2 ref="modalForm2" @ok="modalFormOk"></zy-process-modal2> <zy-process-modal2 ref="modalForm2" @ok="modalFormOk"></zy-process-modal2>
<zy-process-modal3 ref="modalForm3" @ok="modalFormOk"></zy-process-modal3> <zy-process-modal3 ref="modalForm3" @ok="modalFormOk"></zy-process-modal3>
<zy-process-modal4 ref="modalForm4" @ok="modalFormOk"></zy-process-modal4> <zy-process-modal4 ref="modalForm4" @ok="modalFormOk"></zy-process-modal4>
<zy-process-modal5 ref="modalForm5" @ok="modalFormOk"></zy-process-modal5> <zy-process-modal5 ref="modalForm5" @ok="modalFormOk"></zy-process-modal5>
</a-card> </a-card>
</template> </template>
<script> <script>
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin' import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin' import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyProcessModal from './modules/ZyProcessModal' import ZyProcessModal from './modules/ZyProcessModal'
import ZyProcessModal1 from './modules/ZyProcessModal1' import ZyProcessModal1 from './modules/ZyProcessModal1'
import ZyProcessModal2 from './modules/ZyProcessModal2' import ZyProcessModal2 from './modules/ZyProcessModal2'
import ZyProcessModal3 from './modules/ZyProcessModal3' import ZyProcessModal3 from './modules/ZyProcessModal3'
import ZyProcessModal4 from './modules/ZyProcessModal4' import ZyProcessModal4 from './modules/ZyProcessModal4'
import ZyProcessModal5 from './modules/ZyProcessModal5' import ZyProcessModal5 from './modules/ZyProcessModal5'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import ZyProcessDetail from './modules/ZyProcessDetail' import ZyProcessDetail from './modules/ZyProcessDetail'
import {getAction} from "@api/manage"; import {getAction} from "@api/manage";
import {filterObj} from "@/utils/util"; import {filterObj} from "@/utils/util";
export default { export default {
name: 'ZyProcessList', name: 'ZyProcessList',
mixins: [JeecgListMixin, mixinDevice], mixins: [JeecgListMixin, mixinDevice],
components: { components: {
ZyProcessModal, ZyProcessModal,
ZyProcessDetail, ZyProcessDetail,
ZyProcessModal1, ZyProcessModal1,
ZyProcessModal2, ZyProcessModal2,
ZyProcessModal3, ZyProcessModal3,
ZyProcessModal4, ZyProcessModal4,
ZyProcessModal5 ZyProcessModal5
}, },
data() { data() {
return { return {
description: 'zy_process管理页面', description: 'zy_process管理页面',
// //
columns: [ columns: [
{ {
title: '#', title: '#',
dataIndex: '', dataIndex: '',
key: 'rowIndex', key: 'rowIndex',
width: 60, width: 60,
align: "center", align: "center",
customRender: function (t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1; return parseInt(index) + 1;
} }
}, },
{ {
title: '工序代码', title: '工序代码',
align: "center", align: "center",
dataIndex: 'processCode' dataIndex: 'processCode'
}, },
{ {
title: '工序名称', title: '工序名称',
align: "center", align: "center",
dataIndex: 'processName' dataIndex: 'processName'
}, },
{ {
title: '企业', title: '企业',
align: "center", align: "center",
dataIndex: 'enterpriseId_dictText' dataIndex: 'enterpriseId_dictText'
}, },
{ {
title: '服装类型', title: '服装类型',
align: "center", align: "center",
dataIndex: 'styleId_dictText' dataIndex: 'styleId_dictText'
}, },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'processDescribe' // dataIndex: 'processDescribe'
// }, // },
// { // {
// title: '', // title: '',
// align: "center", // align: "center",
// dataIndex: 'qualityRequire' // dataIndex: 'qualityRequire'
// }, // },
{ {
title: '工序时间', title: '工序时间',
align: "center", align: "center",
dataIndex: 'processTime' dataIndex: 'processTime'
}, },
{ {
title: '工序单价', title: '工序单价',
align: "center", align: "center",
dataIndex: 'price' dataIndex: 'price'
}, },
{ {
title: '工序等级', title: '工序等级',
align: "center", align: "center",
dataIndex: 'grade_dictText' dataIndex: 'grade_dictText'
}, },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'fabricNum' // dataIndex: 'fabricNum'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'machineId_dictText' // dataIndex: 'machineId_dictText'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'componentId_dictText' // dataIndex: 'componentId_dictText'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'toolId_dictText' // dataIndex: 'toolId_dictText'
// }, // },
// { // {
// title: '', // title: '',
// align: "center", // align: "center",
// dataIndex: 'styleId_dictText' // dataIndex: 'styleId_dictText'
// }, // },
{ {
title: '工段代码', title: '工段代码',
align: "center", align: "center",
dataIndex: 'worksectionCode' dataIndex: 'worksectionCode'
}, },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'contractNum' // dataIndex: 'contractNum'
// }, // },
{ {
title: '合计(手工TMU)', title: '合计(手工TMU)',
align: "center", align: "center",
dataIndex: 'totalManualTmu' dataIndex: 'totalManualTmu'
}, },
{ {
title: '合计(机器TMU)', title: '合计(机器TMU)',
align: "center", align: "center",
dataIndex: 'totalMachineTmu' dataIndex: 'totalMachineTmu'
}, },
{ {
title: '合计(手工秒)', title: '合计(手工秒)',
align: "center", align: "center",
dataIndex: 'totalMaunal' dataIndex: 'totalMaunal'
}, },
{ {
title: '合计(设备秒)', title: '合计(设备秒)',
align: "center", align: "center",
dataIndex: 'totalMachine' dataIndex: 'totalMachine'
}, },
{ {
title: '创建时间', title: '创建时间',
align: "center", align: "center",
dataIndex: 'createTime' dataIndex: 'createTime'
}, },
// { // {
// title: '', // title: '',
// dataIndex: 'action1', // dataIndex: 'action1',
// align:"center", // align:"center",
// fixed:"right", // fixed:"right",
// width:147, // width:147,
// scopedSlots: { customRender: 'action1' } // scopedSlots: { customRender: 'action1' }
// }, // },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align: "center", align: "center",
fixed: "right", fixed: "right",
width: 147, width: 147,
scopedSlots: {customRender: 'action'} scopedSlots: {customRender: 'action'}
} }
], ],
url: { url: {
list: "/base/zyProcess/list", list: "/base/zyProcess/list",
delete: "/base/zyProcess/delete", delete: "/base/zyProcess/delete",
deleteBatch: "/base/zyProcess/deleteBatch", deleteBatch: "/base/zyProcess/deleteBatch",
exportXlsUrl: "/base/zyProcess/exportXls", exportXlsUrl: "/base/zyProcess/exportXls",
importExcelUrl: "base/zyProcess/importExcel", importExcelUrl: "base/zyProcess/importExcel",
}, },
// //
loadRouteType: false, loadRouteType: false,
styleId: "", styleId: "",
processCode:'', processCode:'',
processName:'', processName:'',
enterpriseId:'', enterpriseId:'',
dictOptions: {}, dictOptions: {},
superFieldList: [], superFieldList: [],
} labelCol: {
}, xs: { span: 24 },
created() { sm: { span: 5 },
// queryParam.styleId=this.styleId },
// this.getSuperFieldList(); wrapperCol: {
this.loadParameter(); xs: { span: 24 },
}, sm: { span: 16 },
computed: { },
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; }
}, },
}, created() {
methods: { // queryParam.styleId=this.styleId
initDictConfig() { // this.getSuperFieldList();
}, this.loadParameter();
// },
loadParameter() { computed: {
if (this.loadRouteType == false) { importExcelUrl: function () {
this.styleId = this.$route.query.styleId; return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
console.log(this.styleId) },
this.loadRouteType = true; },
} methods: {
}, initDictConfig() {
loadData(arg) { },
if (!this.url.list) { //
this.$message.error("请设置url.list属性!") loadParameter() {
return if (this.loadRouteType == false) {
} this.styleId = this.$route.query.styleId;
// 1 console.log(this.styleId)
if (arg === 1) { this.loadRouteType = true;
this.ipagination.current = 1; }
} },
this.loadParameter(); loadData(arg) {
var params = this.getQueryParams();// if (!this.url.list) {
this.loading = true; this.$message.error("请设置url.list属性!")
getAction(this.url.list, params).then((res) => { return
if (res.success) { }
//update-begin---author:zhangyafei Date:20201118 for------------ // 1
this.dataSource = res.result.records || res.result; if (arg === 1) {
if (res.result.total) { this.ipagination.current = 1;
this.ipagination.total = res.result.total; }
} else { this.loadParameter();
this.ipagination.total = 0; var params = this.getQueryParams();//
} this.loading = true;
//update-end---author:zhangyafei Date:20201118 for------------ getAction(this.url.list, params).then((res) => {
} else { if (res.success) {
this.$message.warning(res.message) //update-begin---author:zhangyafei Date:20201118 for------------
} this.dataSource = res.result.records || res.result;
}).finally(() => { if (res.result.total) {
this.loading = false this.ipagination.total = res.result.total;
}) } else {
}, this.ipagination.total = 0;
getQueryParams() { }
// //update-end---author:zhangyafei Date:20201118 for------------
let sqp = {} } else {
if (this.superQueryParams) { this.$message.warning(res.message)
sqp['superQueryParams'] = encodeURI(this.superQueryParams) }
sqp['superQueryMatchType'] = this.superQueryMatchType }).finally(() => {
} this.loading = false
var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters); })
param.field = this.getQueryField(); },
param.pageNo = this.ipagination.current; getQueryParams() {
param.pageSize = this.ipagination.pageSize; //
param.styleId = this.styleId; let sqp = {}
param.enterpriseId=this.enterpriseId; if (this.superQueryParams) {
param.processCode=this.processCode; sqp['superQueryParams'] = encodeURI(this.superQueryParams)
param.processName=this.processName; sqp['superQueryMatchType'] = this.superQueryMatchType
return filterObj(param); }
}, var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters);
searchReset() { param.field = this.getQueryField();
this.styleId = '' param.pageNo = this.ipagination.current;
this.processCode = '' param.pageSize = this.ipagination.pageSize;
this.processName = '' param.styleId = this.styleId;
this.enterpriseId = '' param.enterpriseId=this.enterpriseId;
this.loadData(1); param.processCode=this.processCode;
}, param.processName=this.processName;
getSuperFieldList() { return filterObj(param);
let fieldList = []; },
fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''}) searchReset() {
fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''}) this.styleId = ''
fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''}) this.processCode = ''
fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''}) this.processName = ''
fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''}) this.enterpriseId = ''
fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''}) this.loadData(1);
fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''}) },
fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''}) getSuperFieldList() {
fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''}) let fieldList = [];
fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''}) fieldList.push({type: 'string', value: 'processCode', text: '工序代码', dictCode: ''})
fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''}) fieldList.push({type: 'string', value: 'processName', text: '工序名称', dictCode: ''})
fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'}) fieldList.push({type: 'string', value: 'processDescribe', text: '工艺描述', dictCode: ''})
fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''}) fieldList.push({type: 'string', value: 'mkExplain', text: '做工说明', dictCode: ''})
fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''}) fieldList.push({type: 'string', value: 'qualityRequire', text: '品质要求', dictCode: ''})
fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''}) fieldList.push({type: 'string', value: 'processTime', text: '工序时间', dictCode: ''})
fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''}) fieldList.push({type: 'double', value: 'price', text: '工序单价', dictCode: ''})
fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''}) fieldList.push({type: 'string', value: 'grade', text: '工序等级', dictCode: ''})
fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''}) fieldList.push({type: 'string', value: 'fabricNum', text: '面料代码', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''}) fieldList.push({type: 'string', value: 'fabricGrade', text: '面料等级', dictCode: ''})
fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''}) fieldList.push({type: 'int', value: 'needlePitch', text: '针距(针/厘米)', dictCode: ''})
fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'}) fieldList.push({type: 'string', value: 'machineId', text: '机器名', dictCode: 'zy_machine,name,id'})
fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''}) fieldList.push({type: 'string', value: 'manualWide', text: '手工宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''}) fieldList.push({type: 'double', value: 'manualTime', text: '手工时间', dictCode: ''})
fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'}) fieldList.push({type: 'int', value: 'machineSpeed', text: '机器转速', dictCode: ''})
fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''}) fieldList.push({type: 'string', value: 'machineWide', text: '机器宽放', dictCode: ''})
fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''}) fieldList.push({type: 'double', value: 'machineTime', text: '机器时间', dictCode: ''})
fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''}) fieldList.push({type: 'string', value: 'machineFloat', text: '机器浮于', dictCode: ''})
fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''}) fieldList.push({type: 'string', value: 'bundleWide', text: '绑包宽放', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''}) fieldList.push({type: 'string', value: 'bundleTime', text: '绑包时间', dictCode: ''})
fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''}) fieldList.push({type: 'string', value: 'componentId', text: '部件表', dictCode: 'zy_cloths_component,parts_name,id'})
fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''}) fieldList.push({type: 'int', value: 'isBottleneck', text: '是否为瓶颈工序', dictCode: ''})
fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''}) fieldList.push({type: 'string', value: 'enterpriseId', text: '企业名称', dictCode: ''})
fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''}) fieldList.push({type: 'string', value: 'toolId', text: '工具名称', dictCode: 'zy_tool,name,id'})
this.superFieldList = fieldList fieldList.push({type: 'string', value: 'styleId', text: '款式名称', dictCode: ''})
}, fieldList.push({type: 'string', value: 'worksectionCode', text: '工段代码', dictCode: ''})
openDetail(id) { fieldList.push({type: 'string', value: 'contractNum', text: '合同号', dictCode: ''})
this.$refs.zyProcessDetail.showModal(id) fieldList.push({type: 'int', value: 'totalManualTmu', text: '合计(手工TMU)', dictCode: ''})
// this.$children[0].showModal(id) fieldList.push({type: 'int', value: 'totalMachineTmu', text: '合计(机器TMU)', dictCode: ''})
} fieldList.push({type: 'int', value: 'totalMaunal', text: '合计(手工秒)', dictCode: ''})
} fieldList.push({type: 'int', value: 'totalMachine', text: '合计(机器秒)', dictCode: ''})
} fieldList.push({type: 'string', value: 'image', text: '图片', dictCode: ''})
</script> fieldList.push({type: 'string', value: 'vedio', text: '视频', dictCode: ''})
<style scoped> this.superFieldList = fieldList
@import '~@assets/less/common.less'; },
openDetail(id) {
this.$refs.zyProcessDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style> </style>

@ -9,7 +9,7 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId"> <a-form-model-item label="服装类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeName ">
<j-popup <j-popup
v-model="model.typeName" v-model="model.typeName"
field="type_name" field="type_name"

@ -41,7 +41,7 @@
:labelCol="labelCol" :labelCol="labelCol"
:wrapperCol="wrapperCol" :wrapperCol="wrapperCol"
label="缩写"> label="缩写">
<a-input placeholder="请输入手机号" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/> <a-input placeholder="请输入缩写" v-decorator="['departNameAbbr', validatorRules.departNameAbbr ]"/>
</a-form-item> </a-form-item>
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsPicture"> <a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="goodsPicture">
<j-image-upload isMultiple v-model="model.goodsPicture" ></j-image-upload> <j-image-upload isMultiple v-model="model.goodsPicture" ></j-image-upload>

@ -0,0 +1,86 @@
package org.jeecg.common.util;
import org.springframework.util.StringUtils;
import java.beans.PropertyEditorSupport;
import java.sql.Timestamp;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Random;
/**
* 定时类使用的方法
*/
public class XJobUtils{
/**
* 获取间隔时间
* @param start_Date
* @return
*/
public static Date randomIntervaltime(Date start_Date,int s,int e)
{
//将时间转为long类型
long start=start_Date.getTime();
//获取30-180秒对应毫秒
long intervalTime=randInt(s*60,s*60)*1000;
//总共花费时长
long timeMillis =start+intervalTime;
return longToDate(timeMillis);
}
/**
* 其实这是基于一个公式 如果要取一个范围在[min,max]之间的随机整数那么公式如下
* @param min
* @param max
* @return
*/
public static int randInt(int min,int max)
{
Random rand = new Random();
// nextInt通常不包含顶部值,因此加上1使其包含
int randomNum = rand.nextInt((max - min) + 1) + min;
return randomNum;
}
//将long转为日期
public static Date longToDate(long lo)
{
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//long转Date
Date date = null;
try {
date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(sd.format(new Date(lo)));
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
//间隔时间(秒)
public static long dateToLong(Date s,Date e)
{
long sl=s.getTime();
long el=e.getTime();
long r=el-sl;
return (el-sl)/1000;
}
//随机暂停s-e分钟()
public static void sleepTime(int s ,int e) throws InterruptedException {
Thread.sleep(randInt(60*1000*s,60*1000*e));
}
}

@ -50,7 +50,7 @@ import org.jeecg.common.aspect.annotation.AutoLog;
public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyAccessoriesService> { public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyAccessoriesService> {
@Autowired @Autowired
private IZyAccessoriesService zyAccessoriesService; private IZyAccessoriesService zyAccessoriesService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -73,7 +73,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper); IPage<ZyAccessories> pageList = zyAccessoriesService.page(page, queryWrapper);
return Result.OK(pageList); return Result.OK(pageList);
} }
/** /**
* 添加 * 添加
* *
@ -93,7 +93,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.save(zyAccessories); zyAccessoriesService.save(zyAccessories);
return Result.OK("添加成功!"); return Result.OK("添加成功!");
} }
/** /**
* 编辑 * 编辑
* *
@ -106,6 +106,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
public Result<?> edit(@RequestBody ZyAccessories zyAccessories) { public Result<?> edit(@RequestBody ZyAccessories zyAccessories) {
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("contents",zyAccessories.getContents()); queryWrapper.eq("contents",zyAccessories.getContents());
queryWrapper.ne("id",zyAccessories.getId());
int a= zyAccessoriesService.count(queryWrapper); int a= zyAccessoriesService.count(queryWrapper);
if(a>=1){ if(a>=1){
return Result.error("名称重复,请修改后重试!!"); return Result.error("名称重复,请修改后重试!!");
@ -113,7 +114,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.updateById(zyAccessories); zyAccessoriesService.updateById(zyAccessories);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
} }
/** /**
* 通过id删除 * 通过id删除
* *
@ -127,7 +128,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
zyAccessoriesService.removeById(id); zyAccessoriesService.removeById(id);
return Result.OK("删除成功!"); return Result.OK("删除成功!");
} }
/** /**
* 批量删除 * 批量删除
* *
@ -141,7 +142,7 @@ public class ZyAccessoriesController extends JeecgController<ZyAccessories, IZyA
this.zyAccessoriesService.removeByIds(Arrays.asList(ids.split(","))); this.zyAccessoriesService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!"); return Result.OK("批量删除成功!");
} }
/** /**
* 通过id查询 * 通过id查询
* *

@ -38,8 +38,12 @@ public class ZyAccessories implements Serializable {
/**类型id*/ /**类型id*/
@Excel(name = "类型id", width = 15) @Excel(name = "类型id", width = 15)
@ApiModelProperty(value = "类型id") @ApiModelProperty(value = "类型id")
@Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "nums") @Dict(dictTable = "zy_accessories_type", dicText = "contents", dicCode = "id")
private java.lang.String typeId; private java.lang.String typeId;
/**类型名称*/
@Excel(name = "类型名称", width = 15)
@ApiModelProperty(value = "类型名称")
private java.lang.String typeName;
/**编号*/ /**编号*/
@Excel(name = "编号", width = 15) @Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号") @ApiModelProperty(value = "编号")

@ -135,10 +135,10 @@
<version>5.2.4.RELEASE</version> <version>5.2.4.RELEASE</version>
</dependency> </dependency>
<!-- 引入定时任务依赖 --> <!-- 引入定时任务依赖 -->
<!-- <dependency>--> <dependency>
<!-- <groupId>org.jeecgframework.boot</groupId>--> <groupId>org.jeecgframework.boot</groupId>
<!-- <artifactId>jeecg-boot-starter-job</artifactId>--> <artifactId>jeecg-boot-starter-job</artifactId>
<!-- </dependency>--> </dependency>
<!-- https://mvnrepository.com/artifact/com.jacob/jacob 语音合成 --> <!-- https://mvnrepository.com/artifact/com.jacob/jacob 语音合成 -->
<dependency> <dependency>

@ -188,20 +188,30 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
zyOrders.setOrdersType(zyOrdersJk.getOrdersType()); zyOrders.setOrdersType(zyOrdersJk.getOrdersType());
zyOrders.setUserId(zyOrdersJk.getUserId()); zyOrders.setUserId(zyOrdersJk.getUserId());
zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity()); zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId()); //顾客地址
zyOrders.setCityId(customerReceivingAddress.getCityId()); if(zyOrdersJk.getAddressId()!=null&&zyOrdersJk.getAddressId()!="")
zyOrders.setAddress(customerReceivingAddress.getAddress()); {
zyOrders.setZipCode(customerReceivingAddress.getZipCode()); CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId());
zyOrders.setReceiver(zyOrdersJk.getReceiver()); zyOrders.setCityId(customerReceivingAddress.getCityId());
zyOrders.setMobile(customerReceivingAddress.getMobile()); zyOrders.setAddress(customerReceivingAddress.getAddress());
CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId()); zyOrders.setZipCode(customerReceivingAddress.getZipCode());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType())); zyOrders.setReceiver(zyOrdersJk.getReceiver());
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType())); zyOrders.setMobile(customerReceivingAddress.getMobile());
zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber()); }
zyOrders.setAddressBilling(customerInvoice.getAddress());
zyOrders.setTelephone(customerInvoice.getTelephone()); //顾客发票
zyOrders.setBankPublic(customerInvoice.getBankDeposit()); if(zyOrdersJk.getInvoiceId()!=null&&zyOrdersJk.getInvoiceId()!="")
zyOrders.setAccountNumber(customerInvoice.getAccountNumber()); {
CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber());
zyOrders.setAddressBilling(customerInvoice.getAddress());
zyOrders.setTelephone(customerInvoice.getTelephone());
zyOrders.setBankPublic(customerInvoice.getBankDeposit());
zyOrders.setAccountNumber(customerInvoice.getAccountNumber());
}
zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId()); zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId());
zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId()); zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId()); zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());

@ -1,6 +1,7 @@
package org.jeecg.modules.hangerlocation.service.impl; package org.jeecg.modules.hangerlocation.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.common.util.XJobUtils;
import org.jeecg.modules.hangerlocation.entity.HangerLocation; import org.jeecg.modules.hangerlocation.entity.HangerLocation;
import org.jeecg.modules.hangerlocation.mapper.HangerLocationMapper; import org.jeecg.modules.hangerlocation.mapper.HangerLocationMapper;
import org.jeecg.modules.hangerlocation.service.IHangerLocationService; import org.jeecg.modules.hangerlocation.service.IHangerLocationService;
@ -16,6 +17,8 @@ import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import static org.jeecg.common.util.XJobUtils.dateToLong;
/** /**
* @Description: 衣架定位表 * @Description: 衣架定位表
* @Author: jeecg-boot * @Author: jeecg-boot
@ -56,7 +59,7 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
//服装进入制作工艺过程 //服装进入制作工艺过程
long timeMillis = System.currentTimeMillis(); long timeMillis = System.currentTimeMillis();
//将获取时间转为日期类型 //将获取时间转为日期类型
Date start_time=longToDate(timeMillis); Date start_time=XJobUtils.longToDate(timeMillis);
QueryWrapper<HangerMaker> qwhm=new QueryWrapper(); QueryWrapper<HangerMaker> qwhm=new QueryWrapper();
qwhm.eq("order_code",entry.getKey()); qwhm.eq("order_code",entry.getKey());
HangerMaker hm=hangerMakerMapper.selectOne(qwhm); HangerMaker hm=hangerMakerMapper.selectOne(qwhm);
@ -86,13 +89,13 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
/**到达时间*/ /**到达时间*/
model.setArrivalTime(start_time); model.setArrivalTime(start_time);
/**离开时间*/ /**离开时间*/
Date end_time=returnEXtime(start_time); Date end_time= XJobUtils.randomIntervaltime(start_time,3,5);
model.setLeaveTime(end_time); model.setLeaveTime(end_time);
/**时长*/ /**时长*/
model.setDuration(dateToLong(start_time,end_time)+""); model.setDuration(dateToLong(start_time,end_time)+"");
//执行下一步间隔时间 //执行下一步间隔时间
start_time=returnIntervaltime(end_time); start_time=XJobUtils.randomIntervaltime(end_time,1,3);
hangerLocationMapper.insert(model); hangerLocationMapper.insert(model);
} }
// System.out.println(entry.getKey()); // System.out.println(entry.getKey());
@ -101,81 +104,4 @@ public class HangerLocationServiceImpl extends ServiceImpl<HangerLocationMapper,
} }
} }
/**
* 获取制作时间
* @param start_Date
* @return
*/
private Date returnEXtime(Date start_Date)
{
//将时间转为long类型
long start=start_Date.getTime();
//获取5-20分钟对应毫秒
long intervalTime=randInt(300,1200)*1000;
//总共花费时长
long timeMillis =start+intervalTime;
//实例化日期对象
Calendar calendar = Calendar.getInstance();
//将毫秒值传入转Date类型
calendar.setTimeInMillis(timeMillis);
//Calendar --> date
Date time = calendar.getTime();
return time;
}
/**
* 获取间隔时间
* @param start_Date
* @return
*/
private Date returnIntervaltime(Date start_Date)
{
//将时间转为long类型
long start=start_Date.getTime();
//获取30-180秒对应毫秒
long intervalTime=randInt(30,180)*1000;
//总共花费时长
long timeMillis =start+intervalTime;
return longToDate(timeMillis);
}
/**
* 其实这是基于一个公式 如果要取一个范围在[min,max]之间的随机整数那么公式如下
* @param min
* @param max
* @return
*/
private int randInt(int min,int max)
{
Random rand = new Random();
// nextInt通常不包含顶部值,因此加上1使其包含
int randomNum = rand.nextInt((max - min) + 1) + min;
return randomNum;
}
//将long转为日期
private Date longToDate(long lo)
{
SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//long转Date
Date date = null;
try {
date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(sd.format(new Date(lo)));
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
//将日期转为long
private long dateToLong(Date s,Date e)
{
long sl=s.getTime();
long el=e.getTime();
long r=el-sl;
return (el-sl)/1000;
}
} }

@ -30,6 +30,9 @@ public class HangerMakerServiceImpl extends ServiceImpl<HangerMakerMapper, Hange
@Autowired @Autowired
private WorkOrderMapper workOrderMapper; private WorkOrderMapper workOrderMapper;
/** /**
* 自动衣架绑定工单 * 自动衣架绑定工单
* @param woList * @param woList

@ -372,11 +372,20 @@ public class ZyPlanProcessServiceImpl extends ServiceImpl<ZyPlanProcessMapper, Z
for (int i = 0; i < planProcessList.size(); i++) { for (int i = 0; i < planProcessList.size(); i++) {
//第一个没有前导工序 //第一个没有前导工序
if (i == 0) { if (i == 0) {
ZyPlanProcess process1 = planProcessList.get(i); //判断是否有下到工序
ZyPlanProcess process2 = planProcessList.get(i + 1); if(planProcessList.size()>1)
process1.setPostProcess(process2.getProcessId()); {
process1.setPostProcessName(process2.getProcessName()); ZyPlanProcess process1 = planProcessList.get(i);
updateList.add(process1); ZyPlanProcess process2 = planProcessList.get(i + 1);
process1.setPostProcess(process2.getProcessId());
process1.setPostProcessName(process2.getProcessName());
updateList.add(process1);
}else
{
ZyPlanProcess process1 = planProcessList.get(i);
updateList.add(process1);
}
} else if (i > 0 && i < planProcessList.size() - 1) { } else if (i > 0 && i < planProcessList.size() - 1) {
ZyPlanProcess process = planProcessList.get(i - 1); ZyPlanProcess process = planProcessList.get(i - 1);
ZyPlanProcess process1 = planProcessList.get(i); ZyPlanProcess process1 = planProcessList.get(i);

@ -137,7 +137,7 @@ public class ZyProductPlanServiceImpl extends ServiceImpl<ZyProductPlanMapper, Z
SysDepart sysDepart = iSysDepartService.getById(zyProduct.getEnterprisesId()); SysDepart sysDepart = iSysDepartService.getById(zyProduct.getEnterprisesId());
zyProductPlan.setProductOrg(StringUtils.isNotBlank(sysDepart.getDepartName()) ? sysDepart.getDepartName() : ""); zyProductPlan.setProductOrg(StringUtils.isNotBlank(sysDepart.getDepartName()) ? sysDepart.getDepartName() : "");
} }
SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getRealname, zyProductPlan.getTeamLeader())); SysUser sysUser = iSysUserService.getOne(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUsername, zyProductPlan.getTeamLeader()));
zyProductPlan.setTeamLeader(sysUser.getUsername()); zyProductPlan.setTeamLeader(sysUser.getUsername());
zyProductPlan.setStatus(new Integer(ProductPlanStatusEnum.UNAUDITED.getCode())); zyProductPlan.setStatus(new Integer(ProductPlanStatusEnum.UNAUDITED.getCode()));
this.save(zyProductPlan); this.save(zyProductPlan);

Loading…
Cancel
Save