sap调整+质量手持接口+首页柱图数据bug修复

highway
zhaoxiaolin 1 year ago
parent 2f221e1905
commit f13ee5d888

@ -339,7 +339,7 @@ public class IWCInterfaceServiceImpl implements IWCSInterfaceService {
List<String> sapWorkOrders = mesReportWorkMapper.getSapWorkOrder(work.getWorkorderCode());//根据belong_work_order找到所有要关闭的虚拟工单
for(String sapWorkOrder:sapWorkOrders){
R r2= remoteSapService.sapCloseOrder(sapWorkOrder);
logger.info("工单"+work.getWorkorderCode()+",sapworkorder:"+sapWorkOrder+",sap关闭"+r.getCode()+",返回信息:"+r.getMsg());
logger.info("工单"+work.getWorkorderCode()+",sapworkorder:"+sapWorkOrder+",sap关闭"+r2.getCode()+",返回信息:"+r2.getMsg());
}
work.setStatus("w3");

@ -275,18 +275,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_factory where f_type = 'c'
</select>
<select id="getLineChartsDatas" resultType="com.op.mes.domain.MesReportProduction">
select mrw.nameDate,
mrw.productCode,
mrw.productName,
mrw.feedbackTime,
sum(mrw.quantity) quantity
from(
select
mrw.product_name+CONVERT(varchar(10),mrw.feedback_time, 120) nameDate,
mrw.product_code productCode,
mrw.product_name productName,
CONVERT(varchar(10),mrw.feedback_time, 120) feedbackTime,
sum(mrw.quantity_feedback) quantity
from mes_report_work mrw
product_name+CONVERT(varchar(10),feedback_time, 120) nameDate,
product_code productCode,
product_name productName,
CONVERT(varchar(10),feedback_time, 120) feedbackTime,
quantity_feedback quantity
from mes_report_work
where
CONVERT(varchar(10),mrw.feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),mrw.feedback_time, 120)
group by mrw.product_code,mrw.product_name,mrw.feedback_time
order by mrw.feedback_time
CONVERT(varchar(10),feedback_time, 120) >= #{productDateStart}
and #{productDateEnd} >= CONVERT(varchar(10),feedback_time, 120)
)mrw
group by mrw.nameDate,mrw.productCode,mrw.productName,mrw.feedbackTime
</select>
<select id="getLineChartsNames" resultType="java.lang.String">
select
@ -445,7 +451,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getSapWorkOrder" resultType="java.lang.String">
select workorder_code_sap from pro_order_workorder
where belong_work_order = #{workorderCode} and del_flag = '0' and parent_order = '0'
where belong_work_order = #{workorderCode} and del_flag = '0'
</select>
<insert id="insertMesReportWork" parameterType="MesReportWork">

@ -209,7 +209,7 @@ public class OpenServiceImpl implements OpenService {
List<String> sapWorkOrders = openMapper.getSapWorkOrder(work.getWorkorderCode());//根据belong_work_order找到所有要关闭的虚拟工单
for(String sapWorkOrder:sapWorkOrders){
R rclose = remoteSapService.sapCloseOrder(sapWorkOrder);
logger.info("工单"+work.getWorkorderCode()+",sapworkorder:"+sapWorkOrder+",sap关闭"+r.getCode()+",返回信息:"+r.getMsg());
logger.info("工单"+work.getWorkorderCode()+",sapworkorder:"+sapWorkOrder+",sap关闭"+rclose.getCode()+",返回信息:"+rclose.getMsg());
}
work.setStatus("w3");
work.setUpdateTime(DateUtils.getNowDate());

@ -124,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getSapWorkOrder" resultType="java.lang.String">
select workorder_code_sap from pro_order_workorder
where belong_work_order = #{workorderCode} and del_flag = '0' and parent_order = '0'
where belong_work_order = #{workorderCode} and del_flag = '0'
</select>
</mapper>

@ -348,16 +348,19 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
//获取领料单
this.getMesPrepare(returnCodes,wcodes);
//关闭母订单子订单会自动关闭//订单的订单编码
//for(String orderCode:ordercodes){
R closeR= remoteSapService.sapCloseOrder(ordercodes.get(0));
logger.info(workorderId+"下发工单后关闭母订单"+ordercodes.get(0)+":"+closeR.getMsg());
//}
//关闭母子订单//订单的订单编码
R closeR = null;
for(String orderCode:ordercodes){
closeR= remoteSapService.sapCloseOrder(orderCode);
logger.info(workorderId+"下发工单后关闭母订单"+orderCode+":"+closeR.getCode()+","+closeR.getMsg());
}
if(closeR.getCode()==200){
//下达工单
String[] idsArrayAll = (String[])wids.toArray(new String[wids.size()]);
proOrderWorkorderMapper.downWorkorders(idsArrayAll);
}
}
}
return 1;
}

@ -35,8 +35,6 @@ import com.op.common.core.web.page.TableDataInfo;
public class QcCheckTypeProjectController extends BaseController {
@Autowired
private IQcCheckTypeProjectService qcCheckTypeProjectService;
@Autowired
private IQcMaterialGroupService qcMaterialGroupService;
/**
*

@ -7,10 +7,12 @@ import com.op.common.core.utils.StringUtils;
import com.op.common.core.web.controller.BaseController;
import com.op.common.core.web.domain.AjaxResult;
import com.op.common.core.web.page.TableDataInfo;
import com.op.common.security.annotation.RequiresPermissions;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.service.*;
import com.op.system.api.RemoteMesService;
import com.op.system.api.domain.SysDictData;
import com.op.system.api.domain.dto.WCSDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
@ -39,7 +41,8 @@ public class QuaController extends BaseController {
private IQcCheckTaskWarehousingService qcCheckTaskWarehousingService;
@Autowired
private IQcCheckTypeService qcCheckTypeService;
@Autowired
private IQcMaterialGroupService qcMaterialGroupService;
@Autowired
private IQcCheckTaskIncomeService qcCheckTaskIncomeService;
@ -179,17 +182,14 @@ public class QuaController extends BaseController {
*
*/
@GetMapping(value = "getCheckTaskList")
public AjaxResult getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) {
if(StringUtils.isBlank(qcCheckTaskIncome.getFactoryCode())){
return error("[factoryCode]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskIncome.getCheckType())){
return error("[checkType]不能为空");
}
if(StringUtils.isBlank(qcCheckTaskIncome.getCheckManCode())){
return error("[checkManCode]不能为空");
public TableDataInfo getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome) {
if(StringUtils.isNotBlank(qcCheckTaskIncome.getCheckStatus())){
qcCheckTaskIncome.setCheckStatus("'"+ qcCheckTaskIncome.getCheckStatus().replace(",","','")+"'");
}
return success(qcProCheckService.getCheckTaskList(qcCheckTaskIncome));
startPage();
List<QcCheckTaskIncome> list = qcProCheckService.getCheckTaskList(qcCheckTaskIncome);
return getDataTable(list);
}
/**
*
@ -204,13 +204,44 @@ public class QuaController extends BaseController {
}
return success(qcProCheckService.getCheckTaskDetailList(qcCheckTaskDetail));
}
/**检测结果提交**/
@PostMapping("/commitCheckResults")
public AjaxResult commitCheckResults(@RequestBody List<QcCheckTaskDetail> details) {
if(CollectionUtils.isEmpty(details)){
/**
*
*/
@PostMapping(value = "commitCheckResults")
public AjaxResult commitCheckResults(@RequestBody List<QcCheckTaskDetail> qcCheckTaskDetails) {
if(CollectionUtils.isEmpty(qcCheckTaskDetails)){
return error("[List<QcCheckTaskDetail>]不能为空");
}
return toAjax(qcCheckTaskIncomeService.commitCheckResults(details));
return success(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskDetails));
}
/**
*
*/
@GetMapping(value = "getQcUnitList")
public TableDataInfo getQcUnitList(SysDictData sysDictData) {
startPage();
List<SysDictData> list = qcProCheckService.getQcUnitList(sysDictData);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/pdaMaterialTree")
public AjaxResult pdaMaterialTree(QcMaterialGroup materialGroup) {
DynamicDataSourceContextHolder.push("ds_"+materialGroup.getFactoryCode());
return success(qcMaterialGroupService.selectQcMaterialTreeList(materialGroup));
}
/**
*
*/
@GetMapping("/getCheckTypeProjectList")
public TableDataInfo list(QcCheckTypeProject qcCheckTypeProject) {
DynamicDataSourceContextHolder.push("ds_"+qcCheckTypeProject.getFactoryCode());
startPage();
List<QcCheckTypeProject> list = qcMaterialGroupService.getCheckTypeProjectList(qcCheckTypeProject);
return getDataTable(list);
}
}

@ -95,6 +95,15 @@ public class QcCheckTaskDetail extends BaseEntity {
private List<String> actualValues;
private String typeProjectId;
private String defectCode;
private String checkType;
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getDefectCode() {
return defectCode;

@ -70,10 +70,48 @@ public class QcCheckTypeProject extends BaseEntity {
@Excel(name = "物料编码")
private String materialCode;
private String materialName;
private Integer sort;
private String projectNo;
private String checkTool;
private String checkMode;
private String uint;
public String getUint() {
return uint;
}
public void setUint(String uint) {
this.uint = uint;
}
public String getCheckTool() {
return checkTool;
}
public void setCheckTool(String checkTool) {
this.checkTool = checkTool;
}
public String getCheckMode() {
return checkMode;
}
public void setCheckMode(String checkMode) {
this.checkMode = checkMode;
}
public String getMaterialName() {
return materialName;
}
public void setMaterialName(String materialName) {
this.materialName = materialName;
}
public Integer getSort() {
return sort;
}

@ -6,6 +6,7 @@ import com.op.quality.domain.QcBomComponent;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcCheckTaskIncome;
import com.op.quality.domain.QcSupplier;
import com.op.system.api.domain.SysDictData;
import com.op.system.api.domain.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -79,4 +80,6 @@ public interface QcCheckTaskIncomeMapper {
int updateQcCheckTask(QcCheckTaskIncome qcCheckTask);
int updateQcCheckTaskDetails(@Param("list") List<QcCheckTaskDetail> details);
List<SysDictData> getQcUnitList(SysDictData sysDictData);
}

@ -1,9 +1,12 @@
package com.op.quality.mapper;
import java.util.List;
import java.util.Map;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcCheckTypeProject;
import com.op.system.api.domain.SysDictData;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
/**
@ -65,4 +68,8 @@ public interface QcCheckTypeProjectMapper {
List<QcCheckTaskDetail> getTPByTypeMaterial(QcCheckTypeProject qctp);
List<QcCheckTaskDetail> getTPByTypeGroup(QcCheckTypeProject qctp);
List<QcCheckTypeProject> getCheckTypeProjectList(QcCheckTypeProject qcCheckTypeProject);
@MapKey("dictValue")
Map<String, SysDictData> getDictMap(SysDictData sysDictData);
}

@ -1,6 +1,8 @@
package com.op.quality.service;
import java.util.List;
import com.op.quality.domain.QcCheckTypeProject;
import com.op.quality.domain.QcMaterialGroup;
import com.op.quality.domain.vo.TreeSelect;
import com.op.system.api.domain.SysDept;
@ -69,4 +71,6 @@ public interface IQcMaterialGroupService {
public int deleteQcMaterialGroupById(String id);
public boolean validationData(String id);
List<QcCheckTypeProject> getCheckTypeProjectList(QcCheckTypeProject qcCheckTypeProject);
}

@ -6,6 +6,7 @@ import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcCheckTaskIncome;
import com.op.quality.domain.QcCheckTypeProject;
import com.op.quality.domain.QcProCheck;
import com.op.system.api.domain.SysDictData;
import java.util.List;
@ -34,4 +35,6 @@ public interface QcProCheckService {
List<QcCheckTaskIncome> getCheckTaskList(QcCheckTaskIncome qcCheckTaskIncome);
List<QcCheckTaskDetail > getCheckTaskDetailList(QcCheckTaskDetail qcCheckTaskDetail);
List<SysDictData> getQcUnitList(SysDictData sysDictData);
}

@ -1,4 +1,4 @@
package com.op.quality.service.serviceImpl;
package com.op.quality.service.impl;
import com.alibaba.fastjson2.JSONArray;
import com.baomidou.dynamic.datasource.annotation.DS;

@ -1,4 +1,4 @@
package com.op.quality.service.serviceImpl;
package com.op.quality.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;

@ -1,4 +1,4 @@
package com.op.quality.service.serviceImpl;
package com.op.quality.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;

@ -296,6 +296,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
String factoryCode = details.get(0).getFactoryCode();
String updateBy = details.get(0).getUpdateBy();
String belongId = details.get(0).getBelongTo();
String checkType = details.get(0).getCheckType();
//默认合格
String result = "Y";
@ -318,22 +319,23 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
logger.info("qc_check_task:"+n);
/**更新qc_check_task_detail**/
for(QcCheckTaskDetail detail:details){
detail.setUpdateTime(nowTime);
}
n= qcCheckTaskIncomeMapper.updateQcCheckTaskDetails(details);;
n= qcCheckTaskIncomeMapper.updateQcCheckTaskDetails(details);
logger.info("更新qc_check_task_detail:"+n);
//不合格处理
if("N".equals(result)){
// QcCheckUnqualified unqualified = new QcCheckUnqualified();
// unqualified.setId(IdUtils.fastSimpleUUID());
// unqualified.setTaskId(qcCheckTaskIncome.getRecordId());
// unqualified.setCreateTime(DateUtils.getNowDate());
// unqualified.setCreateBy(qcCheckTaskIncome.getUpdateBy());
// unqualified.setFactoryCode(factoryCode);
// unqualified.setType(qcCheckTaskIncome.getCheckType());
// /**qc_check_unqualified**/
// qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
QcCheckUnqualified unqualified = new QcCheckUnqualified();
unqualified.setId(IdUtils.fastSimpleUUID());
unqualified.setTaskId(belongId);
unqualified.setCreateTime(DateUtils.getNowDate());
unqualified.setCreateBy(updateBy);
unqualified.setFactoryCode(factoryCode);
unqualified.setType(checkType);
/**qc_check_unqualified**/
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:"+n);
}
return n ;

@ -1,11 +1,14 @@
package com.op.quality.service.serviceImpl;
package com.op.quality.service.impl;
import java.util.List;
import java.util.Map;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.system.api.domain.SysDictData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
@ -48,7 +51,17 @@ public class QcCheckTypeProjectServiceImpl implements IQcCheckTypeProjectService
@Override
@DS("#header.poolName")
public List<QcCheckTypeProject> selectQcCheckTypeProjectList(QcCheckTypeProject qcCheckTypeProject) {
return qcCheckTypeProjectMapper.selectQcCheckTypeProjectList(qcCheckTypeProject);
List<QcCheckTypeProject> dtos = qcCheckTypeProjectMapper.selectQcCheckTypeProjectList(qcCheckTypeProject);
DynamicDataSourceContextHolder.push("master");
SysDictData sData = new SysDictData();
sData.setDictType("unit");
Map<String,SysDictData> dictMap = qcCheckTypeProjectMapper.getDictMap(sData);
if(dictMap != null){
for(QcCheckTypeProject dto:dtos){
dto.setUint(dictMap.get(dto.getUint()).getDictLabel());
}
}
return dtos;
}
/**

@ -1,4 +1,4 @@
package com.op.quality.service.serviceImpl;
package com.op.quality.service.impl;
import java.util.ArrayList;
import java.util.Iterator;
@ -7,13 +7,17 @@ import java.util.Map;
import java.util.stream.Collectors;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.SpringUtils;
import com.op.common.core.utils.StringUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.datascope.annotation.DataScope;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcCheckTypeProject;
import com.op.quality.domain.vo.TreeSelect;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.system.api.domain.SysDictData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcMaterialGroupMapper;
@ -34,6 +38,8 @@ import javax.servlet.http.HttpServletRequest;
public class QcMaterialGroupServiceImpl implements IQcMaterialGroupService {
@Autowired
private QcMaterialGroupMapper qcMaterialGroupMapper;
@Autowired
private QcCheckTypeProjectMapper qcCheckTypeProjectMapper;
/**
*
@ -46,7 +52,7 @@ public class QcMaterialGroupServiceImpl implements IQcMaterialGroupService {
return qcMaterialGroupMapper.selectQcMaterialGroupById(id);
}
@Override
@DataScope(deptAlias = "d")
//@DataScope(deptAlias = "d")
@DS("#header.poolName")
public List<QcMaterialGroup> selectQcMaterialGroupList(QcMaterialGroup qcMaterialGroup) {
return qcMaterialGroupMapper.selectQcMaterialGroupList(qcMaterialGroup);
@ -179,6 +185,21 @@ public class QcMaterialGroupServiceImpl implements IQcMaterialGroupService {
return qcMaterialGroupMapper.validationData(id).size() > 0;
}
@Override
public List<QcCheckTypeProject> getCheckTypeProjectList(QcCheckTypeProject qcCheckTypeProject) {
List<QcCheckTypeProject> dtos = qcCheckTypeProjectMapper.getCheckTypeProjectList(qcCheckTypeProject);
DynamicDataSourceContextHolder.push("master");
SysDictData sData = new SysDictData();
sData.setDictType("unit");
Map<String,SysDictData> dictMap = qcCheckTypeProjectMapper.getDictMap(sData);
if(dictMap != null){
for(QcCheckTypeProject dto:dtos){
dto.setUint(dictMap.get(dto.getUint()).getDictLabel());
}
}
return dtos;
}
private boolean hasChild(List<QcMaterialGroup> list, QcMaterialGroup t) {
return getChildList(list, t).size() > 0 ? true : false;
}

@ -1,5 +1,6 @@
package com.op.quality.service.serviceImpl;
package com.op.quality.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
import com.op.common.core.domain.BaseFileData;
import com.op.common.core.domain.R;
@ -14,6 +15,7 @@ import com.op.quality.domain.QcProCheck;
import com.op.quality.mapper.QcCheckTaskIncomeMapper;
import com.op.quality.mapper.QcProCheckMapper;
import com.op.quality.service.QcProCheckService;
import com.op.system.api.domain.SysDictData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -127,4 +129,10 @@ public class QcProCheckServiceImpl implements QcProCheckService {
return qcCheckTaskIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
}
@Override
@DS("master")
public List<SysDictData> getQcUnitList(SysDictData sysDictData) {
return qcCheckTaskIncomeMapper.getQcUnitList(sysDictData);
}
}

@ -130,7 +130,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
td.create_by createBy,
td.create_time createTime,
td.update_by updateBy,
td.update_time updateTime,
td.update_time updateTime,
td.belong_to belongTo,
qctp.upper_diff upperDiff,
@ -140,6 +139,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join qc_check_type_project qctp on td.type_project_id = qctp.id
where td.belong_to = #{belongTo} and td.del_flag='0' and qctp.del_flag = '0'
</select>
<select id="getQcUnitList" resultType="com.op.system.api.domain.SysDictData">
select dict_label dictLabel,
dict_value dictValue
from sys_dict_data
where dict_type = 'unit'
and status = '0'
</select>
<insert id="insertQcCheckTaskIncome" parameterType="QcCheckTaskIncome">
insert into qc_check_task
@ -258,14 +264,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach collection="list" item="item" separator=";">
update qc_check_task_detail
set
zh_desc = #{item.name1},
contact_phone = #{item.telf1},
address = #{item.stras},
factory_code = #{item.bukrs},
create_time= #{item.erdat},
update_time = #{item.erdat}
actual_value = #{item.actualValue},
status = #{item.status},
update_by = #{item.updateBy},
update_time = #{item.updateTime}
where
supplier_code = #{item.lifnr}
record_id = #{item.recordId}
</foreach>
</update>

@ -26,7 +26,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQcCheckTypeProjectVo">
select id, project_id, type_id, standard_value, upper_diff, down_diff, sample, status, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag, group_id, material_code, sample_num from qc_check_type_project
select id, project_id, type_id, standard_value, upper_diff, down_diff, sample, status, attr1,
create_by, create_time, update_by, update_time, factory_code, del_flag, group_id, material_code, sample_num
from qc_check_type_project
</sql>
<select id="selectQcCheckTypeProjectList" parameterType="QcCheckTypeProject" resultMap="QcCheckTypeProjectResult">
@ -137,7 +139,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and qctp.type_id = #{typeId}
order by qctp.sort
</select>
<select id="getCheckTypeProjectList" resultType="com.op.quality.domain.QcCheckTypeProject">
SELECT
ctp.id,
ctp.project_id projectId,
cp.rule_name ruleName,
cp.property_code propertyCode,
ctp.type_id typeId,
ct.check_name,
ctp.standard_value standardValue,
ctp.upper_diff upperDiff,
ctp.down_diff downDiff,
qcp.unit_code unitCode,
ctp.sample,
ctp.material_code materialCode,
p.product_desc_zh materialName,
qcp.check_tool checkTool,
qcp.check_mode checkMode
FROM qc_check_type_project ctp
LEFT JOIN qc_check_project cp ON ctp.project_id = cp.id
left join qc_check_type ct on ct.id = ctp.type_id
left join base_product p on p.product_code = ctp.material_code
<where>
AND ctp.del_flag = '0' AND cp.del_flag = '0'
<if test="groupId != null and groupId != ''"> and ctp.group_id = #{groupId}</if>
</where>
order by ctp.type_id
</select>
<select id="getDictMap" resultType="com.op.system.api.domain.SysDictData">
select dict_label dictLabel,
dict_value dictValue
from sys_dict_data where dict_type = #{dictType} and status = '0'
</select>
<insert id="insertQcCheckTypeProject" parameterType="QcCheckTypeProject">
insert into qc_check_type_project
<trim prefix="(" suffix=")" suffixOverrides=",">

@ -248,12 +248,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qct.material_code, qct.material_name, qct.quality, qct.unit,
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc,
qct.check_status, qct.check_man_code,qct.check_man_name, qct.check_time, qct.check_result,
qct.status,qct.create_by,qct.create_time
qct.status,qct.create_by,qct.create_time,qct.check_type
from qc_check_task qct
<where>
and qct.del_flag = '0'
<if test="checkType != null and checkType != ''"> and qct.check_type = #{checkType}</if>
<if test="checkManCode != null and checkManCode != ''"> and qct.check_man_code = #{checkManCode}</if>
<if test="checkStatus != null and checkStatus != ''"> and qct.check_status in (#{checkStatus})</if>
</where>
order by qct.create_time desc
</select>

Loading…
Cancel
Save