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
40a655c1
Commit
40a655c1
authored
Nov 27, 2024
by
温志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新报表
parent
ede6e3cf
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
469 additions
and
52 deletions
+469
-52
ProFeedback.java
mes/src/main/java/com/ximai/mes/pro/domain/ProFeedback.java
+28
-1
ProFeedbackMapper.java
...main/java/com/ximai/mes/pro/mapper/ProFeedbackMapper.java
+3
-0
ProWorkorderMapper.java
...ximai/mes/pro/mapper/proWorkOrder/ProWorkorderMapper.java
+4
-0
ProTaskMapper.java
...ain/java/com/ximai/mes/pro/mapper/task/ProTaskMapper.java
+3
-0
ProProductQrcodeRecordServiceImpl.java
...s/pro/service/impl/ProProductQrcodeRecordServiceImpl.java
+2
-0
QcAbnormalReportServiceImpl.java
...imai/mes/qc/service/impl/QcAbnormalReportServiceImpl.java
+3
-0
FeedbackController.java
...a/com/ximai/mes/report/controller/FeedbackController.java
+18
-17
WorkOrderProgressController.java
...ai/mes/report/controller/WorkOrderProgressController.java
+58
-0
FeedbackRequest.java
...in/java/com/ximai/mes/report/request/FeedbackRequest.java
+18
-11
WorkOrderProgressRequest.java
...om/ximai/mes/report/request/WorkOrderProgressRequest.java
+44
-0
FeedbackResponse.java
.../java/com/ximai/mes/report/response/FeedbackResponse.java
+16
-16
WorkOrderProgressFeedbackListResponse.java
...eport/response/WorkOrderProgressFeedbackListResponse.java
+28
-0
WorkOrderProgressListResponse.java
...ai/mes/report/response/WorkOrderProgressListResponse.java
+54
-0
WorkOrderProgressProcessListResponse.java
...report/response/WorkOrderProgressProcessListResponse.java
+26
-0
WorkOrderProgressService.java
...om/ximai/mes/report/service/WorkOrderProgressService.java
+16
-0
WorkOrderProgressServiceImp.java
.../mes/report/service/impl/WorkOrderProgressServiceImp.java
+73
-0
ProFeedbackMapper.xml
mes/src/main/resources/mapper/pro/ProFeedbackMapper.xml
+60
-7
ProWorkorderMapper.xml
.../resources/mapper/pro/proWorkOrder/ProWorkorderMapper.xml
+11
-0
ProTaskMapper.xml
mes/src/main/resources/mapper/pro/task/ProTaskMapper.xml
+4
-0
No files found.
mes/src/main/java/com/ximai/mes/pro/domain/ProFeedback.java
View file @
40a655c1
...
...
@@ -69,29 +69,34 @@ public class ProFeedback extends BaseEntity {
* 工作中心ID
*/
@Excel
(
name
=
"工作中心ID"
)
@ApiModelProperty
(
"工单类型"
)
private
Long
workstationId
;
/**
* 工作中心编号
*/
@Excel
(
name
=
"工作中心编号"
)
@ApiModelProperty
(
"工单类型"
)
private
String
workstationCode
;
/**
* 工作中心名称
*/
@Excel
(
name
=
"工作中心名称"
)
@ApiModelProperty
(
"工单类型"
)
private
String
workstationName
;
/**
* 工序ID
*/
@ApiModelProperty
(
"工单类型"
)
private
Long
processId
;
/**
* 工序编码
*/
@Excel
(
name
=
"工序编码"
)
@ApiModelProperty
(
"工单类型"
)
private
String
processCode
;
/**
...
...
@@ -114,12 +119,14 @@ public class ProFeedback extends BaseEntity {
* 生产工单编号
*/
@Excel
(
name
=
"生产工单编号"
)
@ApiModelProperty
(
"生产工单编号"
)
private
String
workorderCode
;
/**
* 生产工单名称
*/
@Excel
(
name
=
"生产工单名称"
)
@ApiModelProperty
(
"生产工单名称"
)
private
String
workorderName
;
/**
...
...
@@ -132,6 +139,7 @@ public class ProFeedback extends BaseEntity {
* 生产任务编号
*/
@Excel
(
name
=
"生产任务编号"
)
@ApiModelProperty
(
"生产任务编号"
)
private
String
taskCode
;
/**
...
...
@@ -144,30 +152,35 @@ public class ProFeedback extends BaseEntity {
* 产品物料编码
*/
@Excel
(
name
=
"产品物料编码"
)
@ApiModelProperty
(
"产品物料编码"
)
private
String
itemCode
;
/**
* sap产品物料编码
*/
@Excel
(
name
=
"sap产品物料编码"
)
@ApiModelProperty
(
"sap产品物料编码"
)
private
String
sapItemCode
;
/**
* 产品物料名称
*/
@Excel
(
name
=
"产品物料名称"
)
@ApiModelProperty
(
"产品物料名称"
)
private
String
itemName
;
/**
* 规格型号
*/
@Excel
(
name
=
"规格型号"
)
@ApiModelProperty
(
"规格型号"
)
private
String
specification
;
/**
* 单位
*/
@Excel
(
name
=
"单位"
)
@ApiModelProperty
(
"单位"
)
private
String
unitOfMeasure
;
...
...
@@ -175,40 +188,47 @@ public class ProFeedback extends BaseEntity {
* 排产数量
*/
@Excel
(
name
=
"排产数量"
)
@ApiModelProperty
(
"排产数量"
)
private
BigDecimal
quantity
;
/**
* 本次报工数量
*/
@Excel
(
name
=
"本次报工数量"
)
@ApiModelProperty
(
"本次报工数量"
)
private
BigDecimal
quantityFeedback
;
/**
* 合格品数量
*/
@Excel
(
name
=
"合格品数量"
)
@ApiModelProperty
(
"合格品数量"
)
private
BigDecimal
quantityQualify
;
/**
* 不良品数量
*/
@Excel
(
name
=
"不良品数量"
)
@ApiModelProperty
(
"不良品数量"
)
private
BigDecimal
quantityUnqualify
;
@Excel
(
name
=
"待检测数量"
)
@ApiModelProperty
(
"待检测数量"
)
private
BigDecimal
quantityUncheck
;
/**
* 报工用户名
*/
@Excel
(
name
=
"报工用户名"
)
@ApiModelProperty
(
"报工用户名"
)
private
String
userName
;
private
String
userId
;
/**
* 昵称
*/
@Excel
(
name
=
"昵称"
)
@Excel
(
name
=
"报工用户昵称"
)
@ApiModelProperty
(
"报工用户昵称"
)
private
String
nickName
;
/**
...
...
@@ -230,12 +250,14 @@ public class ProFeedback extends BaseEntity {
* 审批人员
*/
@Excel
(
name
=
"审批人员"
)
@ApiModelProperty
(
"审批人员"
)
private
String
recordUser
;
/**
* 审批人员名称
*/
@Excel
(
name
=
"审批人员名称"
)
@ApiModelProperty
(
"审批人员名称"
)
private
String
recordNick
;
/**
...
...
@@ -314,16 +336,21 @@ public class ProFeedback extends BaseEntity {
private
String
sapRequestParam
;
private
String
sapResponse
;
@ApiModelProperty
(
"异常原因ID"
)
private
Long
abnormalId
;
/** 异常类型 */
@ApiModelProperty
(
"异常类型"
)
private
String
abnormalType
;
/** 异常原因 */
@ApiModelProperty
(
"异常原因"
)
private
String
abnormalReason
;
/** 异常原因 备注*/
@ApiModelProperty
(
"异常原因 备注"
)
private
String
abnormalRemark
;
@ApiModelProperty
(
"是否最后一次报工"
)
private
Boolean
lastFeedback
;
...
...
mes/src/main/java/com/ximai/mes/pro/mapper/ProFeedbackMapper.java
View file @
40a655c1
...
...
@@ -7,6 +7,7 @@ import com.ximai.mes.pro.domain.vo.ProProcessTaskVo;
import
com.ximai.mes.pro.dto.ProFeedbackDto
;
import
com.ximai.mes.report.request.FeedbackRequest
;
import
com.ximai.mes.report.response.FeedbackResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressFeedbackListResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.security.core.parameters.P
;
...
...
@@ -139,4 +140,6 @@ public interface ProFeedbackMapper {
List
<
FeedbackResponse
>
getListByUser
(
FeedbackRequest
feedbackRequest
);
int
selectCount
(
@Param
(
"taskIds"
)
List
<
Long
>
taskIds
);
List
<
WorkOrderProgressFeedbackListResponse
>
getFeedbackList
(
@Param
(
"workorderCode"
)
String
workorderCode
,
@Param
(
"taskId"
)
Long
taskId
);
}
mes/src/main/java/com/ximai/mes/pro/mapper/proWorkOrder/ProWorkorderMapper.java
View file @
40a655c1
...
...
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import
com.ximai.mes.pro.domain.proWorkOrder.ProWorkorder
;
import
com.ximai.mes.pro.domain.task.ProTask
;
import
com.ximai.mes.pro.domain.vo.*
;
import
com.ximai.mes.report.request.WorkOrderProgressRequest
;
import
com.ximai.mes.report.response.WorkOrderProgressListResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
...
...
@@ -150,4 +152,6 @@ public interface ProWorkorderMapper extends BaseMapper<ProWorkorder> {
int
updateProductionSolution
(
@Param
(
"productionSolutionId"
)
Long
productionSolutionId
,
@Param
(
"productionSolutionCode"
)
String
productionSolutionCode
,
@Param
(
"productionSolutionName"
)
String
productionSolutionName
,
@Param
(
"workorderId"
)
Long
workorderId
);
void
rollBACKschedule
(
@Param
(
"workorderCode"
)
String
workorderCode
,
@Param
(
"quantity"
)
BigDecimal
quantity
,
@Param
(
"username"
)
String
username
);
List
<
WorkOrderProgressListResponse
>
getWorkOrderProgressServiceList
(
WorkOrderProgressRequest
workOrderProgressRequest
);
}
mes/src/main/java/com/ximai/mes/pro/mapper/task/ProTaskMapper.java
View file @
40a655c1
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.ximai.mes.pro.domain.task.ProTask
;
import
com.ximai.mes.pro.domain.vo.ProTaskVo
;
import
com.ximai.mes.report.response.WorkOrderProgressProcessListResponse
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
...
...
@@ -197,4 +198,6 @@ public interface ProTaskMapper extends BaseMapper<ProTask> {
List
<
ProTask
>
selectByTaskBatch
(
@Param
(
"taskBatch"
)
String
taskBatch
);
void
deleteByTaskBatch
(
@Param
(
"taskBatch"
)
String
taskBatch
);
List
<
WorkOrderProgressProcessListResponse
>
getProcessList
(
@Param
(
"workorderCode"
)
String
workorderCode
);
}
mes/src/main/java/com/ximai/mes/pro/service/impl/ProProductQrcodeRecordServiceImpl.java
View file @
40a655c1
...
...
@@ -16,6 +16,7 @@ import com.ximai.mes.pro.dto.ProProductQrcodeRecordCreate;
import
com.ximai.mes.pro.dto.ProProductQrcodeRecordUpdate
;
import
com.ximai.mes.pro.dto.ProProductQrcodeRecordDto
;
import
com.ximai.mes.pro.service.IProProductQrcodeRecordService
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* 产品序列号打印记录Service业务层处理
...
...
@@ -138,6 +139,7 @@ public class ProProductQrcodeRecordServiceImpl implements IProProductQrcodeRecor
}
@Override
@Transactional
public
int
addPrintTime
(
List
<
Long
>
proProductQrcodeRecordUpdateList
)
{
if
(
proProductQrcodeRecordUpdateList
.
size
()
<
1
)
return
0
;
...
...
mes/src/main/java/com/ximai/mes/qc/service/impl/QcAbnormalReportServiceImpl.java
View file @
40a655c1
...
...
@@ -28,6 +28,7 @@ import com.ximai.system.strategy.AutoCodeUtil;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -183,6 +184,7 @@ public class QcAbnormalReportServiceImpl implements IQcAbnormalReportService {
* @return 结果
*/
@Override
@Transactional
public
void
updateQcAbnormalReportAbmornalStatud
(
QcAbnormalReport
qcAbnormalReportInput
)
{
QcAbnormalReport
qcAbnormalReport
=
qcAbnormalReportMapper
.
selectQcAbnormalReportByAbnormalReportId
(
qcAbnormalReportInput
.
getAbnormalReportId
());
if
(
qcAbnormalReportInput
.
getAbnormalStatus
().
equals
(
"CLOSE"
)){
...
...
@@ -221,6 +223,7 @@ public class QcAbnormalReportServiceImpl implements IQcAbnormalReportService {
}
@Override
@Transactional
public
void
start
(
Long
abnormalReportIds
)
{
QcAbnormalReport
qcAbnormalReport
=
qcAbnormalReportMapper
.
selectQcAbnormalReportByAbnormalReportId
(
abnormalReportIds
);
if
(
qcAbnormalReport
==
null
)
...
...
mes/src/main/java/com/ximai/mes/report/controller/FeedbackController.java
View file @
40a655c1
...
...
@@ -16,10 +16,11 @@ import org.springframework.security.access.prepost.PreAuthorize;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.DecimalFormat
;
import
java.util.List
;
@Api
(
"生产报工"
)
@Api
(
"生产报工
报表
"
)
@RestController
@RequestMapping
(
"/report/pro/feedback"
)
public
class
FeedbackController
extends
BaseController
{
...
...
@@ -33,7 +34,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getList"
)
public
TableDataInfo
getList
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getList
(
feedbackRequest
);
return
getDataTable
(
feedbackResponseList
);
...
...
@@ -41,11 +42,11 @@ public class FeedbackController extends BaseController {
@ApiOperation
(
"生产报工记录"
)
@ApiOperation
(
"生产报工记录
:统计方式工单
"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工单"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkOrder"
)
public
TableDataInfo
getListByWorkOrder
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getListByWorkOrder
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkOrder
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -53,7 +54,7 @@ public class FeedbackController extends BaseController {
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()
,
2
,
RoundingMode
.
HALF_UP
).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
...
...
@@ -65,7 +66,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式车间"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkshop"
)
public
TableDataInfo
getListByWorkshop
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getListByWorkshop
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkshop
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -73,7 +74,7 @@ public class FeedbackController extends BaseController {
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()
,
2
,
RoundingMode
.
HALF_UP
).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
...
...
@@ -85,7 +86,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工作中心"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkstation"
)
public
TableDataInfo
getListByWorkstation
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getListByWorkstation
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkstation
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -93,7 +94,7 @@ public class FeedbackController extends BaseController {
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()
,
2
,
RoundingMode
.
HALF_UP
).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
...
...
@@ -106,7 +107,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工作单元"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByWorkunit"
)
public
TableDataInfo
getListByWorkunit
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getListByWorkunit
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByWorkunit
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -114,7 +115,7 @@ public class FeedbackController extends BaseController {
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()
,
2
,
RoundingMode
.
HALF_UP
).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
...
...
@@ -130,7 +131,7 @@ public class FeedbackController extends BaseController {
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式工序"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByProcess"
)
public
TableDataInfo
getListByProcess
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getListByProcess
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByProcess
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -138,7 +139,7 @@ public class FeedbackController extends BaseController {
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()
,
2
,
RoundingMode
.
HALF_UP
).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
...
...
@@ -147,11 +148,11 @@ public class FeedbackController extends BaseController {
}
@ApiOperation
(
"生产报工记录:统计方式
工序
"
)
@ApiOperation
(
"生产报工记录:统计方式
用户
"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产报工记录:统计方式
工序
"
,
businessType
=
BusinessType
.
QUERY
)
@Log
(
title
=
"生产报工记录:统计方式
用户
"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getListByUser"
)
public
TableDataInfo
getListByUser
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
<
FeedbackResponse
>
getListByUser
(
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getListByUser
(
feedbackRequest
);
DecimalFormat
df
=
new
DecimalFormat
(
"0.00%"
);
...
...
@@ -159,7 +160,7 @@ public class FeedbackController extends BaseController {
if
(
feedbackResponse
.
getQuantityFeedback
()
!=
null
&&
feedbackResponse
.
getQuantityFeedback
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
&&
feedbackResponse
.
getQuantityUnqualify
()!=
null
){
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()).
doubleValue
())));
feedbackResponse
.
setQualificationRate
(
df
.
format
((
feedbackResponse
.
getQuantityQualify
().
divide
(
feedbackResponse
.
getQuantityFeedback
()
,
2
,
RoundingMode
.
HALF_UP
).
doubleValue
())));
}
else
{
feedbackResponse
.
setQualificationRate
(
"0.00%"
);
}
...
...
mes/src/main/java/com/ximai/mes/report/controller/WorkOrderProgressController.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
controller
;
import
com.ximai.common.annotation.Log
;
import
com.ximai.common.core.controller.BaseController
;
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.request.WorkOrderProgressRequest
;
import
com.ximai.mes.report.response.FeedbackResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressFeedbackListResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressListResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressProcessListResponse
;
import
com.ximai.mes.report.service.WorkOrderProgressService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@Api
(
"生产进度"
)
@RestController
@RequestMapping
(
"/report/pro/workOrderProgress"
)
public
class
WorkOrderProgressController
extends
BaseController
{
@Autowired
WorkOrderProgressService
workOrderProgressService
;
@ApiOperation
(
"生产进度:明细界面"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产进度:明细界面"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getList"
)
public
TableDataInfo
<
WorkOrderProgressListResponse
>
getList
(
WorkOrderProgressRequest
workOrderProgressRequest
)
{
startPage
();
List
<
WorkOrderProgressListResponse
>
workOrderProgressListResponses
=
workOrderProgressService
.
getList
(
workOrderProgressRequest
);
return
getDataTable
(
workOrderProgressListResponses
);
}
@ApiOperation
(
"生产进度:工序明细"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产进度:工序明细"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getProcessList"
)
public
TableDataInfo
<
WorkOrderProgressProcessListResponse
>
getProcessList
(
@RequestParam
(
"workorderCode"
)
String
workorderCode
)
{
List
<
WorkOrderProgressProcessListResponse
>
workOrderProgressListResponses
=
workOrderProgressService
.
getProcessList
(
workorderCode
);
return
getDataTable
(
workOrderProgressListResponses
);
}
@ApiOperation
(
"生产进度:报工明细"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:get')"
)
@Log
(
title
=
"生产进度:报工明细"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getFeedbackList"
)
public
TableDataInfo
<
WorkOrderProgressFeedbackListResponse
>
getFeedbackList
(
@RequestParam
(
"taskId"
)
Long
taskId
,
@RequestParam
(
"workorderCode"
)
String
workorderCode
)
{
List
<
WorkOrderProgressFeedbackListResponse
>
workOrderProgressFeedbackListResponses
=
workOrderProgressService
.
getFeedbackList
(
workorderCode
,
taskId
);
return
getDataTable
(
workOrderProgressFeedbackListResponses
);
}
}
mes/src/main/java/com/ximai/mes/report/request/FeedbackRequest.java
View file @
40a655c1
...
...
@@ -4,9 +4,10 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.ximai.common.annotation.Excel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
FeedbackRequest
{
// 工单类型(下拉选择工单类型)
// 项目号(工单项目号)
...
...
@@ -26,7 +27,7 @@ public class FeedbackRequest {
/**
* 工单类型
*/
@ApiModelProperty
(
name
=
"工单类型"
)
@ApiModelProperty
(
"工单类型"
)
private
String
workorderType
;
...
...
@@ -40,45 +41,51 @@ public class FeedbackRequest {
/**
* 工单编码
*/
@ApiModelProperty
(
name
=
"工单编码"
)
@ApiModelProperty
(
"工单编码"
)
private
String
workorderCode
;
/**
* 任务编号
*/
@ApiModelProperty
(
name
=
"工序任务号"
)
@ApiModelProperty
(
"工序任务号"
)
private
String
taskCode
;
/**
* 产品编号
*/
@ApiModelProperty
(
name
=
"产品编号"
)
@ApiModelProperty
(
"产品编号"
)
private
String
productCode
;
/**
* 产品编号
*/
@ApiModelProperty
(
name
=
"产品编号"
)
@ApiModelProperty
(
"产品编号"
)
private
String
productId
;
/**
* 产品名称
*/
@ApiModelProperty
(
name
=
"产品名称"
)
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
/**
* 工序ID
*/
@ApiModelProperty
(
name
=
"工序ID"
)
@ApiModelProperty
(
"工序ID"
)
private
Long
processId
;
/**
* 工序编码
*/
@ApiModelProperty
(
name
=
"工序编码"
)
@ApiModelProperty
(
"工序编码"
)
private
String
processCode
;
/**
* 工序编码
*/
@ApiModelProperty
(
"工序名称"
)
private
String
processName
;
/**
* 车间ID
*/
...
...
@@ -90,14 +97,14 @@ public class FeedbackRequest {
/**
* 工作中心ID
*/
@ApiModelProperty
(
name
=
"工作中心ID"
)
@ApiModelProperty
(
"工作中心ID"
)
private
Long
workstationId
;
/**
* 工作中心名称
*/
@ApiModelProperty
(
name
=
"工作中心名称"
)
@ApiModelProperty
(
"工作中心名称"
)
private
String
workstationName
;
/**
...
...
mes/src/main/java/com/ximai/mes/report/request/WorkOrderProgressRequest.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
request
;
import
com.ximai.common.annotation.Excel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
WorkOrderProgressRequest
{
/**
* 项目号(工单项目号)
* 订单号(工单订单号)
* 生产工单(生产工单号)
* 产品编码(产品编码)
* 产品名称(点击放大镜单选产品信息,也可直接输入名称执行搜索)
*/
@ApiModelProperty
(
"客户项目号"
)
private
String
customerProjectNo
;
@ApiModelProperty
(
"订单单号"
)
private
String
orderCode
;
@ApiModelProperty
(
"工单编码"
)
private
String
workorderCode
;
/**
* 产品ID
*/
@ApiModelProperty
(
"产品ID"
)
private
Long
productId
;
/**
* 产品编号
*/
@Excel
(
name
=
"产品编号"
)
@ApiModelProperty
(
"产品编号"
)
private
String
productCode
;
/**
* 产品名称
*/
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
}
mes/src/main/java/com/ximai/mes/report/response/FeedbackResponse.java
View file @
40a655c1
...
...
@@ -27,7 +27,7 @@ public class FeedbackResponse extends ProFeedback {
/**
* 工单类型
*/
@ApiModelProperty
(
name
=
"工单类型"
)
@ApiModelProperty
(
"工单类型"
)
private
String
workorderType
;
@ApiModelProperty
(
"客户项目号"
)
...
...
@@ -36,27 +36,27 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
"订单单号"
)
private
String
orderCode
;
@ApiModelProperty
(
name
=
"工单编码"
)
@ApiModelProperty
(
"工单编码"
)
private
String
workorderCode
;
@ApiModelProperty
(
name
=
"工单名称"
)
@ApiModelProperty
(
"工单名称"
)
private
String
workorderName
;
/**
* 产品编号
*/
@ApiModelProperty
(
name
=
"产品编号"
)
@ApiModelProperty
(
"产品编号"
)
private
String
productCode
;
/**
* 产品名称
*/
@ApiModelProperty
(
name
=
"产品名称"
)
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
/**
* 任务编号
*/
@ApiModelProperty
(
name
=
"工序任务号"
)
@ApiModelProperty
(
"工序任务号"
)
private
String
taskCode
;
...
...
@@ -64,25 +64,25 @@ public class FeedbackResponse extends ProFeedback {
/**
* 工序名称
*/
@ApiModelProperty
(
name
=
"工序编码"
)
@ApiModelProperty
(
"工序编码"
)
private
String
processCode
;
/**
* 工序名称
*/
@ApiModelProperty
(
name
=
"工序名称"
)
@ApiModelProperty
(
"工序名称"
)
private
String
processName
;
/**
* 工作中心编号
*/
@ApiModelProperty
(
name
=
"工作中心编号"
)
@ApiModelProperty
(
"工作中心编号"
)
private
String
workstationCode
;
/**
* 工作中心名称
*/
@ApiModelProperty
(
name
=
"工作中心名称"
)
@ApiModelProperty
(
"工作中心名称"
)
private
String
workstationName
;
...
...
@@ -110,30 +110,30 @@ public class FeedbackResponse extends ProFeedback {
/**
* 排产数量
*/
@ApiModelProperty
(
name
=
"派工数量"
)
@ApiModelProperty
(
"派工数量"
)
private
BigDecimal
quantity
;
/**
* 本次报工数量
*/
@ApiModelProperty
(
name
=
"本次报工数量"
)
@ApiModelProperty
(
"本次报工数量"
)
private
BigDecimal
quantityFeedback
;
/**
* 合格品数量
*/
@ApiModelProperty
(
name
=
"合格品数量"
)
@ApiModelProperty
(
"合格品数量"
)
private
BigDecimal
quantityQualify
;
/**
* 不良品数量
*/
@ApiModelProperty
(
name
=
"不良品数量"
)
@ApiModelProperty
(
"不良品数量"
)
private
BigDecimal
quantityUnqualify
;
/** 异常原因 */
@ApiModelProperty
(
name
=
"异常原因"
)
@ApiModelProperty
(
"异常原因"
)
private
String
abnormalReason
;
@ApiModelProperty
(
"标准工时"
)
...
...
@@ -152,7 +152,7 @@ public class FeedbackResponse extends ProFeedback {
* 报工时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
name
=
"报工时间"
)
@ApiModelProperty
(
"报工时间"
)
private
Date
feedbackTime
;
...
...
mes/src/main/java/com/ximai/mes/report/response/WorkOrderProgressFeedbackListResponse.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
response
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
WorkOrderProgressFeedbackListResponse
{
//报工人员,报工数量,合格数量,不合格数量,标准工时,实际工时,报工时间
@ApiModelProperty
(
"报工人员"
)
private
String
nickName
;
@ApiModelProperty
(
"报工数量"
)
private
BigDecimal
quantityFeedback
;
@ApiModelProperty
(
"合格数量"
)
private
BigDecimal
quantityQualify
;
@ApiModelProperty
(
"不合格数量"
)
private
BigDecimal
quantityUnqualify
;
@ApiModelProperty
(
"标准工时"
)
private
BigDecimal
stdWorkingTime
;
@ApiModelProperty
(
"实际工时"
)
private
BigDecimal
machineTime
;
@ApiModelProperty
(
"报工时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
feedbackTime
;
}
mes/src/main/java/com/ximai/mes/report/response/WorkOrderProgressListResponse.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
response
;
import
com.ximai.common.annotation.Excel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
WorkOrderProgressListResponse
{
private
Long
workorderId
;
/**
* 项目号,订单号,生产工单,工单类型,产品编码,产品名称,计划数量,完工数量,在制进度(百分比),需求实际
*/
@ApiModelProperty
(
"客户项目号"
)
private
String
customerProjectNo
;
@ApiModelProperty
(
"订单单号"
)
private
String
orderCode
;
@ApiModelProperty
(
"工单编码"
)
private
String
workorderCode
;
/**
* 工单类型
*/
@ApiModelProperty
(
"工单类型"
)
private
String
workorderType
;
/**
* 产品编号
*/
@ApiModelProperty
(
"产品编号"
)
private
String
productCode
;
/**
* 产品名称
*/
@ApiModelProperty
(
"产品名称"
)
private
String
productName
;
@ApiModelProperty
(
"计划数量"
)
private
BigDecimal
quantity
;
/**
* 已生产数量
*/
@ApiModelProperty
(
"已生产数量"
)
private
BigDecimal
quantityProduced
;
/**
* 已生产数量
*/
@ApiModelProperty
(
"在制进度"
)
private
BigDecimal
quantityMu
;
}
mes/src/main/java/com/ximai/mes/report/response/WorkOrderProgressProcessListResponse.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
response
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
WorkOrderProgressProcessListResponse
{
//状态(未开始,加工中,已完成)工序名称,派工数量,报工数量,合格数量,不合格数量,合格率
@ApiModelProperty
(
"状态"
)
private
String
status
;
@ApiModelProperty
(
"工序名称"
)
private
String
processName
;
@ApiModelProperty
(
"派工数量"
)
private
BigDecimal
quantity
;
@ApiModelProperty
(
"报工数量"
)
private
BigDecimal
quantityProduced
;
@ApiModelProperty
(
"合格数量"
)
private
BigDecimal
quantityQualify
;
@ApiModelProperty
(
"不合格数量"
)
private
BigDecimal
quantityUnqualify
;
@ApiModelProperty
(
"合格率"
)
private
BigDecimal
passRate
;
private
Long
taskId
;
}
mes/src/main/java/com/ximai/mes/report/service/WorkOrderProgressService.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
service
;
import
com.ximai.mes.report.request.WorkOrderProgressRequest
;
import
com.ximai.mes.report.response.WorkOrderProgressFeedbackListResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressListResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressProcessListResponse
;
import
java.util.List
;
public
interface
WorkOrderProgressService
{
List
<
WorkOrderProgressListResponse
>
getList
(
WorkOrderProgressRequest
workOrderProgressRequest
);
List
<
WorkOrderProgressProcessListResponse
>
getProcessList
(
String
workorderCode
);
List
<
WorkOrderProgressFeedbackListResponse
>
getFeedbackList
(
String
workorderCode
,
Long
taskId
);
}
mes/src/main/java/com/ximai/mes/report/service/impl/WorkOrderProgressServiceImp.java
0 → 100644
View file @
40a655c1
package
com
.
ximai
.
mes
.
report
.
service
.
impl
;
import
com.ximai.mes.constant.TaskStatusEnum
;
import
com.ximai.mes.pro.domain.ProFeedback
;
import
com.ximai.mes.pro.domain.proWorkOrder.ProWorkorder
;
import
com.ximai.mes.pro.mapper.ProFeedbackMapper
;
import
com.ximai.mes.pro.mapper.proWorkOrder.ProWorkorderMapper
;
import
com.ximai.mes.pro.mapper.task.ProTaskMapper
;
import
com.ximai.mes.report.request.WorkOrderProgressRequest
;
import
com.ximai.mes.report.response.WorkOrderProgressFeedbackListResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressListResponse
;
import
com.ximai.mes.report.response.WorkOrderProgressProcessListResponse
;
import
com.ximai.mes.report.service.WorkOrderProgressService
;
import
com.ximai.system.service.ISysDictDataService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.text.NumberFormat
;
import
java.util.List
;
@Service
public
class
WorkOrderProgressServiceImp
implements
WorkOrderProgressService
{
@Autowired
ProWorkorderMapper
proWorkorderMapper
;
@Autowired
private
ISysDictDataService
dictDataService
;
@Autowired
private
ProTaskMapper
proTaskMapper
;
@Autowired
private
ProFeedbackMapper
proFeedbackMapper
;
@Override
@Transactional
public
List
<
WorkOrderProgressListResponse
>
getList
(
WorkOrderProgressRequest
workOrderProgressRequest
)
{
List
<
WorkOrderProgressListResponse
>
workOrderProgressListResponses
=
proWorkorderMapper
.
getWorkOrderProgressServiceList
(
workOrderProgressRequest
);
for
(
WorkOrderProgressListResponse
workOrderProgressListResponse
:
workOrderProgressListResponses
){
workOrderProgressListResponse
.
setWorkorderType
(
dictDataService
.
getDictLabel
(
"mes_workorder_type"
,
workOrderProgressListResponse
.
getWorkorderType
()));
if
(
workOrderProgressListResponse
.
getQuantity
()
!=
null
&&
workOrderProgressListResponse
.
getQuantity
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
workOrderProgressListResponse
.
setQuantityProduced
(
workOrderProgressListResponse
.
getQuantityProduced
()
!=
null
?
workOrderProgressListResponse
.
getQuantityProduced
()
:
BigDecimal
.
ZERO
);
workOrderProgressListResponse
.
setQuantityMu
(
workOrderProgressListResponse
.
getQuantityProduced
().
divide
(
workOrderProgressListResponse
.
getQuantity
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
));
}
else
{
workOrderProgressListResponse
.
setQuantityMu
(
new
BigDecimal
(
100
));
}
}
return
proWorkorderMapper
.
getWorkOrderProgressServiceList
(
workOrderProgressRequest
);
}
@Override
public
List
<
WorkOrderProgressProcessListResponse
>
getProcessList
(
String
workorderCode
)
{
List
<
WorkOrderProgressProcessListResponse
>
workOrderProgressProcessListResponses
=
proTaskMapper
.
getProcessList
(
workorderCode
);
for
(
WorkOrderProgressProcessListResponse
workOrderProgressProcessListResponse
:
workOrderProgressProcessListResponses
){
if
(
workOrderProgressProcessListResponse
.
equals
(
TaskStatusEnum
.
BEGINNING
.
getStatus
())){
workOrderProgressProcessListResponse
.
setStatus
(
"已开工"
);
}
else
if
(
workOrderProgressProcessListResponse
.
equals
(
TaskStatusEnum
.
FINISHED
.
getStatus
())){
workOrderProgressProcessListResponse
.
setStatus
(
"已完工"
);
}
else
{
workOrderProgressProcessListResponse
.
setStatus
(
"未开工"
);
}
workOrderProgressProcessListResponse
.
setPassRate
(
workOrderProgressProcessListResponse
.
getQuantityQualify
().
divide
(
workOrderProgressProcessListResponse
.
getQuantityProduced
()).
setScale
(
2
,
RoundingMode
.
HALF_UP
));
}
return
workOrderProgressProcessListResponses
;
}
@Override
public
List
<
WorkOrderProgressFeedbackListResponse
>
getFeedbackList
(
String
workorderCode
,
Long
taskId
)
{
List
<
WorkOrderProgressFeedbackListResponse
>
workOrderProgressFeedbackListResponses
=
proFeedbackMapper
.
getFeedbackList
(
workorderCode
,
taskId
);
return
workOrderProgressFeedbackListResponses
;
}
}
mes/src/main/resources/mapper/pro/ProFeedbackMapper.xml
View file @
40a655c1
...
...
@@ -212,7 +212,7 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%${userName}%
%
'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%${userName}%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
</select>
...
...
@@ -248,8 +248,18 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%${userName}%
%
'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%${userName}%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" productName != null and productName != '' "
>
and workorder.product_Name like '%${productName}%'
</if>
<if
test=
" processName != null and processName != '' "
>
and pt.process_name like '%${processName}%'
</if>
<if
test=
" workshopName != null and workshopName != '' "
>
and workstation.workshop_name like '%${workshopName}%'
</if>
<if
test=
" workstationName != null and workstationName != '' "
>
and workstation.workstation_name like '%${workstationName}%'
</if>
<if
test=
" workunitName != null and workunitName != '' "
>
and mw.workunit_name like '%${workunitName}%'
</if>
</where>
group by
workorder.workorder_Type,
...
...
@@ -287,8 +297,14 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}%
%'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}
%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" productName != null and productName != '' "
>
and workorder.product_Name like '%${productName}%'
</if>
<if
test=
" processName != null and processName != '' "
>
and pt.process_name like '%${processName}%'
</if>
<if
test=
" workshopName != null and workshopName != '' "
>
and workstation.workshop_name like '%${workshopName}%'
</if>
<if
test=
" workstationName != null and workstationName != '' "
>
and workstation.workstation_name like '%${workstationName}%'
</if>
<if
test=
" workunitName != null and workunitName != '' "
>
and mw.workunit_name like '%${workunitName}%'
</if>
</where>
group by
workstation.workshop_code,
...
...
@@ -321,8 +337,14 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}%
%'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}
%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" productName != null and productName != '' "
>
and workorder.product_Name like '%${productName}%'
</if>
<if
test=
" processName != null and processName != '' "
>
and pt.process_name like '%${processName}%'
</if>
<if
test=
" workshopName != null and workshopName != '' "
>
and workstation.workshop_name like '%${workshopName}%'
</if>
<if
test=
" workstationName != null and workstationName != '' "
>
and workstation.workstation_name like '%${workstationName}%'
</if>
<if
test=
" workunitName != null and workunitName != '' "
>
and mw.workunit_name like '%${workunitName}%'
</if>
</where>
group by
workstation.workstation_code,
...
...
@@ -355,8 +377,15 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}%
%'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}
%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" productName != null and productName != '' "
>
and workorder.product_Name like '%${productName}%'
</if>
<if
test=
" processName != null and processName != '' "
>
and pt.process_name like '%${processName}%'
</if>
<if
test=
" workshopName != null and workshopName != '' "
>
and workstation.workshop_name like '%${workshopName}%'
</if>
<if
test=
" workstationName != null and workstationName != '' "
>
and workstation.workstation_name like '%${workstationName}%'
</if>
<if
test=
" workunitName != null and workunitName != '' "
>
and mw.workunit_name like '%${workunitName}%'
</if>
</where>
group by
workunit.workunit_code,
...
...
@@ -389,8 +418,16 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}%
%'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}
%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" productName != null and productName != '' "
>
and workorder.product_Name like '%${productName}%'
</if>
<if
test=
" processName != null and processName != '' "
>
and pt.process_name like '%${processName}%'
</if>
<if
test=
" workshopName != null and workshopName != '' "
>
and workstation.workshop_name like '%${workshopName}%'
</if>
<if
test=
" workstationName != null and workstationName != '' "
>
and workstation.workstation_name like '%${workstationName}%'
</if>
<if
test=
" workunitName != null and workunitName != '' "
>
and mw.workunit_name like '%${workunitName}%'
</if>
</where>
group by
pt.process_code,
...
...
@@ -423,8 +460,16 @@
<if
test=
" workshopId != null"
>
and workstation.workshop_Id = #{workshopId}
</if>
<if
test=
" workstationId != null"
>
and workstation.workstation_id = #{workstationId}
</if>
<if
test=
" workunitId != null"
>
and workunit.workunit_id = #{workunitId}
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}%
%'
</if>
<if
test=
" userName != null and userName != '' "
>
and f.user_Name like '%
${userName}
%'
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" productName != null and productName != '' "
>
and workorder.product_Name like '%${productName}%'
</if>
<if
test=
" processName != null and processName != '' "
>
and pt.process_name like '%${processName}%'
</if>
<if
test=
" workshopName != null and workshopName != '' "
>
and workstation.workshop_name like '%${workshopName}%'
</if>
<if
test=
" workstationName != null and workstationName != '' "
>
and workstation.workstation_name like '%${workstationName}%'
</if>
<if
test=
" workunitName != null and workunitName != '' "
>
and mw.workunit_name like '%${workunitName}%'
</if>
</where>
group by
f.user_name,
...
...
@@ -437,6 +482,14 @@
#{taskId}
</foreach>
</select>
<select
id=
"getFeedbackList"
resultType=
"com.ximai.mes.report.response.WorkOrderProgressFeedbackListResponse"
>
select feedback.*,workunit.std_working_time from pro_task_workunit workunit join pro_feedback feedback on feedback.task_workunit_id = workunit.task_workunit_id
<where>
workorder_code = #{workorderCode}
<if
test=
"taskId != null"
>
and feedback.task_id = #{taskId}
</if>
</where>
</select>
<insert
id=
"insertProFeedback"
parameterType=
"ProFeedback"
useGeneratedKeys=
"true"
keyProperty=
"recordId"
>
insert into pro_feedback
...
...
mes/src/main/resources/mapper/pro/proWorkOrder/ProWorkorderMapper.xml
View file @
40a655c1
...
...
@@ -183,6 +183,17 @@
tw.idx
ORDER BY tw.idx ASC
</select>
<select
id=
"getWorkOrderProgressServiceList"
resultType=
"com.ximai.mes.report.response.WorkOrderProgressListResponse"
>
select * from pro_workorder pw
<where>
<if
test=
"workorderCode != null and workorderCode != ''"
>
and pw.workorder_code = #{workorderCode}
</if>
<if
test=
"productId != null "
>
and pw.product_id = #{productId}
</if>
<if
test=
"productCode != null and productCode != ''"
>
and pw.product_code = #{productCode}
</if>
<if
test=
"orderCode != null and orderCode !=''"
>
and pw.order_code = #{orderCode}
</if>
<if
test=
"customerProjectNo != null and customerProjectNo !=''"
>
and pw.customer_project_no = #{customerProjectNo}
</if>
</where>
</select>
<insert
id=
"insertProWorkorder"
parameterType=
"ProWorkorder"
useGeneratedKeys=
"true"
keyProperty=
"workorderId"
>
insert into pro_workorder
...
...
mes/src/main/resources/mapper/pro/task/ProTaskMapper.xml
View file @
40a655c1
...
...
@@ -351,6 +351,10 @@
t.task_batch = #{taskBatch}
</where>
</select>
<select
id=
"getProcessList"
resultType=
"com.ximai.mes.report.response.WorkOrderProgressProcessListResponse"
>
select * from pro_task where arrange_code = #{workorderCode} order by task_id
</select>
<insert
id=
"insertProTask"
parameterType=
"ProTask"
useGeneratedKeys=
"true"
keyProperty=
"taskId"
>
insert into pro_task
...
...
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