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
0517b307
Commit
0517b307
authored
Nov 12, 2024
by
温志超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新报表
parent
d6f2b60b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
468 additions
and
48 deletions
+468
-48
logback.xml
admin/src/main/resources/logback.xml
+38
-43
ProFeedbackMapper.java
...main/java/com/ximai/mes/pro/mapper/ProFeedbackMapper.java
+12
-0
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
No files found.
admin/src/main/resources/logback.xml
View file @
0517b307
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<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"
/>
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<encoder>
<pattern>
${log.pattern}
</pattern>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</encoder>
</appender>
</appender>
...
@@ -25,7 +24,6 @@
...
@@ -25,7 +24,6 @@
</rollingPolicy>
</rollingPolicy>
<encoder>
<encoder>
<pattern>
${log.pattern}
</pattern>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<!-- 过滤的级别 -->
...
@@ -48,7 +46,6 @@
...
@@ -48,7 +46,6 @@
</rollingPolicy>
</rollingPolicy>
<encoder>
<encoder>
<pattern>
${log.pattern}
</pattern>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<!-- 过滤的级别 -->
<!-- 过滤的级别 -->
...
@@ -71,7 +68,6 @@
...
@@ -71,7 +68,6 @@
</rollingPolicy>
</rollingPolicy>
<encoder>
<encoder>
<pattern>
${log.pattern}
</pattern>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</encoder>
</appender>
</appender>
...
@@ -86,7 +82,6 @@
...
@@ -86,7 +82,6 @@
</rollingPolicy>
</rollingPolicy>
<encoder>
<encoder>
<pattern>
${log.pattern}
</pattern>
<pattern>
${log.pattern}
</pattern>
<charset>
UTF-8
</charset>
</encoder>
</encoder>
</appender>
</appender>
...
...
mes/src/main/java/com/ximai/mes/pro/mapper/ProFeedbackMapper.java
View file @
0517b307
...
@@ -125,4 +125,16 @@ public interface ProFeedbackMapper {
...
@@ -125,4 +125,16 @@ public interface ProFeedbackMapper {
void
updateLastFeedback
(
@Param
(
"qrcode"
)
String
qrcode
,
@Param
(
"taskId"
)
Long
taskId
);
void
updateLastFeedback
(
@Param
(
"qrcode"
)
String
qrcode
,
@Param
(
"taskId"
)
Long
taskId
);
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
);
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/controller/FeedbackController.java
View file @
0517b307
...
@@ -3,6 +3,7 @@ package com.ximai.mes.report.controller;
...
@@ -3,6 +3,7 @@ package com.ximai.mes.report.controller;
import
com.ximai.common.annotation.Log
;
import
com.ximai.common.annotation.Log
;
import
com.ximai.common.core.controller.BaseController
;
import
com.ximai.common.core.controller.BaseController
;
import
com.ximai.common.core.domain.AjaxResult
;
import
com.ximai.common.core.domain.AjaxResult
;
import
com.ximai.common.core.page.TableDataInfo
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.common.enums.BusinessType
;
import
com.ximai.mes.report.request.FeedbackRequest
;
import
com.ximai.mes.report.request.FeedbackRequest
;
import
com.ximai.mes.report.response.FeedbackResponse
;
import
com.ximai.mes.report.response.FeedbackResponse
;
...
@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.math.BigDecimal
;
import
java.text.DecimalFormat
;
import
java.util.List
;
import
java.util.List
;
@Api
(
"生产报工"
)
@Api
(
"生产报工"
)
...
@@ -26,12 +29,141 @@ public class FeedbackController extends BaseController {
...
@@ -26,12 +29,141 @@ public class FeedbackController extends BaseController {
/**
/**
* 新增生产报工记录
* 新增生产报工记录
*/
*/
@ApiOperation
(
"
新增报工单接口
"
)
@ApiOperation
(
"
生产报工记录:明细界面
"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:
add
')"
)
@PreAuthorize
(
"@ss.hasPermi('mes:pro:feedback:
get
')"
)
@Log
(
title
=
"生产报工记录"
,
businessType
=
BusinessType
.
QUERY
)
@Log
(
title
=
"生产报工记录"
,
businessType
=
BusinessType
.
QUERY
)
@GetMapping
(
"/getList"
)
@GetMapping
(
"/getList"
)
public
AjaxResult
getList
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
public
TableDataInfo
getList
(
@RequestBody
FeedbackRequest
feedbackRequest
)
{
startPage
();
List
<
FeedbackResponse
>
feedbackResponseList
=
feedbackService
.
getList
(
feedbackRequest
);
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 @
0517b307
...
@@ -4,10 +4,11 @@ import com.fasterxml.jackson.annotation.JsonFormat;
...
@@ -4,10 +4,11 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import
com.ximai.common.annotation.Excel
;
import
com.ximai.common.annotation.Excel
;
import
com.ximai.mes.pro.domain.ProFeedback
;
import
com.ximai.mes.pro.domain.ProFeedback
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
@Data
public
class
FeedbackResponse
extends
ProFeedback
{
public
class
FeedbackResponse
extends
ProFeedback
{
/**
/**
* 工单类型,项目号,订单号,
* 工单类型,项目号,订单号,
...
@@ -38,6 +39,8 @@ public class FeedbackResponse extends ProFeedback {
...
@@ -38,6 +39,8 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
name
=
"工单编码"
)
@ApiModelProperty
(
name
=
"工单编码"
)
private
String
workorderCode
;
private
String
workorderCode
;
@ApiModelProperty
(
name
=
"工单名称"
)
private
String
workorderName
;
/**
/**
* 产品编号
* 产品编号
*/
*/
...
@@ -56,6 +59,13 @@ public class FeedbackResponse extends ProFeedback {
...
@@ -56,6 +59,13 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
name
=
"工序任务号"
)
@ApiModelProperty
(
name
=
"工序任务号"
)
private
String
taskCode
;
private
String
taskCode
;
/**
* 工序名称
*/
@ApiModelProperty
(
name
=
"工序编码"
)
private
String
processCode
;
/**
/**
* 工序名称
* 工序名称
*/
*/
...
@@ -82,6 +92,12 @@ public class FeedbackResponse extends ProFeedback {
...
@@ -82,6 +92,12 @@ public class FeedbackResponse extends ProFeedback {
@ApiModelProperty
(
"工作单元ID"
)
@ApiModelProperty
(
"工作单元ID"
)
private
Long
workunitId
;
private
Long
workunitId
;
/**
*
*/
@ApiModelProperty
(
"工作单元编码"
)
private
String
workunitCode
;
@ApiModelProperty
(
"工作单元名称"
)
@ApiModelProperty
(
"工作单元名称"
)
private
String
workunitName
;
private
String
workunitName
;
...
@@ -138,4 +154,13 @@ public class FeedbackResponse extends ProFeedback {
...
@@ -138,4 +154,13 @@ public class FeedbackResponse extends ProFeedback {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@ApiModelProperty
(
name
=
"报工时间"
)
@ApiModelProperty
(
name
=
"报工时间"
)
private
Date
feedbackTime
;
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 @
0517b307
...
@@ -7,4 +7,16 @@ import java.util.List;
...
@@ -7,4 +7,16 @@ import java.util.List;
public
interface
FeedbackService
{
public
interface
FeedbackService
{
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
);
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 @
0517b307
...
@@ -19,4 +19,34 @@ public class FeedbackServiceImp implements FeedbackService {
...
@@ -19,4 +19,34 @@ public class FeedbackServiceImp implements FeedbackService {
public
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
)
{
public
List
<
FeedbackResponse
>
getList
(
FeedbackRequest
feedbackRequest
)
{
return
proFeedbackMapper
.
getList
(
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 @
0517b307
...
@@ -216,6 +216,220 @@
...
@@ -216,6 +216,220 @@
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
<if
test=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
</where>
</select>
</select>
<select
id=
"getListByWorkOrder"
resultType=
"com.ximai.mes.report.response.FeedbackResponse"
>
select
workorder.workorder_Type,
workorder.customer_Project_No,
workorder.workorder_name,
workorder.order_Code,
workorder.workorder_Code,
workorder.product_Code,
workorder.product_Name,
sum(f.quantity) quantity,
sum(f.quantity_qualify) quantity_qualify,
sum(f.quantity_unqualify) quantity_unqualify,
sum(f.quantity_feedback) quantity_feedback
from pro_feedback f
left join pro_task_workunit workunit on workunit.task_id = f.task_id
left join pro_task pt on f.task_id = pt.task_id
left join pro_workorder workorder on workorder.workorder_id = f.workorder_id
LEFT JOIN md_item it ON it.item_id = f.item_id
left join md_workunit mw on workunit.workunit_id = mw.workunit_id
left join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if
test=
"workorderType != null and workorderType != ''"
>
and workorder.workorder_Type = #{workorderType}
</if>
<if
test=
"customerProjectNo!= null and customerProjectNo != '' "
>
and workorder.customer_Project_No like '%${customerProjectNo}%'
</if>
<if
test=
"orderCode != null and orderCode != '' "
>
and workorder.order_Code like '%${orderCode}%'
</if>
<if
test=
"workorderCode != null and workorderCode != '' "
>
and workorder.workorder_Code like '%${workorderCode}%'
</if>
<if
test=
"taskCode != null and taskCode != '' "
>
and pt.task_Code like '%${taskCode}%'
</if>
<if
test=
"productCode != null and productCode != '' "
>
and workorder.product_Code like '%${productCode}%'
</if>
<if
test=
" productId != null"
>
and workorder.product_Id = #{productId}
</if>
<if
test=
" processId != null "
>
and pt.process_id = #{processId}
</if>
<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=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
group by
workorder.workorder_Type,
workorder.customer_Project_No,
workorder.workorder_name,
workorder.order_Code,
workorder.workorder_Code,
workorder.product_Code,
workorder.product_Name
</select>
<select
id=
"getListByWorkshop"
resultType=
"com.ximai.mes.report.response.FeedbackResponse"
>
select
workstation.workshop_code,
workstation.workshop_name,
sum(f.quantity) quantity,
sum(f.quantity_qualify) quantity_qualify,
sum(f.quantity_unqualify) quantity_unqualify,
sum(f.quantity_feedback) quantity_feedback
from pro_feedback f
left join pro_task_workunit workunit on workunit.task_id = f.task_id
left join pro_task pt on f.task_id = pt.task_id
left join pro_workorder workorder on workorder.workorder_id = f.workorder_id
LEFT JOIN md_item it ON it.item_id = f.item_id
left join md_workunit mw on workunit.workunit_id = mw.workunit_id
left join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if
test=
"workorderType != null and workorderType != ''"
>
and workorder.workorder_Type = #{workorderType}
</if>
<if
test=
"customerProjectNo!= null and customerProjectNo != '' "
>
and workorder.customer_Project_No like '%${customerProjectNo}%'
</if>
<if
test=
"orderCode != null and orderCode != '' "
>
and workorder.order_Code like '%${orderCode}%'
</if>
<if
test=
"workorderCode != null and workorderCode != '' "
>
and workorder.workorder_Code like '%${workorderCode}%'
</if>
<if
test=
"taskCode != null and taskCode != '' "
>
and pt.task_Code like '%${taskCode}%'
</if>
<if
test=
"productCode != null and productCode != '' "
>
and workorder.product_Code like '%${productCode}%'
</if>
<if
test=
" productId != null"
>
and workorder.product_Id = #{productId}
</if>
<if
test=
" processId != null "
>
and pt.process_id = #{processId}
</if>
<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=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
group by
workstation.workshop_code,
workstation.workshop_name
</select>
<select
id=
"getListByWorkstation"
resultType=
"com.ximai.mes.report.response.FeedbackResponse"
>
select
workstation.workstation_code,
workstation.workstation_name,
sum(f.quantity) quantity,
sum(f.quantity_qualify) quantity_qualify,
sum(f.quantity_unqualify) quantity_unqualify,
sum(f.quantity_feedback) quantity_feedback
from pro_feedback f
left join pro_task_workunit workunit on workunit.task_id = f.task_id
left join pro_task pt on f.task_id = pt.task_id
left join pro_workorder workorder on workorder.workorder_id = f.workorder_id
LEFT JOIN md_item it ON it.item_id = f.item_id
left join md_workunit mw on workunit.workunit_id = mw.workunit_id
left join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if
test=
"workorderType != null and workorderType != ''"
>
and workorder.workorder_Type = #{workorderType}
</if>
<if
test=
"customerProjectNo!= null and customerProjectNo != '' "
>
and workorder.customer_Project_No like '%${customerProjectNo}%'
</if>
<if
test=
"orderCode != null and orderCode != '' "
>
and workorder.order_Code like '%${orderCode}%'
</if>
<if
test=
"workorderCode != null and workorderCode != '' "
>
and workorder.workorder_Code like '%${workorderCode}%'
</if>
<if
test=
"taskCode != null and taskCode != '' "
>
and pt.task_Code like '%${taskCode}%'
</if>
<if
test=
"productCode != null and productCode != '' "
>
and workorder.product_Code like '%${productCode}%'
</if>
<if
test=
" productId != null"
>
and workorder.product_Id = #{productId}
</if>
<if
test=
" processId != null "
>
and pt.process_id = #{processId}
</if>
<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=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
group by
workstation.workstation_code,
workstation.workstation_name
</select>
<select
id=
"getListByWorkunit"
resultType=
"com.ximai.mes.report.response.FeedbackResponse"
>
select
workunit.workunit_code,
workunit.workunit_name,
sum(f.quantity) quantity,
sum(f.quantity_qualify) quantity_qualify,
sum(f.quantity_unqualify) quantity_unqualify,
sum(f.quantity_feedback) quantity_feedback
from pro_feedback f
left join pro_task_workunit workunit on workunit.task_id = f.task_id
left join pro_task pt on f.task_id = pt.task_id
left join pro_workorder workorder on workorder.workorder_id = f.workorder_id
LEFT JOIN md_item it ON it.item_id = f.item_id
left join md_workunit mw on workunit.workunit_id = mw.workunit_id
left join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if
test=
"workorderType != null and workorderType != ''"
>
and workorder.workorder_Type = #{workorderType}
</if>
<if
test=
"customerProjectNo!= null and customerProjectNo != '' "
>
and workorder.customer_Project_No like '%${customerProjectNo}%'
</if>
<if
test=
"orderCode != null and orderCode != '' "
>
and workorder.order_Code like '%${orderCode}%'
</if>
<if
test=
"workorderCode != null and workorderCode != '' "
>
and workorder.workorder_Code like '%${workorderCode}%'
</if>
<if
test=
"taskCode != null and taskCode != '' "
>
and pt.task_Code like '%${taskCode}%'
</if>
<if
test=
"productCode != null and productCode != '' "
>
and workorder.product_Code like '%${productCode}%'
</if>
<if
test=
" productId != null"
>
and workorder.product_Id = #{productId}
</if>
<if
test=
" processId != null "
>
and pt.process_id = #{processId}
</if>
<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=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
group by
workunit.workunit_code,
workunit.workunit_name
</select>
<select
id=
"getListByProcess"
resultType=
"com.ximai.mes.report.response.FeedbackResponse"
>
select
pt.process_code,
pt.process_name,
sum(f.quantity) quantity,
sum(f.quantity_qualify) quantity_qualify,
sum(f.quantity_unqualify) quantity_unqualify,
sum(f.quantity_feedback) quantity_feedback
from pro_feedback f
left join pro_task_workunit workunit on workunit.task_id = f.task_id
left join pro_task pt on f.task_id = pt.task_id
left join pro_workorder workorder on workorder.workorder_id = f.workorder_id
LEFT JOIN md_item it ON it.item_id = f.item_id
left join md_workunit mw on workunit.workunit_id = mw.workunit_id
left join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if
test=
"workorderType != null and workorderType != ''"
>
and workorder.workorder_Type = #{workorderType}
</if>
<if
test=
"customerProjectNo!= null and customerProjectNo != '' "
>
and workorder.customer_Project_No like '%${customerProjectNo}%'
</if>
<if
test=
"orderCode != null and orderCode != '' "
>
and workorder.order_Code like '%${orderCode}%'
</if>
<if
test=
"workorderCode != null and workorderCode != '' "
>
and workorder.workorder_Code like '%${workorderCode}%'
</if>
<if
test=
"taskCode != null and taskCode != '' "
>
and pt.task_Code like '%${taskCode}%'
</if>
<if
test=
"productCode != null and productCode != '' "
>
and workorder.product_Code like '%${productCode}%'
</if>
<if
test=
" productId != null"
>
and workorder.product_Id = #{productId}
</if>
<if
test=
" processId != null "
>
and pt.process_id = #{processId}
</if>
<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=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
group by
pt.process_code,
pt.process_name
</select>
<select
id=
"getListByUser"
resultType=
"com.ximai.mes.report.response.FeedbackResponse"
>
select
f.user_name,
f.nick_name,
sum(f.quantity) quantity,
sum(f.quantity_qualify) quantity_qualify,
sum(f.quantity_unqualify) quantity_unqualify,
sum(f.quantity_feedback) quantity_feedback
from pro_feedback f
left join pro_task_workunit workunit on workunit.task_id = f.task_id
left join pro_task pt on f.task_id = pt.task_id
left join pro_workorder workorder on workorder.workorder_id = f.workorder_id
LEFT JOIN md_item it ON it.item_id = f.item_id
left join md_workunit mw on workunit.workunit_id = mw.workunit_id
left join md_workstation workstation on workstation.workstation_id = mw.workstation_id
<where>
<if
test=
"workorderType != null and workorderType != ''"
>
and workorder.workorder_Type = #{workorderType}
</if>
<if
test=
"customerProjectNo!= null and customerProjectNo != '' "
>
and workorder.customer_Project_No like '%${customerProjectNo}%'
</if>
<if
test=
"orderCode != null and orderCode != '' "
>
and workorder.order_Code like '%${orderCode}%'
</if>
<if
test=
"workorderCode != null and workorderCode != '' "
>
and workorder.workorder_Code like '%${workorderCode}%'
</if>
<if
test=
"taskCode != null and taskCode != '' "
>
and pt.task_Code like '%${taskCode}%'
</if>
<if
test=
"productCode != null and productCode != '' "
>
and workorder.product_Code like '%${productCode}%'
</if>
<if
test=
" productId != null"
>
and workorder.product_Id = #{productId}
</if>
<if
test=
" processId != null "
>
and pt.process_id = #{processId}
</if>
<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=
" startDate != null and endDate != null"
>
and feedback_time BETWEEN #{startDate} AND #{endDate}
</if>
</where>
group by
f.user_name,
f.nick_name
</select>
<insert
id=
"insertProFeedback"
parameterType=
"ProFeedback"
useGeneratedKeys=
"true"
keyProperty=
"recordId"
>
<insert
id=
"insertProFeedback"
parameterType=
"ProFeedback"
useGeneratedKeys=
"true"
keyProperty=
"recordId"
>
insert into pro_feedback
insert into pro_feedback
...
...
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