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
6b633c41
Commit
6b633c41
authored
Nov 13, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
83d11194
0517b307
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
512 additions
and
55 deletions
+512
-55
messages.properties
admin/src/main/resources/i18n/messages.properties
+3
-1
messages_en.properties
admin/src/main/resources/i18n/messages_en.properties
+3
-1
messages_th.properties
admin/src/main/resources/i18n/messages_th.properties
+3
-1
messages_zh_CN.properties
admin/src/main/resources/i18n/messages_zh_CN.properties
+3
-1
logback.xml
admin/src/main/resources/logback.xml
+38
-43
MdWorkunitServiceImpl.java
.../com/ximai/mes/md/service/impl/MdWorkunitServiceImpl.java
+4
-0
ProTask.java
mes/src/main/java/com/ximai/mes/pro/domain/task/ProTask.java
+2
-1
ProFeedbackMapper.java
...main/java/com/ximai/mes/pro/mapper/ProFeedbackMapper.java
+12
-0
ProProductionSolutionServiceImpl.java
.../productionSolution/ProProductionSolutionServiceImpl.java
+7
-0
ProTaskServiceImpl.java
...m/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
+13
-1
ProTaskWorkunitServiceImpl.java
...mes/pro/service/impl/task/ProTaskWorkunitServiceImpl.java
+5
-1
FeedbackController.java
...a/com/ximai/mes/report/controller/FeedbackController.java
+136
-4
FeedbackResponse.java
.../java/com/ximai/mes/report/response/FeedbackResponse.java
+26
-1
FeedbackService.java
...in/java/com/ximai/mes/report/service/FeedbackService.java
+12
-0
FeedbackServiceImp.java
...com/ximai/mes/report/service/impl/FeedbackServiceImp.java
+30
-0
ProFeedbackMapper.xml
mes/src/main/resources/mapper/pro/ProFeedbackMapper.xml
+214
-0
ProTaskMapper.xml
mes/src/main/resources/mapper/pro/task/ProTaskMapper.xml
+1
-0
No files found.
admin/src/main/resources/i18n/messages.properties
View file @
6b633c41
...
...
@@ -215,4 +215,6 @@ qc.error.error6=\u68C0\u6D4B\u9879\u7F16\u53F7\u5DF2\u5B58\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
rule.currentSerial.error=
\u
8BE5
\u
4EA7
\u
54C1
\u
5E8F
\u5217\u
53F7
\u5269\u
4F59:{0}
\u
4E0D
\u
6EE1
\u
8DB3
\u
5DE5
\u5355\u6570\u
91CF:{1}
\ No newline at end of file
rule.currentSerial.error=
\u
8BE5
\u
4EA7
\u
54C1
\u
5E8F
\u5217\u
53F7
\u5269\u
4F59:{0}
\u
4E0D
\u
6EE1
\u
8DB3
\u
5DE5
\u5355\u6570\u
91CF:{1}
#工作单元编不唯一
md.workUnit.error.workunitCode.unique =
\u
5de5
\u5355\u5355\u5143\u
7f16
\u7801\u
5df2
\u
5b58
\u5728
\ No newline at end of file
admin/src/main/resources/i18n/messages_en.properties
View file @
6b633c41
...
...
@@ -212,4 +212,6 @@ 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.
rule.currentSerial.error= The remaining quantity of the product serial number is insufficient :{0} , workorder quantity : {1}
\ No newline at end of file
rule.currentSerial.error= The remaining quantity of the product serial number is insufficient :{0} , workorder quantity : {1}
#工作单元编不唯一
md.workUnit.error.workunitCode.unique = unique workunitCode.
\ No newline at end of file
admin/src/main/resources/i18n/messages_th.properties
View file @
6b633c41
...
...
@@ -217,4 +217,6 @@ system.printer.error.repeat.bind=\u0E40\u0E04\u0E23\u0E37\u0E48\u0E2D\u0E07\u0E1
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
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
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}
#工作单元编不唯一
md.workUnit.error.workunitCode.unique
=
\u
0e2b
\u
0e21
\u
0e32
\u
0e22
\u
0e40
\u
0e25
\u
0e02
\u
0e17
\u
0e35
\u
0e48
\u
0e21
\u
0e35
\u
0e2d
\u
0e22
\u
0e39
\u
0e48
\u
0e41
\u
0e25
\u
0e49
\u
0e27
\ No newline at end of file
admin/src/main/resources/i18n/messages_zh_CN.properties
View file @
6b633c41
...
...
@@ -215,4 +215,6 @@ qc.error.error6=\u68C0\u6D4B\u9879\u7F16\u53F7\u5DF2\u5B58\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
rule.currentSerial.error=
\u
8BE5
\u
4EA7
\u
54C1
\u
5E8F
\u5217\u
53F7
\u5269\u
4F59:{0}
\u
4E0D
\u
6EE1
\u
8DB3
\u
5DE5
\u5355\u6570\u
91CF:{1}
\ No newline at end of file
rule.currentSerial.error=
\u
8BE5
\u
4EA7
\u
54C1
\u
5E8F
\u5217\u
53F7
\u5269\u
4F59:{0}
\u
4E0D
\u
6EE1
\u
8DB3
\u
5DE5
\u5355\u6570\u
91CF:{1}
#工作单元编不唯一
md.workUnit.error.workunitCode.unique =
\u
5de5
\u5355\u5355\u5143\u
7f16
\u7801\u
5df2
\u
5b58
\u5728
\ No newline at end of file
admin/src/main/resources/logback.xml
View file @
6b633c41
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property
name=
"log.path"
value=
"d:/logs/me
s"
/>
<property
name=
"log.path"
value=
"/home/ximai/log
s"
/>
<!-- 日志输出格式 -->
<property
name=
"log.pattern"
value=
"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"
/>
<property
name=
"log.pattern"
value=
"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"
/>
<!-- 控制台输出 -->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
</encoder>
</appender>
<!-- 系统日志输出 -->
<appender
name=
"file_info"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/sys-info.log
</file>
<!-- 系统日志输出 -->
<appender
name=
"file_info"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/sys-info.log
</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 日志文件名格式 -->
<fileNamePattern>
${log.path}/sys-info.%d{yyyy-MM-dd}.log
</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>
60
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<fileNamePattern>
${log.path}/sys-info.%d{yyyy-MM-dd}.log
</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>
60
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<level>
INFO
</level>
<!-- 匹配时的操作:接收(记录) -->
...
...
@@ -35,34 +33,33 @@
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
</appender>
<appender
name=
"file_error"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/sys-error.log
</file>
<appender
name=
"file_error"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/sys-error.log
</file>
<!-- 循环政策:基于时间创建日志文件 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 日志文件名格式 -->
<fileNamePattern>
${log.path}/sys-error.%d{yyyy-MM-dd}.log
</fileNamePattern>
<!-- 日志最大的历史 60天 -->
<maxHistory>
60
</maxHistory>
<!-- 日志最大的历史 60天 -->
<maxHistory>
60
</maxHistory>
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<level>
ERROR
</level>
<!-- 匹配时的操作:接收(记录) -->
<!-- 匹配时的操作:接收(记录) -->
<onMatch>
ACCEPT
</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
<!-- 不匹配时的操作:拒绝(不记录) -->
<onMismatch>
DENY
</onMismatch>
</filter>
</appender>
<!-- 用户访问日志输出 -->
<!-- 用户访问日志输出 -->
<appender
name=
"sys-user"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
${log.path}/sys-user.log
</file>
<file>
${log.path}/sys-user.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!-- 按天回滚 daily -->
<fileNamePattern>
${log.path}/sys-user.%d{yyyy-MM-dd}.log
</fileNamePattern>
...
...
@@ -71,7 +68,6 @@
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
...
...
@@ -86,26 +82,25 @@
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
<!-- 系统模块日志级别控制 -->
<logger
name=
"com.ximai"
level=
"info"
/>
<!-- Spring日志级别控制 -->
<logger
name=
"org.springframework"
level=
"warn"
/>
<!-- 系统模块日志级别控制 -->
<logger
name=
"com.ximai"
level=
"info"
/>
<!-- Spring日志级别控制 -->
<logger
name=
"org.springframework"
level=
"warn"
/>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
</root>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
</root>
<!--系统操作日志-->
<!--系统操作日志-->
<root
level=
"info"
>
<appender-ref
ref=
"file_info"
/>
<appender-ref
ref=
"file_error"
/>
</root>
<!--系统用户操作日志-->
<!--系统用户操作日志-->
<logger
name=
"sys-user"
level=
"info"
>
<appender-ref
ref=
"sys-user"
/>
</logger>
...
...
mes/src/main/java/com/ximai/mes/md/service/impl/MdWorkunitServiceImpl.java
View file @
6b633c41
...
...
@@ -3,6 +3,7 @@ package com.ximai.mes.md.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.core.domain.AjaxResult
;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.data.DateUtils
;
import
com.ximai.common.utils.data.ExceptionUtil
;
...
...
@@ -93,6 +94,9 @@ public class MdWorkunitServiceImpl implements IMdWorkunitService {
MdWorkstation
mdWorkstation
=
mdWorkstationMapper
.
selectMdWorkstationByWorkstationId
(
mdWorkunit
.
getWorkstationId
());
if
(
mdWorkstation
!=
null
)
mdWorkunit
.
setWorkstationCode
(
mdWorkstation
.
getWorkstationCode
());
}
else
{
MdWorkunit
mdWorkunitCheck
=
mdWorkunitMapper
.
selectMdWorkunitByWorkunitCodes
(
mdWorkunit
.
getWorkunitCode
());
ExceptionUtil
.
checkTrueThrowException
(
mdWorkunitCheck
!=
null
,
MessageUtils
.
message
(
"md.workUnit.error.workunitCode.unique"
));
}
return
mdWorkunitMapper
.
insertMdWorkunit
(
mdWorkunit
);
}
...
...
mes/src/main/java/com/ximai/mes/pro/domain/task/ProTask.java
View file @
6b633c41
...
...
@@ -318,7 +318,8 @@ public class ProTask extends BaseEntity {
private
String
idx
;
@ApiModelProperty
(
"超报标识"
)
private
Boolean
surpassState
;
@TableField
(
exist
=
false
)
private
String
processRemark
;
public
String
getStatusName
()
{
return
TaskStatusEnum
.
getStatusCn
(
this
.
getStatus
());
}
...
...
mes/src/main/java/com/ximai/mes/pro/mapper/ProFeedbackMapper.java
View file @
6b633c41
...
...
@@ -125,4 +125,16 @@ public interface ProFeedbackMapper {
void
updateLastFeedback
(
@Param
(
"qrcode"
)
String
qrcode
,
@Param
(
"taskId"
)
Long
taskId
);
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkOrder
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkshop
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkstation
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkunit
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByProcess
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByUser
(
FeedbackRequest
feedbackRequest
);
}
mes/src/main/java/com/ximai/mes/pro/service/impl/productionSolution/ProProductionSolutionServiceImpl.java
View file @
6b633c41
...
...
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.exception.ServiceException
;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.SecurityUtils
;
import
com.ximai.common.utils.data.DataUtil
;
import
com.ximai.common.utils.data.ExceptionUtil
;
import
com.ximai.common.utils.data.StringUtils
;
...
...
@@ -224,6 +225,9 @@ public class ProProductionSolutionServiceImpl implements IProProductionSolutionS
}
// 保存主数据
String
createBy
=
SecurityUtils
.
getUsername
();
proProductionSolution
.
setCreateBy
(
createBy
);
proProductionSolution
.
setCreateTime
(
new
Date
());
int
i
=
proProductionSolutionMapper
.
insertProProductionSolution
(
proProductionSolution
);
if
(
i
!=
1
)
{
return
2
;
...
...
@@ -397,6 +401,9 @@ public class ProProductionSolutionServiceImpl implements IProProductionSolutionS
ProProductionSolution
proProductionSolution
=
proProductionSolutionMapper
.
selectProProductionSolutionByProductionSolutionId
(
proProductionSolutionVo
.
getProductionSolutionId
());
proProductionSolution
.
setRemark
(
proProductionSolutionVo
.
getRemark
());
BeanUtils
.
copyProperties
(
proProductionSolutionVo
,
proProductionSolution
);
String
createBy
=
SecurityUtils
.
getUsername
();
proProductionSolution
.
setCreateBy
(
createBy
);
proProductionSolution
.
setCreateTime
(
new
Date
());
int
i
=
proProductionSolutionMapper
.
updateProProductionSolution
(
proProductionSolution
);
// 获取打样工序
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
View file @
6b633c41
...
...
@@ -29,8 +29,10 @@ import com.ximai.mes.pro.domain.productionSolution.ProProductionSolution;
import
com.ximai.mes.pro.domain.task.*
;
import
com.ximai.mes.pro.domain.vo.*
;
import
com.ximai.mes.pro.domain.vo.task.FeedbackValidateSerialNoParams
;
import
com.ximai.mes.pro.dto.ProProductQrcodeRecordDto
;
import
com.ximai.mes.pro.dto.task.ProTaskLinkFile
;
import
com.ximai.mes.pro.mapper.ProProcessMapper
;
import
com.ximai.mes.pro.mapper.ProProductQrcodeRecordMapper
;
import
com.ximai.mes.pro.mapper.ProProductionLogMapper
;
import
com.ximai.mes.pro.mapper.ProRouteMapper
;
import
com.ximai.mes.pro.mapper.proWorkOrder.ProWorkOrderProcessMapper
;
...
...
@@ -161,6 +163,8 @@ public class ProTaskServiceImpl implements IProTaskService {
@Autowired
ProProductionSolutionMapper
proProductionSolutionMapper
;
@Autowired
ProProductQrcodeRecordMapper
proProductQrcodeRecordMapper
;
/**
* 查询生产任务
*
...
...
@@ -1393,9 +1397,17 @@ public class ProTaskServiceImpl implements IProTaskService {
Double
v
=
proFeedbackService
.
selectQuantityQualifySum
(
new
ProFeedback
(
arrangeCode
,
null
,
null
,
task
.
getTaskWorkunitId
()));
task
.
setArrangeFeedbackSum
(
v
);
}
//增加校验是否序列号报工
if
(
StringUtils
.
isNotEmpty
(
task
.
getIsSerialReport
())
&&
"1"
.
equals
(
task
.
getIsSerialReport
())){
QueryWrapper
<
ProProductQrcodeRecord
>
proProductQrcodeRecordQuery
=
new
QueryWrapper
<>();
proProductQrcodeRecordQuery
.
eq
(
"m.work_order_no"
,
task
.
getArrangeCode
());
List
<
ProProductQrcodeRecordDto
>
proProductQrcodeRecordDtos
=
proProductQrcodeRecordMapper
.
selectDtoListByQw
(
proProductQrcodeRecordQuery
);
if
(
proProductQrcodeRecordDtos
.
size
()
<
1
){
task
.
setIsSerialReport
(
"0"
);
}
}
}
}
Set
<
Long
>
taskWorkunitIds
=
rst
.
stream
().
map
(
ProTask:
:
getTaskWorkunitId
).
collect
(
Collectors
.
toSet
());
if
(
CollectionUtil
.
isNotEmpty
(
taskWorkunitIds
))
{
Map
<
Long
,
ProTaskAssistProcess
>
assistProcessMap
=
proTaskAssistProcessMapper
.
selectListByQw
(
new
QueryWrapper
<
ProTaskAssistProcess
>().
in
(
"task_workunit_id"
,
taskWorkunitIds
)).
stream
().
collect
(
Collectors
.
toMap
(
ProTaskAssistProcess:
:
getTaskWorkunitId
,
x
->
x
));
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskWorkunitServiceImpl.java
View file @
6b633c41
...
...
@@ -43,6 +43,7 @@ import com.ximai.mes.tm.mapper.TmToolMapper;
import
com.ximai.mes.tm.mapper.TmToolRequestUseItemMapper
;
import
com.ximai.mes.tm.service.ITmToolRequestService
;
import
com.ximai.system.mapper.SysUserMapper
;
import
com.ximai.system.service.ISysDictDataService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -75,7 +76,8 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
private
IProTaskWorkunitService
proTaskWorkunitService
;
@Resource
private
ProWorkorderMapper
proWorkorderMapper
;
@Autowired
private
ISysDictDataService
dictDataService
;
@Resource
private
SysUserMapper
sysUserMapper
;
@Autowired
...
...
@@ -596,6 +598,7 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
ProWorkorder
proWorkorder
=
proWorkorderMapper
.
selectProWorkorderWorderCode
(
taskBatchTasks
.
get
(
0
).
getArrangeCode
());
TaskProWorkorderPrintData
taskProWorkorderPrintData
=
new
TaskProWorkorderPrintData
();
BeanUtil
.
copyProperties
(
proWorkorder
,
taskProWorkorderPrintData
);
taskProWorkorderPrintData
.
setWorkorderType
(
dictDataService
.
getDictLabel
(
"mes_workorder_type"
,
taskProWorkorderPrintData
.
getWorkorderType
()));
value
.
put
(
"header"
,
taskProWorkorderPrintData
);
value
.
put
(
"detail"
,
taskProPrintDatas
);
if
(
taskProWorkorderPrintData
.
getExpectStartDate
()
!=
null
||
taskProWorkorderPrintData
.
getRequestDate
()
!=
null
){
...
...
@@ -607,6 +610,7 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
taskProPrintData
.
setExpectStartDateString
(
begin
);
taskProPrintData
.
setRequestDateString
(
end
);
taskProPrintDatas
.
add
(
taskProPrintData
);
}
}
taskProWorkorderPrintData
.
setSize
(
i
++);
...
...
mes/src/main/java/com/ximai/mes/report/controller/FeedbackController.java
View file @
6b633c41
...
...
@@ -3,6 +3,7 @@ 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.core.page.TableDataInfo
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.report.request.FeedbackRequest
;
import
com.ximai.mes.report.response.FeedbackResponse
;
...
...
@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.List
;
@Api
(
"生产报工"
)
...
...
@@ -26,12 +29,141 @@ public class FeedbackController extends BaseController {
/**
* 新增生产报工记录
*/
@ApiOperation
(
"
新增报工单接口
"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:
add
')"
)
@ApiOperation
(
"
生产报工记录:明细界面
"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:
get
')"
)
@Log
(
title
=
"生产报工记录"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getList"
)
public
AjaxResult
getList
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
getList
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getList
(
feedbackRequest
);
return
null
;
return
getDataTable
(
feedbackResponseList
);
}
@ApiOperation
(
"生产报工记录"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工单"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkOrder"
)
public
TableDataInfo
getListByWorkOrder
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkOrder
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
for
(
FeedbackResponse
feedbackResponse
:
feedbackResponseList
){
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
}
return
getDataTable
(
feedbackResponseList
);
}
@ApiOperation
(
"生产报工记录:统计方式车间"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式车间"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkshop"
)
public
TableDataInfo
getListByWorkshop
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkshop
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
for
(
FeedbackResponse
feedbackResponse
:
feedbackResponseList
){
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
}
return
getDataTable
(
feedbackResponseList
);
}
@ApiOperation
(
"生产报工记录:统计方式工作中心"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工作中心"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkstation"
)
public
TableDataInfo
getListByWorkstation
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkstation
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
for
(
FeedbackResponse
feedbackResponse
:
feedbackResponseList
){
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
}
return
getDataTable
(
feedbackResponseList
);
}
@ApiOperation
(
"生产报工记录:统计方式工作单元"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工作单元"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkunit"
)
public
TableDataInfo
getListByWorkunit
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkunit
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
for
(
FeedbackResponse
feedbackResponse
:
feedbackResponseList
){
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
}
return
getDataTable
(
feedbackResponseList
);
}
@ApiOperation
(
"生产报工记录:统计方式工序"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工序"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByProcess"
)
public
TableDataInfo
getListByProcess
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByProcess
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
for
(
FeedbackResponse
feedbackResponse
:
feedbackResponseList
){
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
}
return
getDataTable
(
feedbackResponseList
);
}
@ApiOperation
(
"生产报工记录:统计方式工序"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工序"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByUser"
)
public
TableDataInfo
getListByUser
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByUser
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
for
(
FeedbackResponse
feedbackResponse
:
feedbackResponseList
){
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
}
return
getDataTable
(
feedbackResponseList
);
}
}
mes/src/main/java/com/ximai/mes/report/response/FeedbackResponse.java
View file @
6b633c41
...
...
@@ -4,10 +4,11 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
com.ximai.common.annotation.Excel
;
import
com.ximai.mes.pro.domain.ProFeedback
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
FeedbackResponse
extends
ProFeedback
{
/**
* 工单类型,项目号,订单号,
...
...
@@ -38,6 +39,8 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
name
=
"工单编码"
)
private
String
workorderCode
;
@ApiModelProperty
(
name
=
"工单名称"
)
private
String
workorderName
;
/**
* 产品编号
*/
...
...
@@ -56,6 +59,13 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
name
=
"工序任务号"
)
private
String
taskCode
;
/**
* 工序名称
*/
@ApiModelProperty
(
name
=
"工序编码"
)
private
String
processCode
;
/**
* 工序名称
*/
...
...
@@ -82,6 +92,12 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
"工作单元ID"
)
private
Long
workunitId
;
/**
*
*/
@ApiModelProperty
(
"工作单元编码"
)
private
String
workunitCode
;
@ApiModelProperty
(
"工作单元名称"
)
private
String
workunitName
;
...
...
@@ -138,4 +154,13 @@ public class FeedbackResponse extends ProFeedback {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
name
=
"报工时间"
)
private
Date
feedbackTime
;
@ApiModelProperty
(
"良率"
)
private
String
qualificationRate
;
@ApiModelProperty
(
"车间编号"
)
private
String
workshopCode
;
@ApiModelProperty
(
"车间名称"
)
private
String
workshopName
;
}
mes/src/main/java/com/ximai/mes/report/service/FeedbackService.java
View file @
6b633c41
...
...
@@ -7,4 +7,16 @@ import java.util.List;
public
interface
FeedbackService
{
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkOrder
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkshop
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkstation
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByWorkunit
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByProcess
(
FeedbackRequest
feedbackRequest
);
List
<
FeedbackResponse
>
getListByUser
(
FeedbackRequest
feedbackRequest
);
}
mes/src/main/java/com/ximai/mes/report/service/impl/FeedbackServiceImp.java
View file @
6b633c41
...
...
@@ -19,4 +19,34 @@ public class FeedbackServiceImp implements FeedbackService {
public
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getList
(
feedbackRequest
);
}
@Override
public
List
<
FeedbackResponse
>
getListByWorkOrder
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getListByWorkOrder
(
feedbackRequest
);
}
@Override
public
List
<
FeedbackResponse
>
getListByWorkshop
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getListByWorkshop
(
feedbackRequest
);
}
@Override
public
List
<
FeedbackResponse
>
getListByWorkstation
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getListByWorkstation
(
feedbackRequest
);
}
@Override
public
List
<
FeedbackResponse
>
getListByWorkunit
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getListByWorkunit
(
feedbackRequest
);
}
@Override
public
List
<
FeedbackResponse
>
getListByProcess
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getListByProcess
(
feedbackRequest
);
}
@Override
public
List
<
FeedbackResponse
>
getListByUser
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getListByUser
(
feedbackRequest
);
}
}
mes/src/main/resources/mapper/pro/ProFeedbackMapper.xml
View file @
6b633c41
This diff is collapsed.
Click to expand it.
mes/src/main/resources/mapper/pro/task/ProTaskMapper.xml
View file @
6b633c41
...
...
@@ -171,6 +171,7 @@
t.arrange_code,
p.process_code,
p.process_name,
p.remark as processRemark,
t.item_id,
i.item_code,
i.item_name,
...
...
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