Merge remote-tracking branch 'origin/master'

highway
wws 11 months ago
commit c7e42f4045

@ -11,9 +11,19 @@ public class SapWorkCenter {
private String arbpl;//工作中心
private String ktext;//工作中心描述
private String parentId;
private String fType;
@JsonFormat(pattern = "yyyy-MM-dd")
private Date aedat_grnd;//更新日期
public String getfType() {
return fType;
}
public void setfType(String fType) {
this.fType = fType;
}
public String getWeeks() {
return weeks;
}

@ -1,7 +1,6 @@
# Tomcat
server:
port: 9300
# Spring
spring:
application:
@ -29,3 +28,7 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
servlet:
multipart:
max-file-size: 50MB
max-request-size: 50MB

@ -61,10 +61,10 @@ public class QcCheckTaskIncomeController extends BaseController {
qcCheckTaskIncome.setIncomeTimeEnd(dateEndStr);//end
}
if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){
qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start
qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end
}
// if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){
// qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start
// qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end
// }
startPage();
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.selectQcCheckTaskIncomeList(qcCheckTaskIncome);
@ -89,10 +89,10 @@ public class QcCheckTaskIncomeController extends BaseController {
qcCheckTaskIncome.setIncomeTimeEnd(dateEndStr);//end
}
if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){
qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start
qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end
}
// if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){
// qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start
// qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end
// }
List<QcCheckTaskIncome> list = qcCheckTaskIncomeService.selectQcCheckTaskIncomeList(qcCheckTaskIncome);
ExcelUtil<QcCheckTaskIncome> util = new ExcelUtil<QcCheckTaskIncome>(QcCheckTaskIncome.class);

@ -6,6 +6,8 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.common.core.utils.DateUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcCheckType;
import com.op.quality.domain.QcSupplier;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -56,10 +58,10 @@ public class QcCheckTaskProduceController extends BaseController {
qcCheckTaskProduce.setProduceDateEnd(dateEndStr);//end
}
if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){
qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start
qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end
}
// if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){
// qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start
// qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end
// }
startPage();
List<QcCheckTaskProduce> list = qcCheckTaskProduceService.selectQcCheckTaskProduceList(qcCheckTaskProduce);
@ -84,10 +86,10 @@ public class QcCheckTaskProduceController extends BaseController {
qcCheckTaskProduce.setProduceDateEnd(dateEndStr);//end
}
if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){
qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start
qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end
}
// if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){
// qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start
// qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end
// }
List<QcCheckTaskProduce> list = qcCheckTaskProduceService.selectQcCheckTaskProduceList(qcCheckTaskProduce);
ExcelUtil<QcCheckTaskProduce> util = new ExcelUtil<QcCheckTaskProduce>(QcCheckTaskProduce.class);
@ -110,7 +112,11 @@ public class QcCheckTaskProduceController extends BaseController {
@Log(title = "生产过程检验任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcCheckTaskProduce qcCheckTaskProduce) {
return toAjax(qcCheckTaskProduceService.insertQcCheckTaskProduce(qcCheckTaskProduce));
int r = qcCheckTaskProduceService.insertQcCheckTaskProduce(qcCheckTaskProduce);
if(r>0){
return toAjax(r);
}
return error("添加失败:请检查物料的关联检测项");
}
/**
@ -134,7 +140,7 @@ public class QcCheckTaskProduceController extends BaseController {
}
/**
*
*
*/
@GetMapping("/getQcListWorkCenter")
public TableDataInfo getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce) {
@ -142,4 +148,16 @@ public class QcCheckTaskProduceController extends BaseController {
List<QcCheckTaskProduce> list = qcCheckTaskProduceService.getQcListWorkCenter(qcCheckTaskProduce);
return getDataTable(list);
}
@PutMapping("/getCheckTypes")
public List<QcCheckType> getCheckTypes(@RequestBody QcCheckType qcCheckType) {
return qcCheckTaskProduceService.getCheckTypes(qcCheckType);
}
/**
*
*/
@PutMapping("/changeProduceStatus")
public AjaxResult changeProduceStatus(@RequestBody QcCheckTaskProduce qcCheckTaskProduce) {
return toAjax(qcCheckTaskProduceService.changeProduceStatus(qcCheckTaskProduce));
}
}

@ -1,7 +1,13 @@
package com.op.quality.controller;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.op.common.core.utils.DateUtils;
import com.op.quality.domain.QcCheckTaskProduce;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -40,6 +46,15 @@ public class QcCheckTaskWarehousingController extends BaseController {
@GetMapping("/list")
public TableDataInfo list(QcCheckTaskWarehousing qcCheckTaskWarehousing) {
startPage();
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(qcCheckTaskWarehousing.getIncomeTimeStart())){
qcCheckTaskWarehousing.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";
qcCheckTaskWarehousing.setIncomeTimeEnd(dateEndStr);//end
}
List<QcCheckTaskWarehousing> list = qcCheckTaskWarehousingService.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing);
return getDataTable(list);
}
@ -51,6 +66,15 @@ public class QcCheckTaskWarehousingController extends BaseController {
@Log(title = "成品入库检验任务", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcCheckTaskWarehousing qcCheckTaskWarehousing) {
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(qcCheckTaskWarehousing.getIncomeTimeStart())){
qcCheckTaskWarehousing.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";
qcCheckTaskWarehousing.setIncomeTimeEnd(dateEndStr);//end
}
List<QcCheckTaskWarehousing> list = qcCheckTaskWarehousingService.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing);
ExcelUtil<QcCheckTaskWarehousing> util = new ExcelUtil<QcCheckTaskWarehousing>(QcCheckTaskWarehousing.class);
util.exportExcel(response, list, "成品入库检验任务数据");
@ -72,7 +96,11 @@ public class QcCheckTaskWarehousingController extends BaseController {
@Log(title = "成品入库检验任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcCheckTaskWarehousing qcCheckTaskWarehousing) {
return toAjax(qcCheckTaskWarehousingService.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing));
int r = qcCheckTaskWarehousingService.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing);
if(r>0){
return toAjax(r);
}
return error("添加失败:请检查物料的关联检测项");
}
/**
@ -94,4 +122,14 @@ public class QcCheckTaskWarehousingController extends BaseController {
public AjaxResult remove(@PathVariable String[] recordIds) {
return toAjax(qcCheckTaskWarehousingService.deleteQcCheckTaskWarehousingByRecordIds(recordIds));
}
/**
*
*/
@GetMapping("/getQcListLoc")
public TableDataInfo getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing) {
startPage();
List<QcCheckTaskWarehousing> list = qcCheckTaskWarehousingService.getQcListLoc(qcCheckTaskWarehousing);
return getDataTable(list);
}
}

@ -99,4 +99,12 @@ public class QcCheckTypeProjectController extends BaseController {
public AjaxResult remove(@PathVariable String[] ids) {
return toAjax(qcCheckTypeProjectService.deleteQcCheckTypeProjectByIds(ids));
}
/**
*
*/
@Log(title = "物料检验项目维护", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody QcCheckTypeProject qcCheckTypeProject) {
return toAjax(qcCheckTypeProjectService.changeStatus(qcCheckTypeProject));
}
}

@ -93,6 +93,15 @@ public class QcCheckTaskDetail extends BaseEntity {
private BigDecimal sample;
private Integer sampleNum;
private List<String> actualValues;
private String typeProjectId;
public String getTypeProjectId() {
return typeProjectId;
}
public void setTypeProjectId(String typeProjectId) {
this.typeProjectId = typeProjectId;
}
public List<String> getActualValues() {
return actualValues;

@ -78,8 +78,8 @@ public class QcCheckTaskIncome extends BaseEntity {
private String checkManName;
/** 检验时间 */
@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 checkTime;
/** 检验结果Y合格 */
@ -117,6 +117,24 @@ public class QcCheckTaskIncome extends BaseEntity {
private String incomeTimeEnd;
private String checkTimeStart;
private String checkTimeEnd;
private String typeCode;
private String checkType;
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public String getIncomeTimeStart() {
return incomeTimeStart;

@ -57,8 +57,8 @@ public class QcCheckTaskProduce extends BaseEntity {
private String carName;
/** 生产时间 */
@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 produceDate;
/** 检测地点 */
@ -78,8 +78,8 @@ public class QcCheckTaskProduce extends BaseEntity {
private String checkManName;
/** 检验时间 */
@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 checkTime;
/** 检验结果Y合格 */
@ -118,6 +118,16 @@ public class QcCheckTaskProduce extends BaseEntity {
private String checkTimeStart;
private String checkTimeEnd;
private String checkType;
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getProduceDateStart() {
return produceDateStart;
}

@ -10,7 +10,7 @@ import com.op.common.core.web.domain.BaseEntity;
/**
* qc_check_task_warehousing
*
*
* @author Open Platform
* @date 2023-10-19
*/
@ -48,17 +48,17 @@ public class QcCheckTaskWarehousing extends BaseEntity {
@Excel(name = "单位")
private String unit;
/** 供应商编码 */
@Excel(name = "供应商编码")
/** 仓库编码 */
@Excel(name = "仓库编码")
private String supplierCode;
/** 供应商名称 */
@Excel(name = "供应商名称")
/** 仓库名称 */
@Excel(name = "仓库名称")
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 incomeTime;
/** 检测地点 */
@ -78,8 +78,8 @@ public class QcCheckTaskWarehousing extends BaseEntity {
private String checkManName;
/** 检验时间 */
@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 checkTime;
/** 检验结果Y合格 */
@ -113,6 +113,61 @@ public class QcCheckTaskWarehousing extends BaseEntity {
/** 删除标识1删除0正常 */
private String delFlag;
private String incomeTimeStart;
private String incomeTimeEnd;
private String checkTimeStart;
private String checkTimeEnd;
private String typeCode;
private String checkType;
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getIncomeTimeStart() {
return incomeTimeStart;
}
public void setIncomeTimeStart(String incomeTimeStart) {
this.incomeTimeStart = incomeTimeStart;
}
public String getIncomeTimeEnd() {
return incomeTimeEnd;
}
public void setIncomeTimeEnd(String incomeTimeEnd) {
this.incomeTimeEnd = incomeTimeEnd;
}
public String getCheckTimeStart() {
return checkTimeStart;
}
public void setCheckTimeStart(String checkTimeStart) {
this.checkTimeStart = checkTimeStart;
}
public String getCheckTimeEnd() {
return checkTimeEnd;
}
public void setCheckTimeEnd(String checkTimeEnd) {
this.checkTimeEnd = checkTimeEnd;
}
public String getTypeCode() {
return typeCode;
}
public void setTypeCode(String typeCode) {
this.typeCode = typeCode;
}
public void setRecordId(String recordId) {
this.recordId = recordId;
}

@ -3,17 +3,20 @@ package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcCheckTaskProduce;
import com.op.quality.domain.QcCheckType;
import org.apache.ibatis.annotations.Mapper;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-10-19
*/
@Mapper
public interface QcCheckTaskProduceMapper {
/**
*
*
*
* @param recordId
* @return
*/
@ -21,7 +24,7 @@ public interface QcCheckTaskProduceMapper {
/**
*
*
*
* @param qcCheckTaskProduce
* @return
*/
@ -29,7 +32,7 @@ public interface QcCheckTaskProduceMapper {
/**
*
*
*
* @param qcCheckTaskProduce
* @return
*/
@ -37,7 +40,7 @@ public interface QcCheckTaskProduceMapper {
/**
*
*
*
* @param qcCheckTaskProduce
* @return
*/
@ -45,7 +48,7 @@ public interface QcCheckTaskProduceMapper {
/**
*
*
*
* @param recordId
* @return
*/
@ -53,9 +56,15 @@ public interface QcCheckTaskProduceMapper {
/**
*
*
*
* @param recordIds
* @return
*/
public int deleteQcCheckTaskProduceByRecordIds(String[] recordIds);
public List<QcCheckTaskProduce> getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce);
int getTodayMaxNum(QcCheckTaskProduce qcCheckTaskProduce);
List<QcCheckType> getCheckTypes(QcCheckType qcCheckType);
}

@ -3,17 +3,20 @@ package com.op.quality.mapper;
import java.util.List;
import com.op.quality.domain.QcCheckTaskWarehousing;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
/**
* Mapper
*
*
* @author Open Platform
* @date 2023-10-19
*/
@Mapper
public interface QcCheckTaskWarehousingMapper {
/**
*
*
*
* @param recordId
* @return
*/
@ -21,7 +24,7 @@ public interface QcCheckTaskWarehousingMapper {
/**
*
*
*
* @param qcCheckTaskWarehousing
* @return
*/
@ -29,7 +32,7 @@ public interface QcCheckTaskWarehousingMapper {
/**
*
*
*
* @param qcCheckTaskWarehousing
* @return
*/
@ -37,7 +40,7 @@ public interface QcCheckTaskWarehousingMapper {
/**
*
*
*
* @param qcCheckTaskWarehousing
* @return
*/
@ -45,7 +48,7 @@ public interface QcCheckTaskWarehousingMapper {
/**
*
*
*
* @param recordId
* @return
*/
@ -53,9 +56,13 @@ public interface QcCheckTaskWarehousingMapper {
/**
*
*
*
* @param recordIds
* @return
*/
public int deleteQcCheckTaskWarehousingByRecordIds(String[] recordIds);
int getTodayMaxNum(QcCheckTaskWarehousing qcCheckTaskWarehousing);
List<QcCheckTaskWarehousing> getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing);
}

@ -2,6 +2,7 @@ package com.op.quality.service;
import java.util.List;
import com.op.quality.domain.QcCheckTaskProduce;
import com.op.quality.domain.QcCheckType;
/**
* Service
@ -59,4 +60,8 @@ public interface IQcCheckTaskProduceService {
public int deleteQcCheckTaskProduceByRecordId(String recordId);
List<QcCheckTaskProduce> getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce);
List<QcCheckType> getCheckTypes(QcCheckType qcCheckType);
int changeProduceStatus(QcCheckTaskProduce qcCheckTaskProduce);
}

@ -5,14 +5,14 @@ import com.op.quality.domain.QcCheckTaskWarehousing;
/**
* Service
*
*
* @author Open Platform
* @date 2023-10-19
*/
public interface IQcCheckTaskWarehousingService {
/**
*
*
*
* @param recordId
* @return
*/
@ -20,7 +20,7 @@ public interface IQcCheckTaskWarehousingService {
/**
*
*
*
* @param qcCheckTaskWarehousing
* @return
*/
@ -28,7 +28,7 @@ public interface IQcCheckTaskWarehousingService {
/**
*
*
*
* @param qcCheckTaskWarehousing
* @return
*/
@ -36,7 +36,7 @@ public interface IQcCheckTaskWarehousingService {
/**
*
*
*
* @param qcCheckTaskWarehousing
* @return
*/
@ -44,7 +44,7 @@ public interface IQcCheckTaskWarehousingService {
/**
*
*
*
* @param recordIds
* @return
*/
@ -52,9 +52,11 @@ public interface IQcCheckTaskWarehousingService {
/**
*
*
*
* @param recordId
* @return
*/
public int deleteQcCheckTaskWarehousingByRecordId(String recordId);
List<QcCheckTaskWarehousing> getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing);
}

@ -57,4 +57,8 @@ public interface IQcCheckTypeProjectService {
* @return
*/
public int deleteQcCheckTypeProjectById(String id);
/**
*
*/
public int changeStatus(QcCheckTypeProject qcCheckTypeProject);
}

@ -10,13 +10,11 @@ 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.quality.domain.*;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import com.op.quality.mapper.*;
import com.op.quality.service.IQcCheckTaskProduceService;
import com.op.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcCheckTaskIncomeMapper;
import com.op.quality.service.IQcCheckTaskIncomeService;
import org.springframework.util.CollectionUtils;
import org.springframework.web.context.request.RequestContextHolder;
@ -44,6 +42,12 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
@Autowired
private QcCheckTaskProduceMapper qcCheckTaskProduceMapper;
@Autowired
private QcCheckTaskWarehousingMapper qcCheckTaskWarehousingMapper;
/**
*
*
@ -65,6 +69,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
@Override
@DS("#header.poolName")
public List<QcCheckTaskIncome> selectQcCheckTaskIncomeList(QcCheckTaskIncome qcCheckTaskIncome) {
qcCheckTaskIncome.setDelFlag("0");
return qcCheckTaskIncomeMapper.selectQcCheckTaskIncomeList(qcCheckTaskIncome);
}
@ -100,7 +105,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
/**取检测项**/
QcCheckTypeProject qctp= new QcCheckTypeProject();
qctp.setTypeId("checkTypeLL");//来料检验
qctp.setTypeId(qcCheckTaskIncome.getCheckType());//生产过程检验
qctp.setMaterialCode(qcCheckTaskIncome.getMaterialCode());//特性
/**qc_check_type_project**/
List<QcCheckTaskDetail> items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp);
@ -125,7 +130,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
item.setCreateTime(nowDate);
item.setCreateBy(createBy);
item.setFactoryCode(factoryCode);
item.setStatus("Y");
item.setStatus("N");
}
return qcCheckTaskDetailMapper.addBatch(items);
}
@ -216,13 +221,37 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService {
public int commitCheckResult(QcCheckTaskIncome qcCheckTaskIncome) {
//遍历检测项目
List<String> projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId());
String result = "N";
if(CollectionUtils.isEmpty(projects)){
qcCheckTaskIncome.setCheckResult("Y");//合格
result = "Y";//合格
}else{
qcCheckTaskIncome.setCheckResult("N");//不合格
result = "N";//合格
}
qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate());
return qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome);
int n = 0;
String recordId = qcCheckTaskIncome.getRecordId();
if("material".equals(qcCheckTaskIncome.getTypeCode())){
qcCheckTaskIncome.setCheckStatus("2");
qcCheckTaskIncome.setCheckResult(result);
qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome);
}else if("produce".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskProduce qcCheckTaskProduce = new QcCheckTaskProduce();
qcCheckTaskProduce.setCheckStatus("2");
qcCheckTaskProduce.setRecordId(recordId);
qcCheckTaskProduce.setCheckResult(result);
qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
}else if("product".equals(qcCheckTaskIncome.getTypeCode())){
QcCheckTaskWarehousing warehousing = new QcCheckTaskWarehousing();
warehousing.setCheckStatus("2");
warehousing.setRecordId(recordId);
warehousing.setCheckResult(result);
warehousing.setCheckTime(DateUtils.getNowDate());
n = qcCheckTaskWarehousingMapper.updateQcCheckTaskWarehousing(warehousing);
}
return n ;
}
}

@ -1,14 +1,28 @@
package com.op.quality.service.impl;
import java.util.Date;
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.core.web.domain.AjaxResult;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcCheckTaskProduceMapper;
import com.op.quality.domain.QcCheckTaskProduce;
import com.op.quality.service.IQcCheckTaskProduceService;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* Service
@ -21,6 +35,15 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@Autowired
private QcCheckTaskProduceMapper qcCheckTaskProduceMapper;
@Autowired
private QcCheckTypeProjectMapper qcCheckTypeProjectMapper;
@Autowired
private QcMaterialGroupDetailMapper qcMaterialGroupDetailMapper;
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
/**
*
*
@ -42,6 +65,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@Override
@DS("#header.poolName")
public List<QcCheckTaskProduce> selectQcCheckTaskProduceList(QcCheckTaskProduce qcCheckTaskProduce) {
qcCheckTaskProduce.setDelFlag("0");
return qcCheckTaskProduceMapper.selectQcCheckTaskProduceList(qcCheckTaskProduce);
}
@ -55,7 +79,58 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
@DS("#header.poolName")
public int insertQcCheckTaskProduce(QcCheckTaskProduce qcCheckTaskProduce) {
qcCheckTaskProduce.setCreateTime(DateUtils.getNowDate());
return qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce);
String bpDD = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
int liushuiNum = qcCheckTaskProduceMapper.getTodayMaxNum(qcCheckTaskProduce);
String liushuiStr = String.format("%04d", liushuiNum);
String createBy = SecurityUtils.getUsername();
Date nowDate= DateUtils.getNowDate();
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
qcCheckTaskProduce.setCheckNo(bpDD+liushuiStr);
/**qc_check_task_produce**/
String beLongId = IdUtils.fastSimpleUUID();
qcCheckTaskProduce.setRecordId(beLongId);
qcCheckTaskProduce.setFactoryCode(factoryCode);
qcCheckTaskProduce.setCreateTime(nowDate);
qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce);
/**取检测项**/
QcCheckTypeProject qctp= new QcCheckTypeProject();
qctp.setTypeId(qcCheckTaskProduce.getCheckType());//生产过程检验
qctp.setMaterialCode(qcCheckTaskProduce.getMaterialCode());//特性
/**qc_check_type_project**/
List<QcCheckTaskDetail> items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp);
if(CollectionUtils.isEmpty(items)){
/**qc_material_group_detail**/
QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckTaskProduce.getMaterialCode());
if(group == null){
return 0;//没有找到检测项目
}
qctp.setGroupId(group.getGroupId());//共性
items = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
}
/**qc_check_task_detail**/
if(CollectionUtils.isEmpty(items)){
return 0;//没有找到检测项目
}
for(QcCheckTaskDetail item:items){
item.setRecordId(IdUtils.fastSimpleUUID());
item.setBelongTo(beLongId);
item.setCreateTime(nowDate);
item.setCreateBy(createBy);
item.setFactoryCode(factoryCode);
item.setStatus("Y");
}
return qcCheckTaskDetailMapper.addBatch(items);
}
/**
@ -96,9 +171,23 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService
}
@Override
@DS("#header.poolName")
public List<QcCheckTaskProduce> getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce) {
return null;
return qcCheckTaskProduceMapper.getQcListWorkCenter(qcCheckTaskProduce);
}
@Override
@DS("#header.poolName")
public List<QcCheckType> getCheckTypes(QcCheckType qcCheckType) {
return qcCheckTaskProduceMapper.getCheckTypes(qcCheckType);
}
@Override
@DS("#header.poolName")
public int changeProduceStatus(QcCheckTaskProduce qcCheckTaskProduce) {
qcCheckTaskProduce.setUpdateBy(SecurityUtils.getUsername());
qcCheckTaskProduce.setUpdateTime(DateUtils.getNowDate());
return qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce);
}
}

@ -1,14 +1,28 @@
package com.op.quality.service.impl;
import java.util.Date;
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 com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcCheckTypeProject;
import com.op.quality.domain.QcMaterialGroupDetail;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.op.quality.mapper.QcCheckTaskWarehousingMapper;
import com.op.quality.domain.QcCheckTaskWarehousing;
import com.op.quality.service.IQcCheckTaskWarehousingService;
import org.springframework.util.CollectionUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
/**
* Service
@ -21,6 +35,15 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin
@Autowired
private QcCheckTaskWarehousingMapper qcCheckTaskWarehousingMapper;
@Autowired
private QcCheckTypeProjectMapper qcCheckTypeProjectMapper;
@Autowired
private QcMaterialGroupDetailMapper qcMaterialGroupDetailMapper;
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
/**
*
*
@ -42,6 +65,7 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin
@Override
@DS("#header.poolName")
public List<QcCheckTaskWarehousing> selectQcCheckTaskWarehousingList(QcCheckTaskWarehousing qcCheckTaskWarehousing) {
qcCheckTaskWarehousing.setDelFlag("0");
return qcCheckTaskWarehousingMapper.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing);
}
@ -54,8 +78,57 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin
@Override
@DS("#header.poolName")
public int insertQcCheckTaskWarehousing(QcCheckTaskWarehousing qcCheckTaskWarehousing) {
qcCheckTaskWarehousing.setCreateTime(DateUtils.getNowDate());
return qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing);
String bpDD = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
int liushuiNum = qcCheckTaskWarehousingMapper.getTodayMaxNum(qcCheckTaskWarehousing);
String liushuiStr = String.format("%04d", liushuiNum);
String createBy = SecurityUtils.getUsername();
Date nowDate= DateUtils.getNowDate();
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
qcCheckTaskWarehousing.setCheckNo(bpDD+liushuiStr);
/**qc_check_task_warehousing**/
String beLongId = IdUtils.fastSimpleUUID();
qcCheckTaskWarehousing.setRecordId(beLongId);
qcCheckTaskWarehousing.setFactoryCode(factoryCode);
qcCheckTaskWarehousing.setCreateTime(nowDate);
qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing);
/**取检测项**/
QcCheckTypeProject qctp= new QcCheckTypeProject();
qctp.setTypeId(qcCheckTaskWarehousing.getCheckType());//生产过程检验
qctp.setMaterialCode(qcCheckTaskWarehousing.getMaterialCode());//特性
/**qc_check_type_project**/
List<QcCheckTaskDetail> items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp);
if(CollectionUtils.isEmpty(items)){
/**qc_material_group_detail**/
QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckTaskWarehousing.getMaterialCode());
if(group == null){
return 0;//没有找到检测项目
}
qctp.setGroupId(group.getGroupId());//共性
items = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
}
/**qc_check_task_detail**/
if(CollectionUtils.isEmpty(items)){
return 0;//没有找到检测项目
}
for(QcCheckTaskDetail item:items){
item.setRecordId(IdUtils.fastSimpleUUID());
item.setBelongTo(beLongId);
item.setCreateTime(nowDate);
item.setCreateBy(createBy);
item.setFactoryCode(factoryCode);
item.setStatus("Y");
}
return qcCheckTaskDetailMapper.addBatch(items);
}
/**
@ -94,4 +167,12 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin
public int deleteQcCheckTaskWarehousingByRecordId(String recordId) {
return qcCheckTaskWarehousingMapper.deleteQcCheckTaskWarehousingByRecordId(recordId);
}
@Override
@DS("#header.poolName")
public List<QcCheckTaskWarehousing> getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing) {
return qcCheckTaskWarehousingMapper.getQcListLoc(qcCheckTaskWarehousing);
}
}

@ -106,4 +106,12 @@ public class QcCheckTypeProjectServiceImpl implements IQcCheckTypeProjectService
public int deleteQcCheckTypeProjectById(String id) {
return qcCheckTypeProjectMapper.deleteQcCheckTypeProjectById(id);
}
@Override
@DS("#header.poolName")
public int changeStatus(QcCheckTypeProject qcCheckTypeProject) {
qcCheckTypeProject.setUpdateBy(SecurityUtils.getUsername());
qcCheckTypeProject.setUpdateTime(DateUtils.getNowDate());
return qcCheckTypeProjectMapper.updateQcCheckTypeProject(qcCheckTypeProject);
}
}

@ -28,9 +28,7 @@ import javax.servlet.http.HttpServletRequest;
public class QcUserMaterialServiceImpl implements IQcUserMaterialService {
@Autowired
private QcUserMaterialMapper qcUserMaterialMapper;
@Override
@DS("#header.poolName")
public List<QcUserMaterial> selectUserList(QcUserMaterial qcUserMaterial) {
return qcUserMaterialMapper.selectUserList( qcUserMaterial);
}

@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
check_tool,unit_code,
check_standard,actual_value,
status,create_by,create_time,
factory_code,del_flag
factory_code,del_flag,type_project_id
) values
<foreach item="item" index="index" collection="list" separator=",">
(
@ -135,9 +135,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.projectId},#{item.projectNo},#{item.ruleName},#{item.sort},
#{item.propertyCode},#{item.checkMode},
#{item.checkTool},#{item.unitCode},
#{item.checkStandard},#{item.actualValue},
'0',#{item.createBy},#{item.createTime},
#{item.factoryCode},'0'
#{item.standardValue},#{item.actualValue},
#{item.status},,#{item.createBy},#{item.createTime},
#{item.factoryCode},'0',#{item.typeProjectId}
)
</foreach>
</insert>

@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</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>
@ -121,8 +122,12 @@ 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,
qctp.upper_diff upperDiff,
qctp.down_diff downDiff,
qctp.sample
from qc_check_task_detail td
left join qc_check_type_project qctp on td.type_project_id = qctp.id
where td.belong_to = #{belongTo}
</select>

@ -36,15 +36,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectQcCheckTaskProduceVo">
select record_id, check_no, batch_no, order_no, material_code, material_name, quality, unit, car_code, car_name, produce_date, check_loc, check_status, check_man_code, check_man_name, check_time, check_result, status, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_check_task_produce
select record_id, check_no, batch_no, order_no, material_code, material_name,
quality, unit, car_code, car_name, produce_date, check_loc, check_status,
check_man_code, check_man_name, check_time, check_result, status, attr1,
attr2, attr3, attr4, create_by, create_time, update_by, update_time,
factory_code, del_flag from qc_check_task_produce
</sql>
<select id="selectQcCheckTaskProduceList" parameterType="QcCheckTaskProduce" resultMap="QcCheckTaskProduceResult">
<include refid="selectQcCheckTaskProduceVo"/>
<where>
<if test="checkNo != null and checkNo != ''"> and check_no = #{checkNo}</if>
<if test="batchNo != null and batchNo != ''"> and batch_no = #{batchNo}</if>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="checkNo != null and checkNo != ''"> and check_no like concat('%', #{checkNo}, '%')</if>
<if test="batchNo != null and batchNo != ''"> and batch_no like concat('%', #{batchNo}, '%')</if>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="quality != null "> and quality = #{quality}</if>
@ -58,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="checkManName != null and checkManName != ''"> and check_man_name like concat('%', #{checkManName}, '%')</if>
<if test="checkTime != null "> and check_time = #{checkTime}</if>
<if test="checkResult != null and checkResult != ''"> and check_result = #{checkResult}</if>
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
@ -76,6 +81,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where record_id = #{recordId}
</select>
<select id="getQcListWorkCenter" resultType="com.op.quality.domain.QcCheckTaskProduce">
select factory_code carCode,
factory_name carName
from sys_factory
where f_type = 'c' and status = '1' and del_flag = '0'
</select>
<select id="getTodayMaxNum" resultType="java.lang.Integer">
select count(0)+1
from qc_check_task_produce
where CONVERT(varchar(10),create_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
</select>
<select id="getCheckTypes" resultType="com.op.quality.domain.QcCheckType">
select
id,check_name checkName
from qc_check_type
where type_code = #{typeCode} and del_flag='0'
</select>
<insert id="insertQcCheckTaskProduce" parameterType="QcCheckTaskProduce">
insert into qc_check_task_produce
<trim prefix="(" suffix=")" suffixOverrides=",">

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.op.quality.mapper.QcCheckTaskWarehousingMapper">
<resultMap type="QcCheckTaskWarehousing" id="QcCheckTaskWarehousingResult">
<result property="recordId" column="record_id" />
<result property="checkNo" column="check_no" />
@ -41,12 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectQcCheckTaskWarehousingList" parameterType="QcCheckTaskWarehousing" resultMap="QcCheckTaskWarehousingResult">
<include refid="selectQcCheckTaskWarehousingVo"/>
<where>
<if test="checkNo != null and checkNo != ''"> and check_no = #{checkNo}</if>
<if test="batchNo != null and batchNo != ''"> and batch_no = #{batchNo}</if>
<if test="orderNo != null and orderNo != ''"> and order_no = #{orderNo}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<where>
<if test="checkNo != null and checkNo != ''"> and check_no like concat('%', #{checkNo}, '%')</if>
<if test="batchNo != null and batchNo != ''"> and batch_no like concat('%', #{batchNo}, '%')</if>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>
<if test="quality != null "> and quality = #{quality}</if>
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
<if test="supplierCode != null and supplierCode != ''"> and supplier_code = #{supplierCode}</if>
@ -64,14 +64,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
</where>
</select>
<select id="selectQcCheckTaskWarehousingByRecordId" parameterType="String" resultMap="QcCheckTaskWarehousingResult">
<include refid="selectQcCheckTaskWarehousingVo"/>
where record_id = #{recordId}
</select>
<select id="getTodayMaxNum" resultType="java.lang.Integer">
select count(0)+1
from qc_check_task_warehousing
where CONVERT(varchar(10),create_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
</select>
<select id="getQcListLoc" resultType="com.op.quality.domain.QcCheckTaskWarehousing">
select warehouse_code supplierCode,
warehouse_name supplierName
from base_warehouse
where del_flag = '0' and active_flag = '1'
</select>
<insert id="insertQcCheckTaskWarehousing" parameterType="QcCheckTaskWarehousing">
insert into qc_check_task_warehousing
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -175,9 +187,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteQcCheckTaskWarehousingByRecordIds" parameterType="String">
delete from qc_check_task_warehousing where record_id in
delete from qc_check_task_warehousing where record_id in
<foreach item="recordId" collection="array" open="(" separator="," close=")">
#{recordId}
</foreach>
</delete>
</mapper>
</mapper>

@ -56,16 +56,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
AND ctp.del_flag = '0'
<if test="projectId != null and projectId != ''"> and ctp.project_id = #{projectId}</if>
<if test="typeId != null and typeId != ''"> and ctp.type_id = #{typeId}</if>
<if test="standardValue != null "> and ctp.standard_value = #{standardValue}</if>
<if test="standardValue != null and standardValue != ''"> and ctp.standard_value like concat('%', #{standardValue}, '%')</if>
<if test="upperDiff != null "> and ctp.upper_diff = #{upperDiff}</if>
<if test="downDiff != null "> and ctp.down_diff = #{downDiff}</if>
<if test="sample != null "> and ctp.sample = #{sample}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="sampleNum != null and sampleNum != ''"> and sample_num = #{sampleNum}</if>
<if test="status != null and status != ''"> and ctp.status = #{status}</if>
<if test="groupId != null and groupId != ''"> and ctp.group_id = #{groupId}</if>
<if test="materialCode != null and materialCode != ''"> and ctp.material_code = #{materialCode}</if>
<if test="sampleNum != null and sampleNum != ''"> and ctp.sample_num = #{sampleNum}</if>
<if test="ruleName != null and ruleName != ''"> and cp.rule_name like concat('%', #{ruleName}, '%')</if>
</where>
</select>
@ -95,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
WHERE ctp.del_flag ='0' AND ctp.id = #{id}
</select>
<select id="getTPByTypeMaterial" resultType="com.op.quality.domain.QcCheckTaskDetail">
select qctp.project_id projectId,
select qctp.id typeProjectId,
qctp.project_id projectId,
qctp.project_no projectNo,
qctp.standard_value standardValue,
qctp.upper_diff upperDiff,
@ -106,16 +106,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qcp.property_code propertyCode,
qcp.check_tool checkTool,
qcp.unit_code unitCode,
qcp.check_mode checkMode,
qcp.check_standard checkStandard
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
from qc_check_type_project qctp
left join qc_check_project qcp on qcp.id = qctp.project_id
where qctp.del_flag = '0' and qctp.status = '0'
and qctp.material_code = #{materialCode}
and qctp.type_id = #{typeId}
order by qctp.sort
</select>
<select id="getTPByTypeGroup" resultType="com.op.quality.domain.QcCheckTaskDetail">
select qctp.project_id projectId,
select qctp.id typeProjectId,
qctp.project_id projectId,
qctp.project_no projectNo,
qctp.standard_value standardValue,
qctp.upper_diff upperDiff,
@ -126,12 +128,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
qcp.property_code propertyCode,
qcp.check_tool checkTool,
qcp.unit_code unitCode,
qcp.check_mode checkMode,
qcp.check_standard checkStandard
qcp.check_mode checkMode
<!--,qcp.check_standard checkStandard-->
from qc_check_type_project qctp
left join qc_check_project qcp on qcp.id = qctp.project_id
where qctp.del_flag = '0' and qctp.status = '0'
and qctp.group_id = #{groupId}
and qctp.type_id = #{typeId}
order by qctp.sort
</select>
@ -155,7 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag,</if>
<if test="groupId != null">group_id,</if>
<if test="materialCode != null">material_code,</if>
<if test="sampleNum != null">sample_num</if>
<if test="sampleNum != null">sample_num,</if>
<if test="projectNo != null">project_no</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -176,6 +179,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">#{delFlag},</if>
<if test="groupId != null">#{groupId},</if>
<if test="materialCode != null">#{materialCode},</if>
<if test="sampleNum != null">#{sampleNum},</if>
<if test="projectNo != null">#{projectNo}</if>
</trim>
</insert>
@ -199,7 +203,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="groupId != null">group_id = #{groupId},</if>
<if test="materialCode != null">material_code = #{materialCode},</if>
<if test="sampleNum != null">sample_num = #{sampleNum}</if>
<if test="sampleNum != null">sample_num = #{sampleNum},</if>
<if test="projectNo != null">project_no = #{projectNo}</if>
</trim>
where id = #{id}

@ -28,23 +28,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_by, create_time, update_by, update_time, factory_code, del_flag from qc_user_material
</sql>
<select id="selectUserList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
<select id="selectUserList" parameterType="QcUserMaterial" resultType="com.op.quality.domain.QcUserMaterial">
SELECT
t.user_id,
t.user_name as user_code,
t.nick_name as user_name,
t.phonenumber,
t.email,
STRING_AGG(bp.product_desc_zh, ',') materialNames,
t.status,
t.create_time
FROM
sys_user t
LEFT JOIN lanju_op_xiaolan_ds.dbo.qc_user_material um ON um.user_code = t.user_name
LEFT JOIN base_product bp ON bp.product_code = um.material_code
GROUP BY t.user_id,t.user_name,t.nick_name,t.phonenumber,t.email,t.status,t.create_time
user_id as userId,
user_name as userCode,
nick_name as userName,
phonenumber,
email,
status,
create_time
FROM sys_user
WHERE del_flag = '0'
<if test="userName != null and userName != ''"> and nick_name like concat('%', #{userName}, '%')</if>
<if test="phonenumber != null and phonenumber != ''"> and phonenumber like concat('%', #{phonenumber}, '%')</if>
</select>
<select id="selectQcUserMaterialList" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">
@ -54,12 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</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>
</where>
</where>-->
</select>
<select id="selectUserByUserCode" parameterType="QcUserMaterial" resultMap="QcUserMaterialResult">

@ -287,6 +287,7 @@ public class SapWorkCenterServiceImpl implements SapWorkCenterService {
String parentId = sapBomMapper.getParentId(adds.get(0).getWeeks());
adds.stream().forEach(e->{
e.setParentId(parentId);
e.setfType("c");
});
int n = sapBomMapper.addFactoryBatchs(adds);
System.out.println("工作中心新增成功条数:"+ n);

@ -243,13 +243,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(parent_id,factory_name,factory_code,
create_by,
create_time,
update_time)
update_time,
f_type
)
VALUES
<foreach collection="list" index="index" item="item" separator=",">
(#{item.parentId},#{item.ktext},#{item.arbpl},
'job',
#{item.aedat_grnd},
#{item.aedat_grnd})
#{item.aedat_grnd},
#{item.fType}
)
</foreach>
</insert>
<delete id="deleteBaseBomByFactoryCode" parameterType="String">

@ -45,6 +45,16 @@ public class BaseApkFile extends BaseEntity {
@Excel(name = "备用4")
private String attr4;
private String fileList;
public String getFileList() {
return fileList;
}
public void setFileList(String fileList) {
this.fileList = fileList;
}
public void setId(String id) {
this.id = id;
}

@ -1,8 +1,14 @@
package com.op.system.service.impl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.op.common.core.domain.BaseFileData;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.StringUtils;
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.system.mapper.BaseApkFileMapper;
@ -52,6 +58,14 @@ public class BaseApkFileServiceImpl implements IBaseApkFileService {
public int insertBaseApkFile(BaseApkFile baseApkFile) {
baseApkFile.setId(IdUtils.fastSimpleUUID());
baseApkFile.setCreateTime(DateUtils.getNowDate());
//上传附件
if (StringUtils.isNotEmpty(baseApkFile.getFileList())) {
String id = baseApkFile.getFileList().split(",")[0];
baseApkFile.setFileName(id.split("&fileName=")[1]);
baseApkFile.setFileAddress(id);
}
return baseApkFileMapper.insertBaseApkFile(baseApkFile);
}
@ -64,6 +78,12 @@ public class BaseApkFileServiceImpl implements IBaseApkFileService {
@Override
public int updateBaseApkFile(BaseApkFile baseApkFile) {
baseApkFile.setUpdateTime(DateUtils.getNowDate());
//上传附件
if (StringUtils.isNotEmpty(baseApkFile.getFileList())) {
String id = baseApkFile.getFileList().split(",")[0];
baseApkFile.setFileName(id.split("&fileName=")[1]);
baseApkFile.setFileAddress(id);
}
return baseApkFileMapper.updateBaseApkFile(baseApkFile);
}

@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select top 1 id, file_name, file_address, version, attr1, attr2, attr3, attr4,
create_by, create_time, update_by, update_time, remark
from base_apk_file
order by create_by create_by desc
order by create_by desc
</select>
<insert id="insertBaseApkFile" parameterType="BaseApkFile" useGeneratedKeys="true" keyProperty="id">

Loading…
Cancel
Save