Merge remote-tracking branch 'origin/master'

master
Yangwl 1 year ago
commit 9d882c2dde

@ -276,25 +276,38 @@ public class OpenServiceImpl implements OpenService {
@Override
public AjaxResult machineRepair(EquRepairOrderDTO equRepairOrderDTO) {
if (equRepairOrderDTO.getFactory() == null) {
return error("工厂源不可为空!");
}
DynamicDataSourceContextHolder.push("ds_" + equRepairOrderDTO.getFactory());// 这是数据源的key
// 创建报修单
DeviceRepairOrder equRepairOrder = new DeviceRepairOrder();
// 获取故障报修流水号
String serialNum = String.format("%03d", openMapper.selectOrderCodeSerialNumber());
if (equRepairOrderDTO.getEquipmentCode() == null) {
return error("设备信息不可为空!");
}
equRepairOrder.setOrderCode("BX" + DateUtils.dateTimeNow(DateUtils.YYYYMMDD) + equRepairOrderDTO.getEquipmentCode() + serialNum);// 报修单号
equRepairOrder.setOrderId(IdUtils.fastSimpleUUID());// id
equRepairOrder.setEquipmentCode(equRepairOrderDTO.getEquipmentCode());
equRepairOrder.setOrderSource("上位机");// 故障来源
equRepairOrder.setOrderTime(DateUtils.getNowDate());// 报修时间
equRepairOrder.setOrderBreakdownTime(DateUtils.getNowDate());// 故障时间
equRepairOrder.setOrderRepairmanCode(equRepairOrderDTO.getUserName());// 用户账号
equRepairOrder.setOrderRepairmanName(equRepairOrderDTO.getUserNickName());// 用户名称
if (equRepairOrderDTO.getUserName() != null) {
equRepairOrder.setOrderRepairmanCode(equRepairOrderDTO.getUserName());// 用户账号
}
if (equRepairOrderDTO.getUserNickName() != null) {
equRepairOrder.setOrderRepairmanName(equRepairOrderDTO.getUserNickName());// 用户名称
}
equRepairOrder.setCreateTime(DateUtils.getNowDate());
equRepairOrder.setCreateBy(equRepairOrderDTO.getUserName());
equRepairOrder.setOrderStatus("待审核");// 报修单状态
equRepairOrder.setFactoryCode(equRepairOrderDTO.getFactory());// 工厂
equRepairOrder.setOrderConnection(equRepairOrderDTO.getPhoneNumber());// 联系方式
if (equRepairOrderDTO.getPhoneNumber() != null) {
equRepairOrder.setOrderConnection(equRepairOrderDTO.getPhoneNumber());// 联系方式
}
openMapper.insertEquRepairOrder(equRepairOrder);

@ -49,15 +49,15 @@ public class QcCheckTaskProduceController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(QcCheckTaskProduce qcCheckTaskProduce) {
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){
qcCheckTaskProduce.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end
}
// //默认时间范围T 00:00:00~T+1 00:00:00
// if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){
// qcCheckTaskProduce.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
// LocalDate date = LocalDate.now();
// LocalDate dateEnd = date.plusDays(1);
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
// qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end
// }
// if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){
// qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start
@ -77,15 +77,15 @@ public class QcCheckTaskProduceController extends BaseController {
@PostMapping("/export")
public void export(HttpServletResponse response, QcCheckTaskProduce qcCheckTaskProduce) {
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){
qcCheckTaskProduce.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
LocalDate date = LocalDate.now();
LocalDate dateEnd = date.plusDays(1);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end
}
// //默认时间范围T 00:00:00~T+1 00:00:00
// if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){
// qcCheckTaskProduce.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start
// LocalDate date = LocalDate.now();
// LocalDate dateEnd = date.plusDays(1);
// DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
// String dateEndStr = dtf.format(dateEnd)+" 00:00:00";
// qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end
// }
// if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){
// qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start

@ -89,4 +89,10 @@ public class QcDefectTypeController extends BaseController {
public AjaxResult remove(@PathVariable String[] defectIds) {
return toAjax(qcDefectTypeService.deleteQcDefectTypeByDefectIds(defectIds));
}
@GetMapping("/getDefectTypeListByDefectType/{defectType}")
public TableDataInfo getDefectTypeListByDefectType(@PathVariable("defectType") String defectType) {
List<QcDefectType> list = qcDefectTypeService.getDefectTypeListByDefectType(defectType);
return getDataTable(list);
}
}

@ -74,7 +74,13 @@ public class QcMaterialGroupDetailController extends BaseController {
@Log(title = "物料组成员", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcMaterialGroupDetail qcMaterialGroupDetail) {
return toAjax(qcMaterialGroupDetailService.insertQcMaterialGroupDetail(qcMaterialGroupDetail));
Boolean isNotUnique = qcMaterialGroupDetailService.validationGroupDetailData(qcMaterialGroupDetail.getMaterialCode());
if (isNotUnique) {
return AjaxResult.error("此物料已在组中,请重新选择!");
} else {
return toAjax(qcMaterialGroupDetailService.insertQcMaterialGroupDetail(qcMaterialGroupDetail));
}
}
/**

@ -80,7 +80,7 @@ public class QcStaticTableController extends BaseController {
/**
*
*/
@RequiresPermissions("quality:gcTableProduce:list")
@RequiresPermissions("quality:qcTableProduce:list")
@GetMapping("/getProduceChartData")
public QcStaticTable getProduceChartData(QcStaticTable qcStaticTable) {
QcStaticTable resultdto = new QcStaticTable();

@ -82,7 +82,7 @@ public class QcCheckTaskDetail extends BaseEntity {
/** 删除标识1删除0正常 */
private String delFlag;
private String remark;
private String projectId;
private String projectNo;
private Integer sort;
@ -99,6 +99,16 @@ public class QcCheckTaskDetail extends BaseEntity {
private String fileListStr;
private List<BaseFile> files;
@Override
public String getRemark() {
return remark;
}
@Override
public void setRemark(String remark) {
this.remark = remark;
}
public List<BaseFile> getFiles() {
return files;
}

@ -140,6 +140,24 @@ public class QcCheckTaskIncome extends BaseEntity {
private String fileList;
private List<BaseFile> files;
private String remark;
private String belongTo;
private String oldBelongTo;
public String getOldBelongTo() {
return oldBelongTo;
}
public void setOldBelongTo(String oldBelongTo) {
this.oldBelongTo = oldBelongTo;
}
public String getBelongTo() {
return belongTo;
}
public void setBelongTo(String belongTo) {
this.belongTo = belongTo;
}
@Override
public String getRemark() {

@ -149,6 +149,15 @@ public class QcCheckTaskProduce extends BaseEntity {
private BigDecimal cNoOkquality;
private String checkName;
private List<QcStaticTable> checkInfos;
private List<QcCheckTaskDefect> defects;
public List<QcCheckTaskDefect> getDefects() {
return defects;
}
public void setDefects(List<QcCheckTaskDefect> defects) {
this.defects = defects;
}
public List<QcStaticTable> getCheckInfos() {
return checkInfos;

@ -88,6 +88,24 @@ public class QcCheckUnqualified extends BaseEntity {
private String checkResult;
private String requestid;
private String typeCode;
private String sampleQuality;
private String noOkQuality;
public String getSampleQuality() {
return sampleQuality;
}
public void setSampleQuality(String sampleQuality) {
this.sampleQuality = sampleQuality;
}
public String getNoOkQuality() {
return noOkQuality;
}
public void setNoOkQuality(String noOkQuality) {
this.noOkQuality = noOkQuality;
}
public String getTypeCode() {
return typeCode;

@ -0,0 +1,69 @@
package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcCheckTaskDefect;
import org.apache.ibatis.annotations.Mapper;
/**
* --Mapper
*
* @author Open Platform
* @date 2024-01-11
*/
@Mapper
public interface QcCheckTaskDefectMapper {
/**
* --
*
* @param recordId --
* @return --
*/
public QcCheckTaskDefect selectQcCheckTaskDefectByRecordId(String recordId);
/**
* --
*
* @param qcCheckTaskDefect --
* @return --
*/
public List<QcCheckTaskDefect> selectQcCheckTaskDefectList(QcCheckTaskDefect qcCheckTaskDefect);
/**
* --
*
* @param qcCheckTaskDefect --
* @return
*/
public int insertQcCheckTaskDefect(QcCheckTaskDefect qcCheckTaskDefect);
/**
* --
*
* @param qcCheckTaskDefect --
* @return
*/
public int updateQcCheckTaskDefect(QcCheckTaskDefect qcCheckTaskDefect);
/**
* --
*
* @param recordId --
* @return
*/
public int deleteQcCheckTaskDefectByRecordId(String recordId);
/**
* --
*
* @param recordIds
* @return
*/
public int deleteQcCheckTaskDefectByRecordIds(String[] recordIds);
public int deleteQcCheckTaskDefectByBelongTo(String belongTo);
public List<QcCheckTaskDefect> selectDefectByBelongTo(String belongTo);
}

@ -84,4 +84,9 @@ public interface QcCheckUnqualifiedMapper {
List<QcCheckTaskIncome> getProductWorkOrder(QcCheckTaskIncome qcCheckTaskIncome);
void updatePutStatus(QcCheckTaskIncome qcCheckTaskIncome);
int repeatCheckTask(QcCheckTaskIncome recheck);
int repeatCheckTaskDefect(QcCheckTaskIncome recheck);
int repeatCheckTaskDetail(QcCheckTaskIncome recheck);
int repeatCheckTaskUser(QcCheckTaskIncome recheck);
}

@ -67,4 +67,6 @@ public interface QcDefectTypeMapper {
*/
int selectSerialNumber();
public List<QcDefectType> getDefectTypeListByDefectType(String defectType);
}

@ -64,4 +64,6 @@ public interface QcMaterialGroupDetailMapper {
public QcMaterialGroupDetail getGroupByMaterial(String materialCode);
public List<QcMaterialGroupDetail> validationData(String materialCode);
public List<QcMaterialGroupDetail> validationGroupDetailData(String materialCode);
}

@ -0,0 +1,64 @@
package com.op.quality.service;
import java.util.List;
import com.op.quality.domain.QcCheckTaskDefect;
/**
* --Service
*
* @author Open Platform
* @date 2024-01-11
*/
public interface IQcCheckTaskDefectService {
/**
* --
*
* @param recordId --
* @return --
*/
public QcCheckTaskDefect selectQcCheckTaskDefectByRecordId(String recordId);
/**
* --
*
* @param qcCheckTaskDefect --
* @return --
*/
public List<QcCheckTaskDefect> selectQcCheckTaskDefectList(QcCheckTaskDefect qcCheckTaskDefect);
/**
* --
*
* @param qcCheckTaskDefect --
* @return
*/
public int insertQcCheckTaskDefect(QcCheckTaskDefect qcCheckTaskDefect);
/**
* --
*
* @param qcCheckTaskDefect --
* @return
*/
public int updateQcCheckTaskDefect(QcCheckTaskDefect qcCheckTaskDefect);
/**
* --
*
* @param recordIds --
* @return
*/
public int deleteQcCheckTaskDefectByRecordIds(String[] recordIds);
/**
* --
*
* @param recordId --
* @return
*/
public int deleteQcCheckTaskDefectByRecordId(String recordId);
public int deleteQcCheckTaskDefectByBelongTo(String belongTo);
public List<QcCheckTaskDefect> selectDefectByBelongTo(String belongTo);
}

@ -59,4 +59,6 @@ public interface IQcDefectTypeService {
* @return
*/
public int deleteQcDefectTypeByDefectId(String defectId);
public List<QcDefectType> getDefectTypeListByDefectType(String defectType);
}

@ -58,5 +58,17 @@ public interface IQcMaterialGroupDetailService {
*/
public int deleteQcMaterialGroupDetailById(String id);
public boolean validationData(String id);
/**
*
* @param materialCode
* @return
*/
public boolean validationData(String materialCode);
/**
*
* @param materialCode
* @return
*/
public boolean validationGroupDetailData(String materialCode);
}

@ -0,0 +1,117 @@
package com.op.quality.service.impl;
import java.util.List;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcCheckTaskDefectMapper;
import com.op.quality.domain.QcCheckTaskDefect;
import com.op.quality.service.IQcCheckTaskDefectService;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* --Service
*
* @author Open Platform
* @date 2024-01-11
*/
@Service
public class QcCheckTaskDefectServiceImpl implements IQcCheckTaskDefectService {
@Autowired
private QcCheckTaskDefectMapper qcCheckTaskDefectMapper;
/**
* --
*
* @param recordId --
* @return --
*/
@Override
@DS("#header.poolName")
public QcCheckTaskDefect selectQcCheckTaskDefectByRecordId(String recordId) {
return qcCheckTaskDefectMapper.selectQcCheckTaskDefectByRecordId(recordId);
}
/**
* --
*
* @param qcCheckTaskDefect --
* @return --
*/
@Override
@DS("#header.poolName")
public List<QcCheckTaskDefect> selectQcCheckTaskDefectList(QcCheckTaskDefect qcCheckTaskDefect) {
return qcCheckTaskDefectMapper.selectQcCheckTaskDefectList(qcCheckTaskDefect);
}
/**
* --
*
* @param qcCheckTaskDefect --
* @return
*/
@Override
@DS("#header.poolName")
public int insertQcCheckTaskDefect(QcCheckTaskDefect qcCheckTaskDefect) {
qcCheckTaskDefect.setRecordId(IdUtils.fastSimpleUUID());
qcCheckTaskDefect.setCreateBy(SecurityUtils.getUsername());
qcCheckTaskDefect.setCreateTime(DateUtils.getNowDate());
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
qcCheckTaskDefect.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_",""));
return qcCheckTaskDefectMapper.insertQcCheckTaskDefect(qcCheckTaskDefect);
}
/**
* --
*
* @param qcCheckTaskDefect --
* @return
*/
@Override
@DS("#header.poolName")
public int updateQcCheckTaskDefect(QcCheckTaskDefect qcCheckTaskDefect) {
qcCheckTaskDefect.setUpdateTime(DateUtils.getNowDate());
qcCheckTaskDefect.setUpdateBy(SecurityUtils.getUsername());
return qcCheckTaskDefectMapper.updateQcCheckTaskDefect(qcCheckTaskDefect);
}
/**
* --
*
* @param recordIds --
* @return
*/
@Override
public int deleteQcCheckTaskDefectByRecordIds(String[] recordIds) {
return qcCheckTaskDefectMapper.deleteQcCheckTaskDefectByRecordIds(recordIds);
}
/**
* --
*
* @param recordId --
* @return
*/
@Override
public int deleteQcCheckTaskDefectByRecordId(String recordId) {
return qcCheckTaskDefectMapper.deleteQcCheckTaskDefectByRecordId(recordId);
}
@Override
public int deleteQcCheckTaskDefectByBelongTo(String belongTo) {
return qcCheckTaskDefectMapper.deleteQcCheckTaskDefectByBelongTo(belongTo);
}
@Override
public List<QcCheckTaskDefect> selectDefectByBelongTo(String belongTo) {
return qcCheckTaskDefectMapper.selectDefectByBelongTo(belongTo);
}
}

@ -388,105 +388,12 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
unqualified.setCreateBy(qcCheckTaskIncome.getUpdateBy());
unqualified.setFactoryCode(factoryCode);
unqualified.setType(qcCheckTaskIncome.getCheckType());
qcCheckTaskIncome.setUpdateBy(SecurityUtils.getUsername());
AjaxResult oaR = new AjaxResult();
if("material".equals(qcCheckTaskIncome.getTypeCode())) {
qcCheckTaskIncome.setRecordId(qcCheckTaskIncome.getRecordId());//检验任务主表id
oaR = this.createLLOA(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
oaR = this.createProduceOA(qcCheckTaskIncome);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())) {
//TODO;不走OA
oaR.put("code","200");
}
if((oaR.get("code").toString()).equals("200")){
/**qc_check_unqualified**/
qcCheckTaskIncome.setFactoryCode(factoryCode);
unqualified.setRequestid(oaR.get("data").toString());
qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
}
qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
}
return n ;
}
/*OA
* CQ OEMCM LLLB 01MATNR MAKTX suppliernum
* supplier CHARG comeQty testDate JYBH
* BJY OEMWLLY ZCF ZCOEMCM OEM
* memo PZGLBZG QC
*/
private AjaxResult createLLOA(QcCheckTaskIncome qcCheckTaskIncome){
QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskIncome.getRecordId());
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0020-来料检验不合格审批流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
paramMap.put("workflowId",26235);//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
mainObject.append("\"CQ\":"+qcCheckTaskIncome.getFactoryCode());//厂区
mainObject.append(",\"LLLB\":"+0);//来料类别【0、1】
mainObject.append(",\"MATNR\":"+"\""+detailInfo.getMaterialCode()+"\"");//物料编码
mainObject.append(",\"MAKTX\":"+"\""+detailInfo.getMaterialName()+"\"");//物料名称
mainObject.append(",\"suppliernum\":"+"\""+detailInfo.getSupplierCode()+"\"");//供应商编码
mainObject.append(",\"supplier\":"+"\""+detailInfo.getSupplierName()+"\"");//供应商名称
mainObject.append(",\"CHARG\":"+"\""+detailInfo.getIncomeBatchNo()+"\"");//生产批号
mainObject.append(",\"comeQty\":"+"\""+detailInfo.getQuality()+"\"");//来料数量
mainObject.append(",\"memo\":"+"\""+detailInfo.getRemark()+"\"");//不合格情况描述
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());
logger.info("流程Id 26235:"+ JSONObject.toJSONString(paramMap));
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
logger.info("流程Id 26235:"+ JSONObject.toJSONString(oaR));
return oaR;
}
/*OA
* ZL0020-:"workflowId": 26234
*
* ---------------
* PGBCJ /SSCJ /ZRPSN/GJZ/SCLX/OEM OEM/DH /DW/MEMO01 /
* MEMO03 /SFXZG QC/PGZG QC
* PGZRJL
* -------------
* {"colNames":"PROCODE,PRONAME,SCCODE......","details":[{"PROCODE":"","PRONAME":"",.....},{},{},.....]}
* PROCODE PRONAME SCCODE SCTOTAL
* BJDATE JYCODE JYDATE JYRESULT0 2
* PROCODEBAK BZ CPCYS PCJYBHGMS */
private AjaxResult createProduceOA(QcCheckTaskIncome qcCheckTaskIncome){
QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskIncome.getRecordId());
//发起来料检验OA流程
Map<String, Object> paramMap = new HashMap<>();
paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号qcCheckTaskIncome.getUpdateBy()
paramMap.put("requestLevel",0);//流程紧急度
paramMap.put("requestName","ZL0010-成品检验控制流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称
paramMap.put("workflowId",26234);//该流程对应的唯- workFlowld
StringBuffer mainObject = new StringBuffer();
mainObject.append("{");
mainObject.append("\"SSCJ\":"+detailInfo.getSupplierName());//所属车间
mainObject.append(",\"ZRPSN\":"+"\""+qcCheckTaskIncome.getUpdateBy()+"\"");//报检人
mainObject.append(",\"OEM\":"+"\""+qcCheckTaskIncome.getFactoryCode()+"\"");//OEM厂名
mainObject.append(",\"DH\":"+"\""+qcCheckTaskIncome.getWorkorderCodeSap()+"\"");//单号
mainObject.append(",\"MEMO01\":"+"\""+detailInfo.getRemark()+"\"");//不合格情况描述
mainObject.append("}");
paramMap.put("mainObject",mainObject.toString());
logger.info("流程Id 26234:"+ JSONObject.toJSONString(paramMap));
AjaxResult oaR = remoteOpenService.OAInspection(paramMap);
logger.info("流程Id 26234:"+ JSONObject.toJSONString(oaR));
return oaR;
}
@Override
@DS("#header.poolName")
public List<QcDefectType> getDefectList(QcDefectType qcDefectType) {
@ -587,7 +494,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
noOkQquality = noOkQquality.add(defect.getNoOkQuality());
}
qcCheckTask.setNoOkQuality(noOkQquality);//累计不合格数
qcCheckTask.setCheckManCode(qcCheckTaskIncome.getUpdateBy());
qcCheckTask.setCheckManName(qcCheckTaskIncome.getUpdateByName());
qcCheckTask.setSampleQuality(qcCheckTaskIncome.getSampleQuality());
/**qc_check_task**/
n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask);
@ -629,6 +537,28 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
/**pro_order_workorder_batch-->status->w5**/
qcCheckTaskIncome.setStatus("2");
qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome);
if("checkTypeSC".equals(qcCheckTaskIncome.getCheckType())&&"N".equals(result)){
QcCheckTaskIncome recheck = new QcCheckTaskIncome();
recheck.setOldBelongTo(belongId);
recheck.setBelongTo(recheck.getRecordId());
recheck.setCreateBy(updateBy);
recheck.setCreateTime(nowTime);
//首件不合格触发复检
recheck.setRecordId(IdUtils.fastSimpleUUID());
n = qcCheckUnqualifiedMapper.repeatCheckTask(recheck);
logger.info("复检表qc_check_task:" + n);
recheck.setRecordId(IdUtils.fastSimpleUUID());
n = qcCheckUnqualifiedMapper.repeatCheckTaskDefect(recheck);
logger.info("复检表qc_check_task_defect:" + n);
recheck.setRecordId(IdUtils.fastSimpleUUID());
n = qcCheckUnqualifiedMapper.repeatCheckTaskDetail(recheck);
logger.info("复检表qc_check_task_detail:" + n);
recheck.setRecordId(IdUtils.fastSimpleUUID());
n = qcCheckUnqualifiedMapper.repeatCheckTaskUser(recheck);
logger.info("复检表qc_check_task_user:" + n);
}
}else if("product".equals(qcCheckTaskIncome.getTypeCode())){
/**wms_product_put-->check_status->1**/
qcCheckTaskIncome.setStatus("2");
@ -644,23 +574,6 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
unqualified.setCreateBy(updateBy);
unqualified.setFactoryCode(factoryCode);
unqualified.setType(checkType);
//发起来料检验OA流程
AjaxResult oaR = new AjaxResult();
if("material".equals(qcCheckTaskIncome.getTypeCode())) {
qcCheckTaskIncome.setRecordId(belongId);//检验任务主表id
oaR = this.createLLOA(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
qcCheckTaskIncome.setRecordId(belongId);//检验任务主表id
oaR = this.createProduceOA(qcCheckTaskIncome);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())) {
//TODO;不走OA
oaR.put("code","500");
}
if(oaR!=null && (oaR.get("code").toString()).equals("200")){
/**qc_check_unqualified**/
unqualified.setRequestid(oaR.get("data").toString());
}
n = qcCheckUnqualifiedMapper.insertQcCheckUnqualified(unqualified);
logger.info("qc_check_unqualified:" + n);
}

@ -1,5 +1,6 @@
package com.op.quality.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@ -21,6 +22,7 @@ import com.op.common.core.web.domain.AjaxResult;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckTaskDefectService;
import com.op.quality.service.IQcCheckTaskUserService;
import com.op.system.api.RemoteUserService;
import com.op.system.api.domain.SysUser;
@ -74,6 +76,9 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@Autowired
private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper;
@Autowired
private IQcCheckTaskDefectService qcCheckTaskDefectService;
/**
*
*
@ -86,12 +91,18 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
QcCheckTaskProduce qcCheckTaskProduce = qcCheckTaskProduceMapper.selectQcCheckTaskProduceByRecordId(recordId);
//获取拼接好的检验人员信息
QcCheckTaskUser qcCheckTaskUser = qcCheckTaskUserService.selectQcCheckTaskUserByBelongTo(recordId);
if (StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) {
if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) {
qcCheckTaskProduce.setCheckManName(qcCheckTaskUser.getManNames());
}
if (StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) {
if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) {
qcCheckTaskProduce.setCheckManCode(qcCheckTaskUser.getManCodes());
}
//获取不良品检验信息
List<QcCheckTaskDefect> qcCheckTaskDefectList = qcCheckTaskDefectService.selectDefectByBelongTo(recordId);
if (!CollectionUtils.isEmpty(qcCheckTaskDefectList)) {
qcCheckTaskProduce.setDefects(qcCheckTaskDefectList);
}
return qcCheckTaskProduce;
}
@ -204,7 +215,18 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
logger.info("检查人新增"+m+"成功");
}
}
/**qc_check_task**/
/** 不良品数据插入 */
BigDecimal noOkQuality = new BigDecimal(0);
List<QcCheckTaskDefect> defectList = qcCheckTaskProduce.getDefects();
if (!CollectionUtils.isEmpty(defectList)) {
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(beLongId);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality());
}
}
qcCheckTaskProduce.setNoOkQuality(noOkQuality);
/**qc_check_task**/
qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce);
/**qc_check_task_detail**/
@ -246,6 +268,21 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
qcCheckTaskUserList.add(qcCheckTaskUser);
}
qcCheckTaskUserService.updateQcCheckTaskUser(qcCheckTaskUserList);
/** 不良品数据修改 **/
BigDecimal noOkQuality = new BigDecimal(0);
List<QcCheckTaskDefect> defectList = qcCheckTaskProduce.getDefects();
String belongTo = qcCheckTaskProduce.getRecordId();
//不是空执行下一步,空不做操作
if (!CollectionUtils.isEmpty(defectList)) {
qcCheckTaskDefectService.deleteQcCheckTaskDefectByBelongTo(belongTo);
for (QcCheckTaskDefect defect : defectList) {
defect.setBelongTo(belongTo);
qcCheckTaskDefectService.insertQcCheckTaskDefect(defect);
noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality());
}
}
qcCheckTaskProduce.setNoOkQuality(noOkQuality);
return qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
}

@ -166,4 +166,10 @@ public class QcDefectTypeServiceImpl implements IQcDefectTypeService {
public int deleteQcDefectTypeByDefectId(String defectId) {
return qcDefectTypeMapper.deleteQcDefectTypeByDefectId(defectId);
}
@Override
@DS("#header.poolName")
public List<QcDefectType> getDefectTypeListByDefectType(String defectType) {
return qcDefectTypeMapper.getDefectTypeListByDefectType(defectType);
}
}

@ -111,4 +111,9 @@ public class QcMaterialGroupDetailServiceImpl implements IQcMaterialGroupDetailS
public boolean validationData(String materialCode) {
return qcMaterialGroupDetailMapper.validationData(materialCode).size() > 0;
}
@Override
public boolean validationGroupDetailData(String materialCode) {
return qcMaterialGroupDetailMapper.validationGroupDetailData(materialCode).size() > 0;
}
}

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.quality.mapper.QcCheckTaskDefectMapper">
<resultMap type="QcCheckTaskDefect" id="QcCheckTaskDefectResult">
<result property="recordId" column="record_id" />
<result property="defectCode" column="defect_code" />
<result property="defectSubclass" column="defect_subclass" />
<result property="attr1" column="attr1" />
<result property="attr2" column="attr2" />
<result property="attr3" column="attr3" />
<result property="attr4" column="attr4" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="delFlag" column="del_flag" />
<result property="belongTo" column="belong_to" />
<result property="okQuality" column="ok_quality" />
<result property="noOkQuality" column="noOk_quality" />
</resultMap>
<sql id="selectQcCheckTaskDefectVo">
select record_id, defect_code, defect_subclass, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag, belong_to, ok_quality, noOk_quality from qc_check_task_defect
</sql>
<select id="selectQcCheckTaskDefectList" parameterType="QcCheckTaskDefect" resultMap="QcCheckTaskDefectResult">
<include refid="selectQcCheckTaskDefectVo"/>
<where>
<if test="defectCode != null and defectCode != ''"> and defect_code = #{defectCode}</if>
<if test="defectSubclass != null and defectSubclass != ''"> and defect_subclass = #{defectSubclass}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="attr4 != null and attr4 != ''"> and attr4 = #{attr4}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="belongTo != null and belongTo != ''"> and belong_to = #{belongTo}</if>
<if test="okQuality != null "> and ok_quality = #{okQuality}</if>
<if test="noOkQuality != null "> and noOk_quality = #{noOkQuality}</if>
</where>
</select>
<select id="selectQcCheckTaskDefectByRecordId" parameterType="String" resultMap="QcCheckTaskDefectResult">
<include refid="selectQcCheckTaskDefectVo"/>
where record_id = #{recordId}
</select>
<insert id="insertQcCheckTaskDefect" parameterType="QcCheckTaskDefect">
insert into qc_check_task_defect
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="recordId != null">record_id,</if>
<if test="defectCode != null">defect_code,</if>
<if test="defectSubclass != null">defect_subclass,</if>
<if test="attr1 != null">attr1,</if>
<if test="attr2 != null">attr2,</if>
<if test="attr3 != null">attr3,</if>
<if test="attr4 != null">attr4,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="delFlag != null">del_flag,</if>
<if test="belongTo != null">belong_to,</if>
<if test="okQuality != null">ok_quality,</if>
<if test="noOkQuality != null">noOk_quality,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="recordId != null">#{recordId},</if>
<if test="defectCode != null">#{defectCode},</if>
<if test="defectSubclass != null">#{defectSubclass},</if>
<if test="attr1 != null">#{attr1},</if>
<if test="attr2 != null">#{attr2},</if>
<if test="attr3 != null">#{attr3},</if>
<if test="attr4 != null">#{attr4},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="belongTo != null">#{belongTo},</if>
<if test="okQuality != null">#{okQuality},</if>
<if test="noOkQuality != null">#{noOkQuality},</if>
</trim>
</insert>
<update id="updateQcCheckTaskDefect" parameterType="QcCheckTaskDefect">
update qc_check_task_defect
<trim prefix="SET" suffixOverrides=",">
<if test="defectCode != null">defect_code = #{defectCode},</if>
<if test="defectSubclass != null">defect_subclass = #{defectSubclass},</if>
<if test="attr1 != null">attr1 = #{attr1},</if>
<if test="attr2 != null">attr2 = #{attr2},</if>
<if test="attr3 != null">attr3 = #{attr3},</if>
<if test="attr4 != null">attr4 = #{attr4},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">factory_code = #{factoryCode},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="belongTo != null">belong_to = #{belongTo},</if>
<if test="okQuality != null">ok_quality = #{okQuality},</if>
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
</trim>
where record_id = #{recordId}
</update>
<delete id="deleteQcCheckTaskDefectByRecordId" parameterType="String">
delete from qc_check_task_defect where record_id = #{recordId}
</delete>
<delete id="deleteQcCheckTaskDefectByRecordIds" parameterType="String">
delete from qc_check_task_defect where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
<delete id="deleteQcCheckTaskDefectByBelongTo" parameterType="String">
delete from qc_check_task_defect where belong_to = #{belongTo}
</delete>
<select id="selectDefectByBelongTo" parameterType="QcCheckTaskDefect" resultMap="QcCheckTaskDefectResult">
<include refid="selectQcCheckTaskDefectVo"/>
where belong_to = #{belongTo}
order by defect_code
</select>
</mapper>

@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select powb.batch_id batchId,
powb.batch_code batchCode
from pro_order_workorder_batch powb
left join pro_order_workorder pow on powb.workorder_id = pow.workorder_id
left join pro_order_workorder pow on powb.workorder_id = pow.workorder_id
where powb.del_flag = '0' and pow.del_flag = '0'
and pow.workorder_code = #{workorderCode}
</select>
@ -272,8 +272,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update qc_check_task
set
check_status = #{checkStatus},
check_man_code = #{updateBy},
check_man_name =#{updateByName},
check_man_code = #{checkManCode},
check_man_name =#{checkManName},
<if test="checkTime != null">check_time = #{checkTime},</if>
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
@ -293,7 +293,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
actual_value = #{item.actualValue},
status = #{item.status},
update_by = #{item.updateBy},
update_time = #{item.updateTime}
update_time = #{item.updateTime},
remark = #{item.remark}
where
record_id = #{item.recordId}
</foreach>
@ -351,7 +352,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qct.quality,
t.remark
from qc_check_task qct
left join(
left join(
SELECT
belong_to,
STUFF(

@ -36,6 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sampleQuality" column="sample_quality" />
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
<result property="noOkQuality" column="noOk_quality"/>
</resultMap>
<resultMap type="QcCheckReportIncome" id="QcCheckReportIncomeResult">
@ -90,7 +92,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
qct.create_by,qct.create_time, qct.update_by, qct.update_time,
qct.check_type,qct.sample_quality,qct.noOk_quality,
qct.aNoOkquality,qct.bNoOkquality,qct.cNoOkquality,
q.type_code,q.check_name
from qc_check_task qct
left join qc_check_type q on q.id = qct.check_type
@ -140,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select
id,check_name checkName
from qc_check_type
where type_code = #{typeCode} and del_flag='0'
where del_flag='0'
<if test="typeCode != null and typeCode!=''">and type_code = #{typeCode} </if>
</select>
<select id="getOrderWorks" resultType="com.op.quality.domain.QcCheckTaskProduce">
select qct.factory_code factoryCode,

@ -34,7 +34,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qcu.create_time createTime,
qct.check_type checkType,qtn.check_name checkName,qct.check_no checkNo,qct.income_batch_no incomeBatchNo,qct.order_no orderNo,
qct.material_code materialCode,qct.material_name materialName,qct.quality,qct.unit,qct.supplier_code supplierCode,
qct.supplier_name supplierName,qct.income_time incomeTime,qct.check_loc checkLoc,qct.check_status checkStatus,qct.check_man_code checkManCode,
qct.supplier_name supplierName,qct.income_time incomeTime,qct.check_loc checkLoc,qct.check_status checkStatus,
qct.check_man_code checkManCode,qct.sample_quality sampleQuality,qct.noOk_quality noOkQuality,
qct.check_man_name checkManName,qct.check_time checkTime,qct.check_result checkResult
from qc_check_unqualified qcu
left join qc_check_task qct on qcu.task_id = qct.record_id
@ -113,7 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
product_date incomeTime,
status
from pro_order_workorder
where status != 'w5' and parent_order != '0' and workorder_code_sap is not null
where status != 'w5' and parent_order = '0' and workorder_code_sap is not null
<if test="orderNo != null">and workorder_code_sap like concat ('%',#{orderNo},'%')</if>
order by product_date desc
</select>
@ -177,6 +178,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="requestid != null">#{requestid},</if>
</trim>
</insert>
<insert id="repeatCheckTask">
insert into qc_check_task(
record_id,check_no,income_batch_no,order_no,
material_code,material_name,quality,unit,
supplier_code,supplier_name,income_time,
check_status,
create_by,create_time,factory_code,del_flag,
check_type,noOk_quality,sample_quality,type_code,order_type
)
select
#{recordId},check_no,income_batch_no ,order_no ,
material_code,material_name,quality ,unit ,
supplier_code,supplier_name,income_time,
'0',
#{createBy},#{createTime},factory_code,del_flag,
check_type,noOk_quality,sample_quality,type_code ,'reCheckCS'
from qc_check_task where record_id = #{oldBelongTo} and del_flag = '0'
</insert>
<insert id="repeatCheckTaskDefect">
insert qc_check_task_defect(
record_id,
defect_code,defect_subclass,
create_by,create_time,
factory_code,del_flag,
belong_to,noOk_quality)
select
REPLACE(NEWID(), '-',''),
defect_code,defect_subclass,
#{createBy},#{createTime},
factory_code,del_flag,
#{belongTo},noOk_quality
from qc_check_task_defect where belong_to = #{oldBelongTo} and del_flag = '0'
</insert>
<insert id="repeatCheckTaskDetail">
insert into qc_check_task_detail(
record_id,belong_to,order_num,rule_name,property_code,
check_mode,check_tool,unit_code,check_standard,actual_value,
create_by,create_time,factory_code,del_flag,
project_id,project_no,type_project_id,defect_code
)
select
REPLACE(NEWID(), '-',''),#{belongTo},order_num,rule_name,property_code,
check_mode,check_tool,unit_code,check_standard,actual_value,
#{createBy},#{createTime},factory_code,del_flag,
project_id,project_no,type_project_id,defect_code
from qc_check_task_detail where belong_to = #{oldBelongTo} and del_flag = '0'
</insert>
<insert id="repeatCheckTaskUser">
insert into qc_check_task_user(
record_id,check_no,
check_man_code,check_man_name,
create_by,create_time,
factory_code,del_flag,belong_to
)
select
REPLACE(NEWID(), '-',''),check_no,
check_man_code,check_man_name,
#{createBy},#{createTime},
factory_code,del_flag,#{belongTo}
from qc_check_task_user where belong_to = #{oldBelongTo} and del_flag = '0'
</insert>
<update id="updateQcCheckUnqualified" parameterType="QcCheckUnqualified">
update qc_check_unqualified

@ -128,4 +128,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{defectId}
</foreach>
</delete>
<select id="getDefectTypeListByDefectType" parameterType="String" resultMap="QcDefectTypeResult">
select defect_code, defect_subclass
from qc_defect_type
where defect_type = #{defectType}
order by defect_code
</select>
</mapper>

@ -110,4 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from qc_check_type_project
where material_code = #{materialCode}
</select>
<select id="validationGroupDetailData" parameterType="String" resultMap="QcMaterialGroupDetailResult">
<include refid="selectQcMaterialGroupDetailVo"></include>
where material_code = #{materialCode}
</select>
</mapper>

@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="factoryCode != null and factoryCode != ''">factory_code,</if>
<if test="delFlag != null">del_flag,</if>
<if test="standardNo != null">standard_no,</if>
<if test="version != null">version = #{version}</if>
<if test="version != null">version,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="standardNo != null">#{standardNo}</if>
<if test="version != null">#{version}</if>
<if test="standardNo != null">#{standardNo},</if>
<if test="version != null">#{version},</if>
</trim>
</insert>

@ -167,8 +167,8 @@ public class OdsProcureOutOrder extends BaseEntity {
private String supplierName;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createDate;
/** 最后更新人 */
@ -191,6 +191,24 @@ public class OdsProcureOutOrder extends BaseEntity {
/** 企业编码 */
@Excel(name = "企业编码")
private String enterpriseCode;
private String sapMag;
private String sapXMag;
public String getSapMag() {
return sapMag;
}
public void setSapMag(String sapMag) {
this.sapMag = sapMag;
}
public String getSapXMag() {
return sapXMag;
}
public void setSapXMag(String sapXMag) {
this.sapXMag = sapXMag;
}
public void setSiteCode(String siteCode) {
this.siteCode = siteCode;

@ -78,4 +78,8 @@ public interface OdsProcureOutOrderMapper {
List<OdsProcureOutOrder> selectOdsProcureOutOrderListByu1(@Param("list")List<OdsProcureOutOrder> orderList);
void updateOdsProcureOutOrderByids(@Param("order")OdsProcureOutOrder order,@Param("list") List<OdsProcureOutOrder> sapMaterialPostingList);
List<String> selectOdsProcureOutOrderListZUKEN(OdsProcureOutOrder order);
List<String> selectOdsProcureOutOrderListZUKENX(OdsProcureOutOrder order);
}

@ -96,8 +96,26 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService
@Override
@DS("#header.poolName")
public List<OdsProcureOutOrder> selectOdsProcureOutOrderListZU(OdsProcureOutOrder odsProcureOutOrder) {
List<OdsProcureOutOrder> orderList=odsProcureOutOrderMapper.selectOdsProcureOutOrderListZU(odsProcureOutOrder);
for (OdsProcureOutOrder order:
orderList) {
String sapMag="";
String sapxMag="";
List<String> sapMags= odsProcureOutOrderMapper.selectOdsProcureOutOrderListZUKEN(order);
for (String mag:
sapMags) {
sapMag=sapMag+mag;
}
List<String> sapxMags= odsProcureOutOrderMapper.selectOdsProcureOutOrderListZUKENX(order);
for (String magx:
sapxMags) {
sapxMag=sapxMag+magx;
}
order.setSapMag(sapMag);
order.setSapXMag(sapxMag);
}
return odsProcureOutOrderMapper.selectOdsProcureOutOrderListZU(odsProcureOutOrder);
return orderList;
}
@Override

@ -48,6 +48,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join base_product bp on right(bp.product_code,11) = bbc.component
<where>
<if test="bomCode != null and bomCode != ''"> and bbc.bom_code like concat('%', #{bomCode}, '%')</if>
<if test="productDescZh != null and productDescZh != ''"> and b1.product_desc_zh like concat('%', #{productDescZh}, '%')</if>
<if test="productCode != null and productCode != ''"> and bbc.product_code like concat('%', #{productCode}, '%')</if>
</where>
GROUP BY bbc.bom_code,bb.bom_bo,b1.product_desc_zh,bbc.product_code
order by bbc.bom_code desc

@ -58,6 +58,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
GROUP BY Produce_Code,User_Defined1
</select>
<select id="selectOdsProcureOutOrderListZUKEN" resultType="java.lang.String">
SELECT DISTINCT
User_Defined11
FROM
ods_procure_out_order
WHERE
Active = '1'
<if test="produceCode != null and produceCode != ''"> and Produce_Code = #{produceCode}</if>
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
AND User_Defined3 !='x'
</select>
<select id="selectOdsProcureOutOrderListZUKENX" resultType="java.lang.String">
SELECT DISTINCT
User_Defined11
FROM
ods_procure_out_order
WHERE
Active = '1'
<if test="produceCode != null and produceCode != ''"> and Produce_Code = #{produceCode}</if>
<if test="userDefined1 != null and userDefined1 != ''"> and User_Defined1 = #{userDefined1}</if>
AND User_Defined3 ='x'
</select>
<select id="selectOdsProcureOutOrderListZUT" parameterType="OdsProcureOutOrder" resultMap="OdsProcureOutOrderResult">
<include refid="selectOdsProcureOutOrderVo"/>
<where>

Loading…
Cancel
Save