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
4871ca48
Commit
4871ca48
authored
Nov 13, 2024
by
温志超
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
2f0f698d
04d12828
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
95 additions
and
14 deletions
+95
-14
application-th-prod.yml
admin/src/main/resources/application-th-prod.yml
+3
-1
logback.xml
admin/src/main/resources/logback.xml
+6
-1
ApiLog.java
common/src/main/java/com/ximai/common/annotation/ApiLog.java
+1
-1
InOutType.java
common/src/main/java/com/ximai/common/enums/InOutType.java
+4
-4
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
+12
-0
MdWorkunitVo.java
mes/src/main/java/com/ximai/mes/md/vo/MdWorkunitVo.java
+2
-2
ProProductQrcodeRuleDto.java
...n/java/com/ximai/mes/pro/dto/ProProductQrcodeRuleDto.java
+3
-0
ProWorkorderServiceImpl.java
...ro/service/impl/proWorkOrder/ProWorkorderServiceImpl.java
+11
-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 @
4871ca48
...
...
@@ -41,6 +41,8 @@ logging:
druid
:
sql
:
Statement
:
debug
file
:
name
:
mes.log
# Spring配置
spring
:
...
...
@@ -208,7 +210,7 @@ xss:
#Mino配置
minio
:
url
:
http://
localhost
:9000
url
:
http://
10.168.8.188
:9000
accessKey
:
minioadmin
secretKey
:
minioadmin
bucketName
:
mes
...
...
admin/src/main/resources/logback.xml
View file @
4871ca48
<?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>
...
...
common/src/main/java/com/ximai/common/annotation/ApiLog.java
View file @
4871ca48
...
...
@@ -34,7 +34,7 @@ public @interface ApiLog
/**
* 调入、调出
*/
public
InOutType
inOutType
()
default
InOutType
.
IN
;
public
InOutType
inOutType
()
default
InOutType
.
IN
NER
;
/**
* 是否保存请求的参数
...
...
common/src/main/java/com/ximai/common/enums/InOutType.java
View file @
4871ca48
package
com
.
ximai
.
common
.
enums
;
/**
*
操作人类别
*
内部/外部接口调用
*
*/
public
enum
InOutType
{
/**
*
其它
*
内部调用
*/
IN
,
IN
NER
,
/**
*
后台用户
*
外部接口调用
*/
OUT
,
...
...
mes/src/main/java/com/ximai/mes/md/controller/MdWorkunitController.java
View file @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -8,10 +8,13 @@ import cn.hutool.json.JSONArray;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.annotation.ApiLog
;
import
com.ximai.common.constant.UserConstants
;
import
com.ximai.common.core.domain.SapResult
;
import
com.ximai.common.core.domain.entity.MdItemType
;
import
com.ximai.common.core.domain.entity.SysDictData
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.common.enums.InOutType
;
import
com.ximai.common.exception.ServiceException
;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.SecurityUtils
;
...
...
@@ -39,6 +42,7 @@ import com.ximai.mes.remote.ErpService;
import
com.ximai.mes.remote.dto.*
;
import
com.ximai.system.service.ISysDictDataService
;
import
com.ximai.system.strategy.AutoCodeUtil
;
import
io.swagger.annotations.ApiOperation
;
import
org.codehaus.jackson.map.ObjectMapper
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -540,6 +544,9 @@ public class MdItemServiceImpl implements IMdItemService {
this
.
syncEditErpData
();
}
}
@ApiLog
(
businessType
=
BusinessType
.
SYNC_DATA
,
inOutType
=
InOutType
.
INNER
)
@ApiOperation
(
value
=
"物料同步"
)
@Transactional
@Override
public
void
syncEditErpData
(
MdItemErpDto
s
,
Map
<
Long
,
MdItemType
>
itemTypeMap
)
{
...
...
@@ -604,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 @
4871ca48
...
...
@@ -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/dto/ProProductQrcodeRuleDto.java
View file @
4871ca48
...
...
@@ -64,6 +64,9 @@ public class ProProductQrcodeRuleDto {
@ApiModelProperty
(
"当前流水"
)
private
Integer
currentSerial
;
@ApiModelProperty
(
"最后生成日期"
)
private
String
lastDateFmt
;
/** 创建者 */
@ApiModelProperty
(
"创建者"
)
private
String
createBy
;
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/proWorkOrder/ProWorkorderServiceImpl.java
View file @
4871ca48
...
...
@@ -11,8 +11,11 @@ import cn.hutool.poi.excel.ExcelUtil;
import
cn.hutool.poi.excel.ExcelWriter
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.github.pagehelper.PageHelper
;
import
com.ximai.common.annotation.ApiLog
;
import
com.ximai.common.constant.UserConstants
;
import
com.ximai.common.core.domain.entity.SysUser
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.common.enums.InOutType
;
import
com.ximai.common.exception.ServiceException
;
import
com.ximai.common.utils.MessageUtils
;
import
com.ximai.common.utils.SecurityUtils
;
...
...
@@ -64,6 +67,7 @@ import com.ximai.mes.wm.mapper.WmIssueLineMapper;
import
com.ximai.system.service.ISysDictDataService
;
import
com.ximai.system.service.ISysUserService
;
import
com.ximai.system.strategy.AutoCodeUtil
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -426,6 +430,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
}
proWorkorder
.
setStatus
(
WorkorderStatusEnum
.
CLOSE
.
getValue
());
this
.
updateWorkorderState
(
proWorkorder
,
WorkorderStatusEnum
.
CLOSE
);
return
this
.
updateProWorkorder
(
proWorkorder
);
}
...
...
@@ -1061,6 +1066,7 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
* @param proWorkorder 生产工单
* @return 结果
*/
@Override
public
int
insertProWorkorder
(
ProWorkorder
proWorkorder
)
{
if
(
proWorkorder
.
getParentId
()
!=
null
)
{
...
...
@@ -1613,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
);
...
...
@@ -1768,6 +1774,9 @@ public class ProWorkorderServiceImpl implements IProWorkorderService {
this
.
syncEditErpData
();
}
}
@ApiLog
(
businessType
=
BusinessType
.
SYNC_DATA
,
inOutType
=
InOutType
.
INNER
)
@ApiOperation
(
value
=
"工单同步"
)
@Transactional
@Override
public
void
syncEditErpData
(
ProWorkorderErpDto
s
,
Map
<
String
,
MdItem
>
itemMap
)
{
...
...
mes/src/main/java/com/ximai/mes/remote/process/WorkorderStateUpdateProcess.java
View file @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -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 @
4871ca48
...
...
@@ -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