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
27019d57
Commit
27019d57
authored
Sep 18, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报工调整
parent
48aee805
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
36 deletions
+35
-36
ProFeedback.java
mes/src/main/java/com/ximai/mes/pro/domain/ProFeedback.java
+4
-13
ProProcess.java
mes/src/main/java/com/ximai/mes/pro/domain/ProProcess.java
+3
-0
ProTask.java
mes/src/main/java/com/ximai/mes/pro/domain/task/ProTask.java
+4
-0
ProTaskMapper.java
...ain/java/com/ximai/mes/pro/mapper/task/ProTaskMapper.java
+1
-1
ProTaskServiceImpl.java
...m/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
+1
-22
ProTaskWorkunitServiceImpl.java
...mes/pro/service/impl/task/ProTaskWorkunitServiceImpl.java
+13
-0
ProFeedbackMapper.xml
mes/src/main/resources/mapper/pro/ProFeedbackMapper.xml
+5
-0
ProProcessMapper.xml
mes/src/main/resources/mapper/pro/ProProcessMapper.xml
+4
-0
No files found.
mes/src/main/java/com/ximai/mes/pro/domain/ProFeedback.java
View file @
27019d57
...
...
@@ -302,21 +302,12 @@ public class ProFeedback extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
printContents
;
@ApiModelProperty
(
"小包装数量"
)
@TableField
(
exist
=
false
)
private
Integer
minPackageNum
;
@ApiModelProperty
(
"指令报工数据"
)
@TableField
(
exist
=
false
)
private
List
<
ProWorkOrderSoDirectiveReport
>
directiveReportData
;
@ApiModelProperty
(
"SIZE报工数据"
)
@TableField
(
exist
=
false
)
private
List
<
ProWorkOrderSoSizeItemReport
>
sizeReportData
;
@ApiModelProperty
(
"包装标签二维码"
)
@ApiModelProperty
(
"标签二维码"
)
private
String
qrcode
;
@ApiModelProperty
(
"Decompression"
)
private
String
decompressionValue
;
private
String
sapRequestParam
;
private
String
sapResponse
;
...
...
mes/src/main/java/com/ximai/mes/pro/domain/ProProcess.java
View file @
27019d57
...
...
@@ -39,6 +39,9 @@ public class ProProcess extends BaseEntity
@ApiModelProperty
(
"是否包装工序,1:是,0:否"
)
private
String
isPackage
;
@ApiModelProperty
(
"是否序列号报工,1:是,0:否"
)
private
Integer
isSerialReport
;
private
String
isExistTool
;
/** 预留字段1 */
private
String
attr1
;
...
...
mes/src/main/java/com/ximai/mes/pro/domain/task/ProTask.java
View file @
27019d57
...
...
@@ -293,6 +293,10 @@ public class ProTask extends BaseEntity {
@TableField
(
exist
=
false
)
private
String
isPackage
;
@ApiModelProperty
(
"是否序列号报工"
)
@TableField
(
exist
=
false
)
private
String
isSerialReport
;
@TableField
(
exist
=
false
)
private
String
statusName
;
@TableField
(
exist
=
false
)
...
...
mes/src/main/java/com/ximai/mes/pro/mapper/task/ProTaskMapper.java
View file @
27019d57
...
...
@@ -159,7 +159,7 @@ public interface ProTaskMapper extends BaseMapper<ProTask> {
"\t, t.duration, ptw.schedule_end_date, t.color_code, t.request_date, t.remark\n"
+
"\t, t.attr1, t.attr2, t.attr3, t.attr4, t.create_by\n"
+
"\t, t.create_time, t.update_by, t.update_time, ptw.STATUS,ptw.task_type, ptw.quantity_qualify\n"
+
"\t, ptw.quantity_unqualify, mw.workunit_id, mw.workunit_code, mw.workunit_name, t.arrange_code, proc.is_package\n"
+
"\t, ptw.quantity_unqualify, mw.workunit_id, mw.workunit_code, mw.workunit_name, t.arrange_code, proc.is_package
, proc.is_serial_report
\n"
+
"\t, (case ptw.STATUS when 'BEGINNING' then 1 when 'PAUSE' then 2 when 'ERROR_STOP' then 3 when 'PREPARE' then 4 end) statusIndex \n"
+
"from pro_task t\n"
+
"\tleft join pro_task_workunit ptw on ptw.task_id = t.task_id\n"
+
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskServiceImpl.java
View file @
27019d57
...
...
@@ -1859,28 +1859,7 @@ public class ProTaskServiceImpl implements IProTaskService {
query
.
in
(
"t.task_id"
,
taskVoList
.
stream
().
map
(
ProTaskVo:
:
getTaskId
).
collect
(
Collectors
.
toList
()));
}
}
//判断是否前端有没传来工单或者是编码
if
(
StringUtils
.
isNotEmpty
(
proTaskQuery
.
getArrangeCode
()))
{
QueryWrapper
<
ProTask
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
in
(
"ptw.status"
,
statusList
);
queryWrapper
.
eq
(
proTask
.
getWorkunitId
()
!=
null
,
"mw.workunit_id"
,
proTask
.
getWorkunitId
());
queryWrapper
.
gt
(
proTask
.
getAllowProduce
()
!=
null
&&
proTask
.
getAllowProduce
()
==
1
,
"t.quantity_wait"
,
0
);
queryWrapper
.
orderByAsc
(
"statusIndex"
).
orderByAsc
(
"ptw.schedule_start_date"
);
List
<
ProTask
>
proTasks
=
this
.
selectProTaskJoinTaskWorkUnit
(
queryWrapper
);
List
<
ProTask
>
proTasks1
=
this
.
selectProTaskJoinTaskWorkUnit
(
query
);
for
(
ProTask
task
:
proTasks1
)
{
for
(
ProTask
task1
:
proTasks
)
{
if
(
task
.
getTaskId
().
equals
(
task1
.
getTaskId
()))
{
task1
.
setLocation
(
1L
);
}
}
}
list
.
addAll
(
proTasks
);
}
else
{
list
=
this
.
selectProTaskJoinTaskWorkUnit
(
query
);
}
list
=
this
.
selectProTaskJoinTaskWorkUnit
(
query
);
rst
=
list
.
stream
().
filter
(
t
->
!
TaskStatusEnum
.
FINISHED
.
getStatus
().
equals
(
t
.
getStatus
())).
collect
(
Collectors
.
toList
());
if
(
CollectionUtil
.
isNotEmpty
(
rst
))
{
...
...
mes/src/main/java/com/ximai/mes/pro/service/impl/task/ProTaskWorkunitServiceImpl.java
View file @
27019d57
...
...
@@ -3,6 +3,7 @@ package com.ximai.mes.pro.service.impl.task;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.NumberUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.ximai.common.core.domain.BaseEntity
;
import
com.ximai.common.core.domain.entity.SysUser
;
...
...
@@ -440,6 +441,10 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
ProTaskWorkunit
taskWorkunit
=
this
.
selectProTaskWorkunitByTaskWorkunitId
(
outsourceSplitParam
.
getTaskWorkunitId
());
ProTaskWorkunit
newTaskWorkunit
=
BeanUtil
.
copyProperties
(
taskWorkunit
,
ProTaskWorkunit
.
class
);
newTaskWorkunit
.
setQuantity
(
outsourceSplitParam
.
getSplitQuantity
());
newTaskWorkunit
.
setQuantityQualify
(
BigDecimal
.
ZERO
);
newTaskWorkunit
.
setQuantityUnqualify
(
BigDecimal
.
ZERO
);
newTaskWorkunit
.
setQuantityProduced
(
BigDecimal
.
ZERO
);
newTaskWorkunit
.
setQuantityChanged
(
BigDecimal
.
ZERO
);
BeanUtil
.
copyProperties
(
outsourceSplitParam
,
newTaskWorkunit
);
this
.
insertProTaskWorkunit
(
newTaskWorkunit
);
//原数量扣减
...
...
@@ -456,11 +461,19 @@ public class ProTaskWorkunitServiceImpl implements IProTaskWorkunitService {
ProTaskWorkunit
newTaskWorkunit
=
BeanUtil
.
copyProperties
(
taskWorkunit
,
ProTaskWorkunit
.
class
);
newTaskWorkunit
.
setWorkunitId
(
IMdWorkunitService
.
OUTSOURCE_WORKUNIT_ID
);
newTaskWorkunit
.
setQuantity
(
toOutsourceParam
.
getToOutsourceQuantity
());
newTaskWorkunit
.
setQuantityQualify
(
BigDecimal
.
ZERO
);
newTaskWorkunit
.
setQuantityUnqualify
(
BigDecimal
.
ZERO
);
newTaskWorkunit
.
setQuantityProduced
(
BigDecimal
.
ZERO
);
newTaskWorkunit
.
setQuantityChanged
(
BigDecimal
.
ZERO
);
BeanUtil
.
copyProperties
(
toOutsourceParam
,
newTaskWorkunit
);
this
.
insertProTaskWorkunit
(
newTaskWorkunit
);
//原数量扣减
taskWorkunit
.
setQuantity
(
taskWorkunit
.
getQuantity
().
subtract
(
toOutsourceParam
.
getToOutsourceQuantity
()));
this
.
updateProTaskWorkunit
(
taskWorkunit
);
//待加工数量扣减
ProTask
proTask
=
proTaskService
.
selectProTaskByTaskId
(
taskWorkunit
.
getTaskId
());
proTask
.
setQuantityWait
(
NumberUtil
.
max
(
proTask
.
getQuantityWait
().
subtract
(
toOutsourceParam
.
getToOutsourceQuantity
()),
BigDecimal
.
ZERO
));
proTaskService
.
updateProTask
(
proTask
);
});
}
...
...
mes/src/main/resources/mapper/pro/ProFeedbackMapper.xml
View file @
27019d57
...
...
@@ -47,6 +47,7 @@
<result
property=
"recordUser"
column=
"record_user"
/>
<result
property=
"recordNick"
column=
"record_nick"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"decompressionValue"
column=
"decompression_value"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"qrcode"
column=
"qrcode"
/>
<result
property=
"attr1"
column=
"attr1"
/>
...
...
@@ -96,6 +97,7 @@
f.record_user,
f.record_nick,
f.status,
f.decompression_value,
f.remark,
f.attr1,
f.attr2,
...
...
@@ -207,6 +209,7 @@
<if
test=
"workorderSoSizes != null"
>
workorder_so_sizes,
</if>
<if
test=
"netWeight != null"
>
net_weight,
</if>
<if
test=
"quantityStorage != null"
>
quantity_storage,
</if>
<if
test=
"decompressionValue != null"
>
decompression_value,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"machineTime != null"
>
machine_time,
</if>
<if
test=
"qrcode != null"
>
qrcode,
</if>
...
...
@@ -261,6 +264,7 @@
<if
test=
"workorderSoSizes != null"
>
#{workorderSoSizes},
</if>
<if
test=
"netWeight != null"
>
#{netWeight},
</if>
<if
test=
"quantityStorage != null"
>
#{quantityStorage},
</if>
<if
test=
"decompressionValue != null"
>
#{decompressionValue},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"machineTime != null"
>
#{machineTime},
</if>
<if
test=
"qrcode != null"
>
#{qrcode},
</if>
...
...
@@ -317,6 +321,7 @@
<if
test=
"workorderSoSizeItemId != null"
>
workorder_so_size_item_id = #{workorderSoSizeItemId},
</if>
<if
test=
"netWeight != null"
>
net_weight = #{netWeight},
</if>
<if
test=
"quantityStorage != null"
>
quantity_storage = #{quantityStorage},
</if>
<if
test=
"decompressionValue != null"
>
decompression_value = #{decompressionValue},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"machineTime != null"
>
machine_time = #{machineTime},
</if>
<if
test=
"qrcode != null"
>
qrcode = #{qrcode},
</if>
...
...
mes/src/main/resources/mapper/pro/ProProcessMapper.xml
View file @
27019d57
...
...
@@ -11,6 +11,7 @@
<result
property=
"attention"
column=
"attention"
/>
<result
property=
"enableFlag"
column=
"enable_flag"
/>
<result
property=
"isPackage"
column=
"is_package"
/>
<result
property=
"isSerialReport"
column=
"is_serial_report"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"attr1"
column=
"attr1"
/>
<result
property=
"attr2"
column=
"attr2"
/>
...
...
@@ -78,6 +79,7 @@
<if
test=
"attention != null"
>
attention,
</if>
<if
test=
"enableFlag != null and enableFlag != ''"
>
enable_flag,
</if>
<if
test=
"isPackage != null"
>
is_package,
</if>
<if
test=
"isSerialReport != null"
>
is_serial_report,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"attr1 != null"
>
attr1,
</if>
<if
test=
"attr2 != null"
>
attr2,
</if>
...
...
@@ -95,6 +97,7 @@
<if
test=
"attention != null"
>
#{attention},
</if>
<if
test=
"enableFlag != null and enableFlag != ''"
>
#{enableFlag},
</if>
<if
test=
"isPackage != null"
>
#{isPackage},
</if>
<if
test=
"isSerialReport != null"
>
#{isSerialReport},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"attr1 != null"
>
#{attr1},
</if>
<if
test=
"attr2 != null"
>
#{attr2},
</if>
...
...
@@ -118,6 +121,7 @@
<if
test=
"isExistTool != null"
>
is_exist_tool = #{isExistTool},
</if>
<if
test=
"enableFlag != null and enableFlag != ''"
>
enable_flag = #{enableFlag},
</if>
<if
test=
"isPackage != null"
>
is_package = #{isPackage},
</if>
<if
test=
"isSerialReport != null"
>
is_serial_report = #{isSerialReport},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"attr1 != null"
>
attr1 = #{attr1},
</if>
<if
test=
"attr2 != null"
>
attr2 = #{attr2},
</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