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
53502dba
Commit
53502dba
authored
Nov 13, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工单关闭操作BUG修复
工作单元添加产线、序号字段 物料添加产线字段
parent
dc82eeaa
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
71 additions
and
8 deletions
+71
-8
application-th-prod.yml
admin/src/main/resources/application-th-prod.yml
+2
-0
logback.xml
admin/src/main/resources/logback.xml
+6
-1
MdWorkunitController.java
...ava/com/ximai/mes/md/controller/MdWorkunitController.java
+15
-0
MdItem.java
mes/src/main/java/com/ximai/mes/md/domain/MdItem.java
+3
-0
MdWorkunit.java
mes/src/main/java/com/ximai/mes/md/domain/MdWorkunit.java
+5
-2
MdItemMapper.java
mes/src/main/java/com/ximai/mes/md/mapper/MdItemMapper.java
+8
-0
IMdItemService.java
...rc/main/java/com/ximai/mes/md/service/IMdItemService.java
+2
-0
MdItemServiceImpl.java
...java/com/ximai/mes/md/service/impl/MdItemServiceImpl.java
+5
-0
MdWorkunitVo.java
mes/src/main/java/com/ximai/mes/md/vo/MdWorkunitVo.java
+2
-2
ProWorkorderServiceImpl.java
...ro/service/impl/proWorkOrder/ProWorkorderServiceImpl.java
+3
-2
WorkorderStateUpdateProcess.java
...ximai/mes/remote/process/WorkorderStateUpdateProcess.java
+1
-1
MdItemMapper.xml
mes/src/main/resources/mapper/md/MdItemMapper.xml
+5
-0
MdWorkunitMapper.xml
mes/src/main/resources/mapper/md/MdWorkunitMapper.xml
+14
-0
No files found.
admin/src/main/resources/application-th-prod.yml
View file @
53502dba
...
...
@@ -41,6 +41,8 @@ logging:
druid
:
sql
:
Statement
:
debug
file
:
name
:
mes.log
# Spring配置
spring
:
...
...
admin/src/main/resources/logback.xml
View file @
53502dba
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- 日志存放路径 -->
<property
name=
"log.path"
value=
"
/home/ximai/log
s"
/>
<property
name=
"log.path"
value=
"
d:/logs/me
s"
/>
<!-- 日志输出格式 -->
<property
name=
"log.pattern"
value=
"%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n"
/>
...
...
@@ -9,6 +9,7 @@
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
...
...
@@ -24,6 +25,7 @@
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
...
...
@@ -46,6 +48,7 @@
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
...
...
@@ -68,6 +71,7 @@
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
...
...
@@ -82,6 +86,7 @@
</rollingPolicy>
<encoder>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</appender>
...
...
mes/src/main/java/com/ximai/mes/md/controller/MdWorkunitController.java
View file @
53502dba
...
...
@@ -12,6 +12,7 @@ import com.ximai.common.utils.excel.ExcelWriter;
import
com.ximai.mes.md.domain.MdWorkunit
;
import
com.ximai.mes.md.dto.MdWorkunitExcelExport
;
import
com.ximai.mes.md.mapper.MdWorkunitMapper
;
import
com.ximai.mes.md.service.IMdItemService
;
import
com.ximai.mes.md.service.IMdWorkunitService
;
import
com.ximai.mes.md.vo.MdItemVo
;
import
com.ximai.mes.md.vo.MdWorkunitVo
;
...
...
@@ -41,6 +42,9 @@ public class MdWorkunitController extends BaseController {
@Autowired
private
MdWorkunitMapper
mdWorkunitMapper
;
@Autowired
private
IMdItemService
itemService
;
@Autowired
private
ITmToolMachinesService
tmToolMachinesService
;
...
...
@@ -56,6 +60,17 @@ public class MdWorkunitController extends BaseController {
return
getDataTable
(
list
);
}
/**
* 查询产线列表
*/
@ApiOperation
(
value
=
"查询产线列表"
)
@PreAuthorize
(
"@ss.hasPermi('md:workunit:list')"
)
@GetMapping
(
"/selectGroupLineName"
)
public
AjaxResult
<
List
<
String
>>
selectGroupLineName
()
{
List
<
String
>
list
=
itemService
.
selectGroupLineName
();
return
AjaxResult
.
success
(
list
);
}
/**
* 弹窗
...
...
mes/src/main/java/com/ximai/mes/md/domain/MdItem.java
View file @
53502dba
...
...
@@ -45,6 +45,9 @@ public class MdItem extends BaseEntity {
@Excel
(
name
=
"物料/产品"
,
type
=
Excel
.
Type
.
ALL
)
private
String
itemOrProduct
;
@ApiModelProperty
(
value
=
"所属产线"
)
private
String
lineName
;
private
Long
itemTypeId
;
private
String
itemTypeCode
;
...
...
mes/src/main/java/com/ximai/mes/md/domain/MdWorkunit.java
View file @
53502dba
...
...
@@ -38,8 +38,6 @@ public class MdWorkunit extends BaseEntity {
@ApiModelProperty
(
"工作中心编码"
)
private
Long
workstationId
;
/**
* 工作站编码
*/
...
...
@@ -71,6 +69,11 @@ public class MdWorkunit extends BaseEntity {
@ApiModelProperty
(
"工作单元名称"
)
private
String
workunitName
;
@ApiModelProperty
(
"机台顺序"
)
private
Integer
serial
;
@ApiModelProperty
(
"所属产线名"
)
private
Integer
lineName
;
/**
* 是否故障
...
...
mes/src/main/java/com/ximai/mes/md/mapper/MdItemMapper.java
View file @
53502dba
...
...
@@ -144,4 +144,12 @@ public interface MdItemMapper extends BaseMapper<MdItem> {
@Select
(
"select * from md_item ${ew.customSqlSegment}"
)
List
<
MdItem
>
selectListByQw
(
@Param
(
"ew"
)
QueryWrapper
<
MdItem
>
query
);
/**
* 分组查询产线列表
*
* @return
*/
@Select
(
value
=
"select line_name from md_item group by line_name"
)
List
<
String
>
selectGroupLineName
();
}
mes/src/main/java/com/ximai/mes/md/service/IMdItemService.java
View file @
53502dba
...
...
@@ -132,5 +132,7 @@ public interface IMdItemService {
* 初始同步新增ERP数据
*/
void
initSyncAddErpData
();
List
<
String
>
selectGroupLineName
();
}
mes/src/main/java/com/ximai/mes/md/service/impl/MdItemServiceImpl.java
View file @
53502dba
...
...
@@ -611,4 +611,9 @@ public class MdItemServiceImpl implements IMdItemService {
throw
new
ServiceException
(
rst
.
getErrorMessage
());
}
}
@Override
public
List
<
String
>
selectGroupLineName
()
{
return
mdItemMapper
.
selectGroupLineName
();
}
}
mes/src/main/java/com/ximai/mes/md/vo/MdWorkunitVo.java
View file @
53502dba
...
...
@@ -47,8 +47,8 @@ public class MdWorkunitVo extends BaseEntity {
@Excel
(
name
=
"工作站名称"
)
private
String
workstationName
;
// private String wsName
;
@ApiModelProperty
(
"机台顺序"
)
private
Integer
serial
;
/**
* 工作站编码
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/proWorkOrder/ProWorkorderServiceImpl.java
View file @
53502dba
...
...
@@ -430,6 +430,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
}
proWorkorder
.
setStatus
(
WorkorderStatusEnum
.
CLOSE
.
getValue
());
this
.
updateWorkorderState
(
proWorkorder
,
WorkorderStatusEnum
.
CLOSE
);
return
this
.
updateProWorkorder
(
proWorkorder
);
}
...
...
@@ -1618,8 +1619,8 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
String
workorderCode
=
proWorkorder
.
getWorkorderCode
();
String
arrangeCode
=
proWorkorder
.
getArrangeCode
();
QueryWrapper
<
ProTask
>
taskQueryWrapper
=
new
QueryWrapper
<>();
taskQueryWrapper
.
eq
(
arrangeCode
!=
null
,
"t
3
.arrange_code"
,
arrangeCode
);
taskQueryWrapper
.
eq
(
workorderCode
!=
null
,
"t
3
.workorder_code"
,
workorderCode
);
taskQueryWrapper
.
eq
(
arrangeCode
!=
null
,
"t
2
.arrange_code"
,
arrangeCode
);
taskQueryWrapper
.
eq
(
workorderCode
!=
null
,
"t
2
.workorder_code"
,
workorderCode
);
taskQueryWrapper
.
notIn
(
"t1.status"
,
statusSet
);
List
<
ProTaskVo
>
proTaskVos
=
proTaskService
.
selectProTaskJoinWorkorder
(
taskQueryWrapper
);
...
...
mes/src/main/java/com/ximai/mes/remote/process/WorkorderStateUpdateProcess.java
View file @
53502dba
...
...
@@ -21,7 +21,7 @@ public class WorkorderStateUpdateProcess implements IExtendedProcess {
ProWorkorderStateUpdate
stateUpdate
=
new
ProWorkorderStateUpdate
();
stateUpdate
.
setWorkorderCode
(
workorder
.
getWorkorderCode
());
stateUpdate
.
setWorkorderType
(
workorder
.
getWorkorderType
());
if
(
workorderStatusEnum
==
WorkorderStatusEnum
.
FINISHED
){
if
(
workorderStatusEnum
==
WorkorderStatusEnum
.
CLOSE
){
stateUpdate
.
setState
(
"y"
);
erpService
.
updateWorkorderState
(
stateUpdate
);
}
else
if
(
workorderStatusEnum
==
WorkorderStatusEnum
.
PRODUCING
){
...
...
mes/src/main/resources/mapper/md/MdItemMapper.xml
View file @
53502dba
...
...
@@ -22,6 +22,7 @@
<result
property=
"attr2"
column=
"attr2"
/>
<result
property=
"attr3"
column=
"attr3"
/>
<result
property=
"attr4"
column=
"attr4"
/>
<result
property=
"lineName"
column=
"line_name"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
...
...
@@ -65,6 +66,7 @@
<result
property=
"attr2"
column=
"attr2"
/>
<result
property=
"attr3"
column=
"attr3"
/>
<result
property=
"attr4"
column=
"attr4"
/>
<result
property=
"lineName"
column=
"line_name"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
...
...
@@ -257,6 +259,7 @@
<if
test=
"attr2 != null"
>
attr2,
</if>
<if
test=
"attr3 != null"
>
attr3,
</if>
<if
test=
"attr4 != null"
>
attr4,
</if>
<if
test=
"lineName != null"
>
line_name,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
...
...
@@ -293,6 +296,7 @@
<if
test=
"attr2 != null"
>
#{attr2},
</if>
<if
test=
"attr3 != null"
>
#{attr3},
</if>
<if
test=
"attr4 != null"
>
#{attr4},
</if>
<if
test=
"lineName != null"
>
#{lineName},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
...
...
@@ -333,6 +337,7 @@
<if
test=
"attr2 !=null and attr2 !=''"
>
attr2=#{attr2},
</if>
<if
test=
"attr3 !=null and attr3 !=0"
>
attr3=#{attr3},
</if>
<if
test=
"attr4 !=null and attr4 !=0"
>
attr4=#{attr4},
</if>
<if
test=
"lineName !=null and lineName !=''"
>
line_name=#{lineName},
</if>
<if
test=
"updateBy !=null and updateBy !=''"
>
update_by=#{updateBy},
</if>
<if
test=
"itemEnglishName !=null and itemEnglishName !=''"
>
item_english_name = #{itemEnglishName},
</if>
<if
test=
"itemNo !=null and itemNo !=''"
>
item_no = #{itemNo},
</if>
...
...
mes/src/main/resources/mapper/md/MdWorkunitMapper.xml
View file @
53502dba
...
...
@@ -9,6 +9,8 @@
<result
property=
"workstationId"
column=
"workstation_id"
/>
<result
property=
"workunitCode"
column=
"workunit_code"
/>
<result
property=
"workunitName"
column=
"workunit_name"
/>
<result
property=
"serial"
column=
"serial"
/>
<result
property=
"lineName"
column=
"line_name"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"createBy"
column=
"create_by"
/>
...
...
@@ -42,6 +44,8 @@
<result
property=
"workstationId"
column=
"workstation_id"
/>
<result
property=
"workunitCode"
column=
"workunit_code"
/>
<result
property=
"workunitName"
column=
"workunit_name"
/>
<result
property=
"serial"
column=
"serial"
/>
<result
property=
"lineName"
column=
"line_name"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"createBy"
column=
"create_by"
/>
...
...
@@ -84,6 +88,8 @@
workstation_code,
workunit_code,
workunit_name,
serial,
line_name,
fault_flag,
enable_flag,
remark,
...
...
@@ -120,6 +126,8 @@
w.workunit_name,
ws.workstation_code,
ws.workstation_name,
ws.line_name,
ws.serial,
w.fault_flag,
w.enable_flag,
w.remark,
...
...
@@ -227,6 +235,8 @@
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"workunitCode != null"
>
workunit_code,
</if>
<if
test=
"workunitName != null"
>
workunit_name,
</if>
<if
test=
"serial != null"
>
serial,
</if>
<if
test=
"lineName != null"
>
line_name,
</if>
<if
test=
"enableFlag != null"
>
enable_flag,
</if>
<if
test=
"faultFlag != null"
>
fault_flag,
</if>
<if
test=
"remark != null"
>
remark,
</if>
...
...
@@ -247,6 +257,8 @@
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"workunitCode != null"
>
#{workunitCode},
</if>
<if
test=
"workunitName != null"
>
#{workunitName},
</if>
<if
test=
"serial != null"
>
#{serial},
</if>
<if
test=
"lineName != null"
>
#{lineName},
</if>
<if
test=
"enableFlag != null"
>
#{enableFlag},
</if>
<if
test=
"faultFlag != null"
>
#{faultFlag},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
...
...
@@ -273,6 +285,8 @@
<if
test=
"workstationId != null"
>
workstation_id = #{workstationId},
</if>
<if
test=
"workunitCode != null"
>
workunit_code = #{workunitCode},
</if>
<if
test=
"workunitName != null"
>
workunit_name = #{workunitName},
</if>
<if
test=
"serial != null"
>
serial = #{serial},
</if>
<if
test=
"lineName != null"
>
line_name = #{lineName},
</if>
<if
test=
"enableFlag != null"
>
enable_flag = #{enableFlag},
</if>
<if
test=
"faultFlag != null"
>
fault_flag=#{faultFlag},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
...
...
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