From 07d08f8dc420ba47f66587fdc5038a59fc340c96 Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 29 八月 2024 10:33:59 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/ERP_override
---
north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue | 4
north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml | 2
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java | 10 -
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java | 74 ++++++++++++++++++
north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml | 4
north-glass-erp/src/main/java/com/example/erp/entity/pp/Rework.java | 2
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml | 2
north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue | 4
north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java | 13 +++
north-glass-erp/src/main/java/com/example/erp/entity/pp/PatchLog.java | 2
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml | 6 +
north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue | 32 +++++++
north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java | 4 +
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml | 4 +
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java | 24 +++--
15 files changed, 159 insertions(+), 28 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue b/north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue
index 4276c40..80a82e6 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/TagStyle.vue
@@ -33,7 +33,7 @@
alType:'order.alType',
customerBatch:'order.customerBatch',
processingNote:'order.processingNote',
- remarks:'浜у搧澶囨敞',
+ remarks:'璁㈠崟澶囨敞',
customerAbbreviation:'customer.customerAbbreviation',
productAbbreviation:'product.msg.productAbbreviation',
processId:'processCard.processId',
@@ -49,7 +49,7 @@
remarks2:'澶囨敞2',
remarks3:'澶囨敞3',
remarks4:'澶囨敞4',
- filmNumber:'鑶滃彿',
+ filmNumber:'浜у搧澶囨敞',
bendRadius:'order.bendRadius',
glassChild:'reportingWorks.glassChild',
glassAddress:'replenish.sliceMarking'
diff --git a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
index 4c1f6d9..46b69b8 100644
--- a/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
+++ b/north-glass-erp/northglass-erp/src/components/pp/TagStyleDesigner.vue
@@ -500,9 +500,11 @@
<el-button type="warning" @click="clear">娓呯┖</el-button>
</el-col>
<el-col :span="1">
-<!-- <el-button type="danger" @click="htmlPrint">鎵撳嵃</el-button>-->
<el-button :disabled="!tag.id" type="danger" @click="deleteTag">鍒犻櫎</el-button>
</el-col>
+ <el-col :span="1">
+ <el-button type="danger" @click="htmlPrint">鎵撳嵃</el-button>
+ </el-col>
</el-row>
diff --git a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
index 503fe4c..9caac38 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/reportingWorks/AddReportingWork.vue
@@ -239,7 +239,14 @@
},
{
code: 'SecondaryBreakage',
- name: "娆$牬鐩稿悓",
+ name: "搴忓彿娆$牬鐩稿悓",
+ prefixIcon: 'vxe-icon-indicator',
+ visible: true,
+ disabled: false
+ },
+ {
+ code: 'checkedBreakage',
+ name: "閫変腑娆$牬鐩稿悓",
prefixIcon: 'vxe-icon-indicator',
visible: true,
disabled: false
@@ -510,7 +517,7 @@
}
case 'SecondaryBreakage' : {
let result = toolbarButtonClickEvent()
- if (result.cell === "breakageQuantity"){
+ if (result.cell === "breakageQuantity" || result.cell === "completedQuantity"){
if (result) {
const dataList = xGrid.value.getTableData().visibleData
const seenOrders = {}
@@ -537,6 +544,27 @@
}
break
}
+ case 'checkedBreakage' : {
+ let result = toolbarButtonClickEvent()
+ if (result.cell === "breakageQuantity" || result.cell === "completedQuantity"){
+ if (result) {
+ const dataList = xGrid.value.getTableData().visibleData
+ const val = dataList[result.start].damageDetails
+ const quantity = dataList[result.start].breakageQuantity
+ dataList.forEach((item, index) => {
+ if (index >= result.start && index <= result.end) {
+ item.damageDetails = val
+ item.breakageQuantity = quantity
+ if (index!=result.start){
+ item.completedQuantity = item.completedQuantity - quantity
+ }
+
+ }
+ })
+ }
+ }
+ break
+ }
}
}
},
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
index fc6c6b1..97fd8ee 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -339,13 +339,9 @@
}
@ApiOperation("姹夌幓鑾峰彇娴佺▼鍗℃帴鍙�")
@PostMapping("/getProcessCardList/hanbo")
- public Result getProcessCard() {
- return Result.seccess(flowCardService.getProcessCard());
+ public Result getProcessCard(@RequestBody Map<String,String> processCards) {
+ return Result.seccess(flowCardService.getProcessCard(processCards));
}
- @ApiOperation("姹夌幓纭鎺ユ敹鎺ュ彛")
- @PostMapping("/updateProcessCardState/hanbo")
- public Result updateProcessCardState(@RequestBody Integer id) {
- return Result.seccess(flowCardService.updateProcessCardState(id));
- }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
index 747f7bd..7b03381 100644
--- a/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
+++ b/north-glass-erp/src/main/java/com/example/erp/controller/pp/ReportingWorkController.java
@@ -141,4 +141,17 @@
return Result.seccess(reportingWorkService.getPatchConditionSv(reportingWorkId));
}
+ @ApiOperation("mes鎶ュ伐鎺ュ彛")
+ @PostMapping ("/mesReportingWork")
+ public Result mesReportingWork(@RequestBody Map<String,Object> reportingWork){
+ Boolean aBoolean = reportingWorkService.mesReportingWorkSv(reportingWork);
+ if(aBoolean){
+ return Result.seccess(reportingWorkService.mesReportingWorkSv(reportingWork));
+ }else{
+ throw new ServiceException(Constants.Code_600, "涓婂伐搴忓凡瀹屽伐鏁伴噺灏忎簬鏈伐搴忔姤宸ユ暟閲忥紝璇锋鏌�");
+ }
+
+
+ }
+
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/pp/PatchLog.java b/north-glass-erp/src/main/java/com/example/erp/entity/pp/PatchLog.java
index e8120a1..08a7fde 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/pp/PatchLog.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/pp/PatchLog.java
@@ -1,5 +1,6 @@
package com.example.erp.entity.pp;
+import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.time.LocalDate;
@@ -43,5 +44,6 @@
private String reportingWorkId;
//澶栭敭娴佺▼鍗¤〃
+ @TableField(select = false,exist = false)
private FlowCard flowCard;
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java b/north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java
index fabe09f..baa4d60 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/pp/ProductionScheduling.java
@@ -1,5 +1,6 @@
package com.example.erp.entity.pp;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderDetail;
import com.example.erp.entity.sd.OrderGlassDetail;
@@ -45,9 +46,12 @@
private String reviewer;
//澶栭敭璁㈠崟琛�
+ @TableField(select = false,exist= false)
private Order order;
//澶栭敭璁㈠崟鏄庣粏琛�
+ @TableField(select = false,exist= false)
private OrderDetail orderDetail;
//澶栭敭璁㈠崟鏄庣粏琛�
+ @TableField(select = false,exist= false)
private OrderGlassDetail orderGlassDetail;
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/entity/pp/Rework.java b/north-glass-erp/src/main/java/com/example/erp/entity/pp/Rework.java
index 30cd336..03f2fe8 100644
--- a/north-glass-erp/src/main/java/com/example/erp/entity/pp/Rework.java
+++ b/north-glass-erp/src/main/java/com/example/erp/entity/pp/Rework.java
@@ -1,5 +1,6 @@
package com.example.erp.entity.pp;
+import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import java.time.LocalDate;
@@ -42,5 +43,6 @@
private String reportingWorkId;
//澶栭敭娴佺▼鍗¤〃
+ @TableField(select = false,exist= false)
private FlowCard flowCard;
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
index 11ac055..88a3c3a 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -5,11 +5,12 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.example.erp.common.Constants;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.entity.sd.OrderProcessDetail;
import com.example.erp.entity.userInfo.Log;
+import com.example.erp.exception.ServiceException;
import com.example.erp.mapper.pp.FlowCardMapper;
import com.example.erp.mapper.sd.OrderGlassDetailMapper;
import com.example.erp.mapper.sd.OrderProcessDetailMapper;
@@ -682,13 +683,20 @@
}
- public List<FlowCard> getProcessCard() {
+ public List<FlowCard> getProcessCard(Map<String, String> processCards) {
+ String processCard = processCards.get("processCard");
+ if(!processCard.contains("/")){
+ throw new ServiceException(Constants.Code_600, "閿欒鐨勬祦绋嬪崱鍙凤紝璇锋鏌�!");
+ }
+
+ String[] processCardList = processCard.split("/");
+
List<FlowCard> flowCardList = flowCardMapper.selectList(
- new QueryWrapper<FlowCard>().eq("termination_status", 0)
- .orderByDesc("id")
+ new QueryWrapper<FlowCard>()
+ .eq("process_id", processCardList[0])
+ .eq("technology_number", processCardList[1])
);
for (FlowCard flowCard : flowCardList) {
- flowCard.setProcessId(flowCard.getProcessId()+'/'+flowCard.getTechnologyNumber());
flowCard.setOrderGlassDetail(
orderGlassDetailMapper.selectOne(
new QueryWrapper<OrderGlassDetail>()
@@ -706,12 +714,6 @@
return flowCardList;
}
- public Boolean updateProcessCardState(Integer id) {
- UpdateWrapper<FlowCard> updateWrapper = new UpdateWrapper<>();
- updateWrapper.eq("id", id) // 鏍规嵁id鏇存柊
- .set("termination_status", 1);
- return flowCardMapper.update(null, updateWrapper) > 0;
- }
}
diff --git a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
index e4026c8..bb89458 100644
--- a/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
+++ b/north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -13,6 +13,7 @@
import com.example.erp.entity.sd.Order;
import com.example.erp.entity.sd.OrderProcessDetail;
import com.example.erp.entity.userInfo.Log;
+import com.example.erp.entity.userInfo.SysError;
import com.example.erp.exception.ServiceException;
import com.example.erp.mapper.pp.*;
import com.baomidou.dynamic.datasource.annotation.DS;
@@ -22,8 +23,11 @@
import com.example.erp.mapper.userInfo.LogMapper;
import com.example.erp.service.sd.OrderProcessDetailService;
import com.example.erp.service.userInfo.LogService;
+import com.example.erp.service.userInfo.SysErrorService;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
@@ -57,9 +61,10 @@
final LogMapper logMapper;
private final OrderGlassDetailMapper orderGlassDetailMapper;
+ private final SysErrorService sysErrorService;
- public ReportingWorkService(ReportingWorkMapper reportingWorkMapper, BasicDateProduceMapper basicDateProduceMapper, DamageDetailsMapper damageDetailsMapper, ReportingWorkDetailMapper reportingWorkDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, OrderProcessDetailService orderProcessDetailService, OrderMapper orderMapper, FlowCardMapper flowCardMapper, LogService logService, LogMapper logMapper, OrderGlassDetailMapper orderGlassDetailMapper) {
+ public ReportingWorkService(ReportingWorkMapper reportingWorkMapper, BasicDateProduceMapper basicDateProduceMapper, DamageDetailsMapper damageDetailsMapper, ReportingWorkDetailMapper reportingWorkDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, OrderProcessDetailService orderProcessDetailService, OrderMapper orderMapper, FlowCardMapper flowCardMapper, LogService logService, LogMapper logMapper, OrderGlassDetailMapper orderGlassDetailMapper, SysErrorService sysErrorService) {
this.reportingWorkMapper = reportingWorkMapper;
this.basicDateProduceMapper = basicDateProduceMapper;
this.damageDetailsMapper = damageDetailsMapper;
@@ -71,6 +76,7 @@
this.logService = logService;
this.logMapper = logMapper;
this.orderGlassDetailMapper = orderGlassDetailMapper;
+ this.sysErrorService = sysErrorService;
}
public Map<String, Object> AddSelectLastWorkSv(String processIdStr, String technologyStr, String process, String reportType) {
@@ -611,4 +617,70 @@
String count=reportingWorkMapper.getPatchConditionMp(reportingWorkId);
return count;
}
+ @Transactional(rollbackFor = Exception.class , noRollbackFor = ServiceException.class)
+ public Boolean mesReportingWorkSv(Map<String,Object> reportingWorkMap) {
+ //璁剧疆鍥炴粴鐐�
+ Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
+ try{
+ //鎺ユ敹瑙f瀽涓婚檮琛ㄤ俊鎭�
+ JSONObject reportingWorkJson = new JSONObject(reportingWorkMap);
+ ReportingWork reportingWork = JSONObject.parseObject(JSONObject.toJSONString(reportingWorkJson.get("title")), ReportingWork.class);
+ ReportingWorkDetail reportingWorkDetail =JSON.parseObject(JSONObject.toJSONString(reportingWorkJson.get("detail")), ReportingWorkDetail.class);
+
+ int processNum = reportingWorkMapper.selectGlassProcessNum(
+ reportingWorkDetail.getOrderNumber(),
+ reportingWorkDetail.getTechnologyNumber(),
+ reportingWork.getProcessId(),
+ reportingWork.getThisProcess()
+ );
+ //鍒ゆ柇鏄惁澶т簬褰撳墠鏁伴噺骞朵笖鎶涘嚭寮傚父
+ if (processNum < (reportingWorkDetail.getBreakageQuantity() + reportingWorkDetail.getCompletedQuantity())) {
+ return false;
+ }
+
+
+ //鑾峰彇褰撳墠鏈�澶ф姤宸ュ崟鍙风敓鎴愭姤宸ュ崟鍙�
+ String formattedNumber = String.format("%04d", reportingWorkMapper.selectMaxReportingWorkId() + 1);
+ //鏍煎紡鍖栧綋鍓嶆棩鏈�
+ Date currentDate = new Date();
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd");
+ String formattedDate = dateFormat.format(currentDate);
+ String reportingWorkId = "BG" + formattedDate + formattedNumber;
+
+ reportingWork.setReportingWorkId(reportingWorkId);
+ reportingWorkDetail.setReportingWorkId(reportingWorkId);
+
+ reportingWorkMapper.insert(reportingWork);
+ reportingWorkDetailMapper.insert(reportingWorkDetail);
+
+
+
+ OrderProcessDetail orderProcessDetail = new OrderProcessDetail();
+ orderProcessDetail.setBrokenNum(reportingWorkDetail.getBreakageQuantity());
+ orderProcessDetail.setReportingWorkNum(reportingWorkDetail.getCompletedQuantity());
+ orderProcessDetail.setReportingWorkNumCount(reportingWorkDetail.getCompletedQuantity());
+
+ //鏍规嵁璁㈠崟id锛岃鍗曞簭鍙凤紝浠ュ強灏忕墖搴忓彿 鏇存柊灏忕墖娴佺▼鐨勫畬宸ユ暟閲忎互鍙婂埡鐮存暟閲�
+ LambdaUpdateWrapper<OrderProcessDetail> updateWrapper = new LambdaUpdateWrapper<>();
+ updateWrapper.eq(OrderProcessDetail::getOrderNumber, reportingWorkDetail.getOrderNumber())
+ .eq(OrderProcessDetail::getProcessId, reportingWork.getProcessId().substring(0, 14))
+ .eq(OrderProcessDetail::getOrderId, reportingWork.getOrderId())
+ .eq(OrderProcessDetail::getProcess, reportingWork.getThisProcess())
+ .eq(OrderProcessDetail::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber())
+ .setSql("reporting_work_num_count = reporting_work_num_count +" + orderProcessDetail.getReportingWorkNum())
+ .setSql("reporting_work_num =reporting_work_num +" + orderProcessDetail.getReportingWorkNum());
+
+ orderProcessDetailMapper.update(null, updateWrapper);
+ return true;
+ } catch (Exception e) {
+ TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
+ //灏嗗紓甯镐紶鍏ユ暟鎹簱
+ SysError sysError = new SysError();
+ sysError.setError(e +Arrays.toString(e.getStackTrace()));
+ sysError.setFunc("saveOrder");
+ sysErrorService.insert(sysError);
+ throw new ServiceException(Constants.Code_500, "鏁版嵁璇锋眰寮傚父锛岃妫�鏌�");
+
+ }
+ }
}
diff --git a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
index 1acdbfd..9a9f06a 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/PatchLogMapper.xml
@@ -46,6 +46,7 @@
on r.order_id = ogd.order_id and r.order_sort = ogd.order_number
<where>
date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate}
+ and o.create_order>0
</where>
order by r.review_status,r.id desc
limit #{offset},#{pageSize};
@@ -156,6 +157,7 @@
on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1)) and rw.reviewed_state!=-1
+ and o.create_order>0
order by dd.id desc
</select>
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml b/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
index 3459587..ae4206b 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
@@ -77,6 +77,7 @@
left join sd.order_glass_detail as ogd on ogd.order_id=od.order_id and ogd.order_number=od.order_number and
ogd.technology_number=ps.technology_number
where ps.scheduling_id IS NOT NULL
+ and o.create_order>0
and od.create_time between #{selectTime1} and #{selectTime2}
and position(#{processes} in ps.processes)
and position(#{orderIds} in ps.order_id)
@@ -140,7 +141,7 @@
where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0
and od.create_time between #{selectTime1} and #{selectTime2}
and opd.reporting_work_num_count = 0
-
+ and o.create_order>0
and position(#{orderIds} in ogd.order_id)
-- and position("鍒囧壊" in ps.processes)
<if test="productionScheduling.order.orderId != null and productionScheduling.order.orderId != ''">
@@ -236,7 +237,7 @@
where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0
and od.create_time between #{selectTime1} and #{selectTime2}
and opd.reporting_work_num_count = 0
-
+ and o.create_order>0
and position(#{orderId} in ogd.order_id)
-- and position("鍒囧壊" in ps.processes)
<if test="productionScheduling.orderId != null and productionScheduling.orderId != ''">
@@ -269,6 +270,7 @@
ogd.technology_number=ps.technology_number
where ps.scheduling_id IS NOT NULL
and od.create_time between #{selectTime1} and #{selectTime2}
+ and o.create_order>0
and position(#{processes} in ps.processes)
and position(#{orderId} in ps.order_id)
<if test="productionScheduling.orderId != null and productionScheduling.orderId != ''">
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
index 1863856..b6d53d3 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -110,7 +110,9 @@
<select id="SelectTechnologicalProcess">
select ifnull((select ogd.process
from sd.order_glass_detail as ogd
+ left join sd.`order` as o on o.order_id=ogd.order_id
where ogd.production_id = LEFT(#{processIdStr}, 11)
+ and o.create_order>0
and POSITION(ogd.technology_number in #{technologyStr})
limit 1),'') as process
@@ -528,6 +530,7 @@
and rw.reporting_work_time between #{selectTime1} and #{selectTime2}
and position(#{orderId} in rw.order_id)
and rw.reviewed_state!=-1
+ and o.create_order>0
<if test="reportingWork.reportingWorkId != null and reportingWork.reportingWorkId != ''">
and rw.reporting_work_id regexp #{reportingWork.reportingWorkId}
</if>
@@ -569,6 +572,7 @@
where rw.reviewed_state != 2
and rw.reporting_work_time between #{selectTime1} and #{selectTime2} and position(#{orderId} in rw.order_id)
and rw.reviewed_state!=-1
+ and o.create_order>0
<if test="reportingWork.reportingWorkId != null and reportingWork.reportingWorkId != ''">
and rw.reporting_work_id regexp #{reportingWork.reportingWorkId}
</if>
diff --git a/north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml b/north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml
index aac51e1..488e0dd 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/ReworkMapper.xml
@@ -46,6 +46,7 @@
on r.order_id = ogd.order_id and r.order_sort = ogd.order_number
<where>
date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate}
+ and o.create_order>0
</where>
order by r.review_status,r.id desc limit #{offset},#{pageSize};
</select>
@@ -61,6 +62,7 @@
on r.order_id = ogd.order_id and r.order_sort = ogd.order_number
<where>
date(r.create_time)>=#{startDate} and date(r.create_time) <= #{endDate}
+ and o.create_order>0
</where>
) as zu
limit #{offset},#{pageSize};
@@ -100,7 +102,7 @@
left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd
on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number
- where dd.breakage_quantity-dd.quantity>0 and dd.available=1 order by dd.id desc
+ where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and o.create_order>0 order by dd.id desc
</select>
diff --git a/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml b/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
index 7a9049e..cb6e497 100644
--- a/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
+++ b/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -95,7 +95,7 @@
left join `order` as o
on o.order_id=ogd.order_id
where ogd.production_id IS NOT NULL
-
+ and o.order_review>0
<if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
and o.order_id regexp #{orderGlassDetail.orderId}
</if>
--
Gitblit v1.8.0