Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes
Commits
2977d535
Commit
2977d535
authored
Nov 08, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
03ad0796
c83c2d44
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
197 additions
and
33 deletions
+197
-33
messages.properties
admin/src/main/resources/i18n/messages.properties
+2
-1
messages_en.properties
admin/src/main/resources/i18n/messages_en.properties
+2
-1
messages_th.properties
admin/src/main/resources/i18n/messages_th.properties
+2
-1
messages_zh_CN.properties
admin/src/main/resources/i18n/messages_zh_CN.properties
+2
-1
ProductQrcodeBuild.java
.../ximai/mes/pro/schedule/impl/busi/ProductQrcodeBuild.java
+28
-28
ProProductQrcodeRuleServiceImpl.java
...mes/pro/service/impl/ProProductQrcodeRuleServiceImpl.java
+12
-0
ProWorkorderServiceImpl.java
...ro/service/impl/proWorkOrder/ProWorkorderServiceImpl.java
+1
-1
FeedbackController.java
...a/com/ximai/mes/report/controller/FeedbackController.java
+28
-0
FeedbackRequest.java
...in/java/com/ximai/mes/report/request/FeedbackRequest.java
+120
-0
No files found.
admin/src/main/resources/i18n/messages.properties
View file @
2977d535
...
...
@@ -214,4 +214,5 @@ qc.error.error5=\u5F53\u524D\u5DE5\u5355\u751F\u4EA7\u7684\u4EA7\u54C1\u672A\u91
qc.error.error6=
\u
68C0
\u
6D4B
\u9879\u
7F16
\u
53F7
\u
5DF2
\u
5B58
\u5728
qc.error.error7=
\u
68C0
\u
6D4B
\u9879\u
540D
\u
79F0
\u
5DF2
\u
5B58
\u5728
#system.printer
system.printer.error.repeat.bind=
\u
8BE5
\u6253\u5370\u
673A
\u
5DF2
\u
7ED1
\u
5B9A
\u
4E86
\ No newline at end of file
system.printer.error.repeat.bind=
\u
8BE5
\u6253\u5370\u
673A
\u
5DF2
\u
7ED1
\u
5B9A
\u
4E86
rule.currentSerial.error=
\u
8be5
\u
4ea7
\u
54c1
\u
5e8f
\u5217\u
53f7
\u5269\u
4f59
\u
003a{0}
\u
4e0d
\u
6ee1
\u
8db3
\u
5de5
\u5355\u6570\u
91cf
\u
003a{1}
\ No newline at end of file
admin/src/main/resources/i18n/messages_en.properties
View file @
2977d535
...
...
@@ -211,4 +211,5 @@ qc.error.error5=The product produced by the current work order is not configured
qc.error.error6=Inspection item number already exists.
qc.error.error7=Inspection item name already exists.
#system.printer
system.printer.error.repeat.bind=This printer has been bound.
\ No newline at end of file
system.printer.error.repeat.bind=This printer has been bound.
rule.currentSerial.error= The remaining quantity of the product serial number is insufficient :{0} , workorder quantity : {1}
\ No newline at end of file
admin/src/main/resources/i18n/messages_th.properties
View file @
2977d535
...
...
@@ -216,4 +216,5 @@ qc.error.error7=\u0E21\u0E35\u0E0A\u0E37\u0E48\u0E2D\u0E23\u0E32\u0E22\u0E01\u0E
system.printer.error.repeat.bind
=
\u
0E40
\u
0E04
\u
0E23
\u
0E37
\u
0E48
\u
0E2D
\u
0E07
\u
0E1E
\u
0E34
\u
0E21
\u
0E1E
\u
0E4C
\u
0E16
\u
0E39
\u
0E01
\u
0E1C
\u
0E39
\u
0E01
\u
0E44
\u
0E27
\u
0E49
md.workStation.error.not.productionSolutionCode
=
\u0050\u0072\u
006f
\u0064\u0075\u0063\u0074\u0069\u
006f
\u
006e
\u0053\u
006f
\u
006c
\u0075\u0074\u0069\u
006f
\u
006e
\u0043\u
006f
\u0064\u0065\u0020\u
0e44
\u
0e21
\u
0e48
\u
0e44
\u
0e14
\u
0e49
\u
0e01
\u
0e23
\u
0e2d
\u
0e01
md.workStation.error.productionSolutionCode.unique
=
\u0050\u0072\u
006f
\u0064\u0075\u0063\u0074\u0069\u
006f
\u
006e
\u0053\u
006f
\u
006c
\u0075\u0074\u0069\u
006f
\u
006e
\u0043\u
006f
\u0064\u0065\u
003a
\u0020\u
0e44
\u
0e21
\u
0e48
\u
0e40
\u
0e09
\u
0e1e
\u
0e32
\u
0e30
md.workStation.error.productionSolutionCode.size
=
\u0050\u0072\u
006f
\u0064\u0075\u0063\u0074\u0069\u
006f
\u
006e
\u0053\u
006f
\u
006c
\u0075\u0074\u0069\u
006f
\u
006e
\u0043\u
006f
\u0064\u0065\u
003a
\u0020\u
0e21
\u
0e35
\u
0e04
\u
0e48
\u
0e32
\u
0e21
\u
0e32
\u
0e01
\u
0e02
\u
0e36
\u
0e49
\u
0e19
\u
0e2d
\u
0e22
\u
0e39
\u
0e48
\u
0e41
\u
0e25
\u
0e49
\u
0e27
\ No newline at end of file
md.workStation.error.productionSolutionCode.size
=
\u0050\u0072\u
006f
\u0064\u0075\u0063\u0074\u0069\u
006f
\u
006e
\u0053\u
006f
\u
006c
\u0075\u0074\u0069\u
006f
\u
006e
\u0043\u
006f
\u0064\u0065\u
003a
\u0020\u
0e21
\u
0e35
\u
0e04
\u
0e48
\u
0e32
\u
0e21
\u
0e32
\u
0e01
\u
0e02
\u
0e36
\u
0e49
\u
0e19
\u
0e2d
\u
0e22
\u
0e39
\u
0e48
\u
0e41
\u
0e25
\u
0e49
\u
0e27
rule.currentSerial.error
=
\u
0e2b
\u
0e21
\u
0e32
\u
0e22
\u
0e40
\u
0e25
\u
0e02
\u
0e1c
\u
0e25
\u
0e34
\u
0e15
\u
0e20
\u
0e31
\u
0e13
\u
0e11
\u
0e4c
\u0020\u
0e40
\u
0e2b
\u
0e25
\u
0e37
\u
0e2d {0},
\u
0e44
\u
0e21
\u
0e48
\u
0e40
\u
0e1b
\u
0e47
\u
0e19
\u
0e44
\u
0e1b
\u
0e15
\u
0e32
\u
0e21
\u
0e08
\u
0e33
\u
0e19
\u
0e27
\u
0e19
\u
0e43
\u
0e1a
\u
0e2a
\u
0e31
\u
0e48
\u
0e07
\u
0e07
\u
0e32
\u
0e19{1}
\ No newline at end of file
admin/src/main/resources/i18n/messages_zh_CN.properties
View file @
2977d535
...
...
@@ -214,4 +214,5 @@ qc.error.error5=\u5F53\u524D\u5DE5\u5355\u751F\u4EA7\u7684\u4EA7\u54C1\u672A\u91
qc.error.error6=
\u
68C0
\u
6D4B
\u9879\u
7F16
\u
53F7
\u
5DF2
\u
5B58
\u5728
qc.error.error7=
\u
68C0
\u
6D4B
\u9879\u
540D
\u
79F0
\u
5DF2
\u
5B58
\u5728
#system.printer
system.printer.error.repeat.bind=
\u
8BE5
\u6253\u5370\u
673A
\u
5DF2
\u
7ED1
\u
5B9A
\u
4E86
\ No newline at end of file
system.printer.error.repeat.bind=
\u
8BE5
\u6253\u5370\u
673A
\u
5DF2
\u
7ED1
\u
5B9A
\u
4E86
rule.currentSerial.error=
\u
8be5
\u
4ea7
\u
54c1
\u
5e8f
\u5217\u
53f7
\u5269\u
4f59
\u
003a{0}
\u
4e0d
\u
6ee1
\u
8db3
\u
5de5
\u5355\u6570\u
91cf
\u
003a{1}
\ No newline at end of file
mes/src/main/java/com/ximai/mes/pro/schedule/impl/busi/ProductQrcodeBuild.java
View file @
2977d535
...
...
@@ -35,30 +35,30 @@ public class ProductQrcodeBuild implements ScheduleBusiProcess{
if
(
rule
==
null
){
return
;
}
//wzc修改 有客户优先按照产品+客户匹配序列号规则绑定的最新打印模板,如果没有匹配到 按照产品匹配序列号规则绑定的最新打印模板(客户字段为空的)
ProProductQrcodeRuleDto
proProductQrcodeRuleDto
=
null
;
List
<
ProProductQrcodeRuleDto
>
list
=
null
;
if
(
StringUtils
.
isNotEmpty
(
workorder
.
getClientCode
())){
QueryWrapper
<
ProProductQrcodeRule
>
query
=
new
QueryWrapper
<>();
query
.
eq
(
"m.item_id"
,
workorder
.
getProductId
());
query
.
eq
(
"m.client_code"
,
workorder
.
getClientCode
());
query
.
orderByDesc
(
"m.rule_id"
);
list
=
proProductQrcodeRuleService
.
selectProProductQrcodeRuleDtoList
(
query
);
}
else
{
QueryWrapper
<
ProProductQrcodeRule
>
query
=
new
QueryWrapper
<>();
query
.
eq
(
"m.item_id"
,
workorder
.
getProductId
());
query
.
isNull
(
"m.client_code"
);
query
.
orderByDesc
(
"m.rule_id"
);
list
=
proProductQrcodeRuleService
.
selectProProductQrcodeRuleDtoList
(
query
);
}
if
(
list
!=
null
&&
list
.
size
()
>
0
){
proProductQrcodeRuleDto
=
list
.
get
(
0
);
}
if
(
proProductQrcodeRuleDto
==
null
||
StringUtils
.
isEmpty
(
proProductQrcodeRuleDto
.
getTemplateName
())){
//后续再看是否需要报错
ExceptionUtil
.
checkTrueThrowException
(
true
,
"未能匹配到打印模板,请先到产品二维码规则维护"
);
}
//
//wzc修改 有客户优先按照产品+客户匹配序列号规则绑定的最新打印模板,如果没有匹配到 按照产品匹配序列号规则绑定的最新打印模板(客户字段为空的)
//
ProProductQrcodeRuleDto proProductQrcodeRuleDto= null;
//
List<ProProductQrcodeRuleDto> list = null;
//
if(StringUtils.isNotEmpty(workorder.getClientCode())){
//
QueryWrapper<ProProductQrcodeRule> query = new QueryWrapper<>();
//
query.eq("m.item_id", workorder.getProductId());
//
query.eq( "m.client_code", workorder.getClientCode());
//
query.orderByDesc("m.rule_id");
//
list = proProductQrcodeRuleService.selectProProductQrcodeRuleDtoList(query);
//
}else{
//
QueryWrapper<ProProductQrcodeRule> query = new QueryWrapper<>();
//
query.eq("m.item_id", workorder.getProductId());
//
query.isNull( "m.client_code");
//
query.orderByDesc("m.rule_id");
//
list = proProductQrcodeRuleService.selectProProductQrcodeRuleDtoList(query);
//
}
//
if(list != null && list.size() > 0){
//
proProductQrcodeRuleDto = list.get(0);
//
}
//
if (proProductQrcodeRuleDto == null || StringUtils.isEmpty(proProductQrcodeRuleDto.getTemplateName())){
//
//后续再看是否需要报错
////
ExceptionUtil.checkTrueThrowException(true,
////
"未能匹配到打印模板,请先到产品二维码规则维护");
//
}
List
<
String
>
qrcodes
=
productQrcodeRuleService
.
buildQrcode
(
rule
,
job
.
getQuantity
().
intValue
());
for
(
String
qrcode
:
qrcodes
){
ProProductQrcodeRecordCreate
create
=
new
ProProductQrcodeRecordCreate
();
...
...
@@ -66,10 +66,10 @@ public class ProductQrcodeBuild implements ScheduleBusiProcess{
create
.
initByWorkorder
(
workorder
);
create
.
setItemDesc
(
rule
.
getItemDesc
());
//产品序列打印记录增加模板相关内容
create
.
setTemplateId
(
proProductQrcodeRuleDto
!=
null
?
proProductQrcodeRuleDto
.
getTemplateId
()
:
null
);
create
.
setTemplateCode
(
proProductQrcodeRuleDto
!=
null
?
proProductQrcodeRuleDto
.
getTemplateCode
()
:
null
);
create
.
setTemplateName
(
proProductQrcodeRuleDto
!=
null
?
proProductQrcodeRuleDto
.
getTemplateName
()
:
null
);
create
.
setTemplateType
(
proProductQrcodeRuleDto
!=
null
?
proProductQrcodeRuleDto
.
getTemplateType
()
:
null
);
create
.
setTemplateId
(
rule
!=
null
?
rule
.
getTemplateId
()
:
null
);
create
.
setTemplateCode
(
rule
!=
null
?
rule
.
getTemplateCode
()
:
null
);
create
.
setTemplateName
(
rule
!=
null
?
rule
.
getTemplateName
()
:
null
);
create
.
setTemplateType
(
rule
!=
null
?
rule
.
getTemplateType
()
:
null
);
productQrcodeRecordService
.
insertProProductQrcodeRecord
(
create
);
}
});
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/ProProductQrcodeRuleServiceImpl.java
View file @
2977d535
...
...
@@ -3,8 +3,10 @@ package com.ximai.mes.pro.service.impl;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.data.DateUtils
;
import
com.ximai.common.utils.SecurityUtils
;
import
com.ximai.common.utils.data.ExceptionUtil
;
import
com.ximai.common.utils.data.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -77,6 +79,7 @@ public class ProProductQrcodeRuleServiceImpl implements IProProductQrcodeRuleSer
QueryWrapper
<
ProProductQrcodeRule
>
proProductQrcodeRuleQuery
=
new
QueryWrapper
<>();
proProductQrcodeRuleQuery
.
eq
(
"item_id"
,
itemId
);
proProductQrcodeRuleQuery
.
eq
(
StringUtils
.
isNotEmpty
(
clientCode
),
"client_code"
,
clientCode
);
proProductQrcodeRuleQuery
.
isNull
(
StringUtils
.
isEmpty
(
clientCode
),
"client_code"
);
proProductQrcodeRuleQuery
.
orderByDesc
(
"create_time"
);
List
<
ProProductQrcodeRule
>
list
=
this
.
selectProProductQrcodeRuleList
(
proProductQrcodeRuleQuery
);
if
(
list
.
size
()>
0
){
...
...
@@ -152,6 +155,15 @@ public class ProProductQrcodeRuleServiceImpl implements IProProductQrcodeRuleSer
@Override
public
List
<
String
>
buildQrcode
(
ProProductQrcodeRule
rule
,
Integer
quantity
)
{
if
(
rule
.
getCurrentSerial
()
!=
null
&&
rule
.
getSerialLen
()
!=
null
&&
rule
.
getSerialLen
()
>
0
){
StringBuilder
maxCurrentSerialString
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
rule
.
getSerialLen
();
i
++){
maxCurrentSerialString
.
append
(
9
);
}
double
maxCurrentSerial
=
new
Double
(
maxCurrentSerialString
.
toString
());
Integer
size
=
rule
.
getCurrentSerial
()
+
quantity
;
ExceptionUtil
.
checkTrueThrowException
(
maxCurrentSerial
<
size
,
MessageUtils
.
message
(
"rule.currentSerial.error"
,
maxCurrentSerial
-
rule
.
getCurrentSerial
(),
quantity
));
}
List
<
String
>
rst
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
quantity
;
i
++){
String
temp
=
rule
.
buildQrcode
();
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/proWorkOrder/ProWorkorderServiceImpl.java
View file @
2977d535
...
...
@@ -270,7 +270,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
}
else
{
Long
workorderId
=
proWorkorderVo
.
getWorkorderId
();
ProWorkorderVo
workorder
=
proWorkorderService
.
selectProWorkorderByWorkorderId
(
workorderId
);
ExceptionUtil
.
checkTrueThrowException
(
workorder
.
getStatus
().
equals
(
WorkorderStatusEnum
.
PUBLISHED
.
getValue
()),
MessageUtils
.
message
(
"pro.workOrder.status.published.error"
));
ExceptionUtil
.
checkTrueThrowException
(
!
workorder
.
getStatus
().
equals
(
WorkorderStatusEnum
.
PUBLISHED
.
getValue
()),
MessageUtils
.
message
(
"pro.workOrder.status.published.error"
));
int
ret
=
proWorkorderService
.
updateProWorkorderWithBomAndProcess
(
proWorkorderVo
);
...
...
mes/src/main/java/com/ximai/mes/report/controller/FeedbackController.java
0 → 100644
View file @
2977d535
package
com
.
ximai
.
mes
.
report
.
controller
;
import
com.ximai.common.annotation.Log
;
import
com.ximai.common.core.controller.BaseController
;
import
com.ximai.common.core.domain.AjaxResult
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.report.request.FeedbackRequest
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
@Api
(
"生产报工"
)
@RestController
@RequestMapping
(
"/report/pro/feedback"
)
public
class
FeedbackController
extends
BaseController
{
/**
* 新增生产报工记录
*/
@ApiOperation
(
"新增报工单接口"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:add')"
)
@Log
(
title
=
"生产报工记录"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
public
AjaxResult
add
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
return
null
;
}
}
mes/src/main/java/com/ximai/mes/report/request/FeedbackRequest.java
0 → 100644
View file @
2977d535
package
com
.
ximai
.
mes
.
report
.
request
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ximai.common.annotation.Excel
;
import
io.swagger.annotations.ApiModelProperty
;
import
java.util.Date
;
public
class
FeedbackRequest
{
// 工单类型(下拉选择工单类型)
// 项目号(工单项目号)
// 订单号(工单订单号)
// 生产工单(生产工单号)
// 任务号(工序任务号)
// 产品编码(产品编码)
// 产品名称(点击放大镜单选产品信息,也可直接输入名称执行搜索)
// 工序(点击放大镜单选工序,也可直接输入名称执行搜索)
// 车间(点击放大镜单选车间,也可直接输入名称执行搜索)
// 工作中心(点击放大镜单选工作中心,也可直接输入名称执行搜索)
// 工作单元(点击放大镜单选工作单元,也可直接输入名称执行搜索)
// 报工人员(点击放大镜单选报工人员,也可直接输入名称执行搜索)
// 报工时间(选择开始截至时间)
/**
* 工单类型
*/
@ApiModelProperty
(
name
=
"工单类型"
)
private
String
workorderType
;
@ApiModelProperty
(
"客户项目号"
)
private
String
customerProjectNo
;
@ApiModelProperty
(
"订单单号"
)
private
String
orderCode
;
/**
* 工单编码
*/
@ApiModelProperty
(
name
=
"工单编码"
)
private
String
workorderCode
;
/**
* 任务编号
*/
@ApiModelProperty
(
name
=
"工序任务号"
)
private
String
taskCode
;
/**
* 产品编号
*/
@ApiModelProperty
(
name
=
"产品编号"
)
private
String
productCode
;
/**
* 产品名称
*/
@ApiModelProperty
(
name
=
"产品名称"
)
private
String
productName
;
/**
* 工序ID
*/
@ApiModelProperty
(
name
=
"工序ID"
)
private
Long
processId
;
/**
* 工序编码
*/
@ApiModelProperty
(
name
=
"工序编码"
)
private
String
processCode
;
/**
* 车间ID
*/
@Excel
(
name
=
"车间ID"
)
@ApiModelProperty
(
"车间ID"
)
private
Long
workshopId
;
@ApiModelProperty
(
"车间名称"
)
private
String
workshopName
;
/**
* 工作中心ID
*/
@ApiModelProperty
(
name
=
"工作中心ID"
)
private
Long
workstationId
;
/**
* 工作中心名称
*/
@ApiModelProperty
(
name
=
"工作中心名称"
)
private
String
workstationName
;
/**
*
*/
@ApiModelProperty
(
"工作单元ID"
)
private
Long
workunitId
;
@ApiModelProperty
(
"作业单元名称"
)
private
String
workunitName
;
@ApiModelProperty
(
"报工人员"
)
private
String
userName
;
@ApiModelProperty
(
"报工开始"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
startDate
;
@ApiModelProperty
(
"报工结束"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endDate
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment