Merge remote-tracking branch 'origin/master'
commit
c41b1a0b02
@ -0,0 +1,46 @@
|
||||
package com.op.mes.domain;
|
||||
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生产报工物料消耗对象 mes_report_work_consume
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2023-08-24
|
||||
*/
|
||||
public class MesReportWorkConsumeTabs extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private String libId;
|
||||
private String title;
|
||||
private List<MesReportWorkConsume> libList;
|
||||
|
||||
public String getLibId() {
|
||||
return libId;
|
||||
}
|
||||
|
||||
public void setLibId(String libId) {
|
||||
this.libId = libId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public List<MesReportWorkConsume> getLibList() {
|
||||
return libList;
|
||||
}
|
||||
|
||||
public void setLibList(List<MesReportWorkConsume> libList) {
|
||||
this.libList = libList;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,109 @@
|
||||
package com.op.quality.controller;
|
||||
|
||||
import com.op.common.core.utils.DateUtils;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.quality.domain.QcCheckTaskMarket;
|
||||
import com.op.quality.service.IQcCheckTaskMarketService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 市场不良检验任务Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qcMarket")
|
||||
public class QcCheckTaskMarketController extends BaseController {
|
||||
@Autowired
|
||||
private IQcCheckTaskMarketService qcCheckTaskMarketService;
|
||||
|
||||
/**
|
||||
* 查询市场不良检验任务列表
|
||||
*/
|
||||
@RequiresPermissions("quality:qcMarket:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
|
||||
//默认时间范围T 00:00:00~T+1 00:00:00
|
||||
if (StringUtils.isEmpty(qcCheckTaskMarket.getIncomeTimeStart())) {
|
||||
qcCheckTaskMarket.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";
|
||||
qcCheckTaskMarket.setIncomeTimeEnd(dateEndStr);//end
|
||||
}
|
||||
startPage();
|
||||
List<QcCheckTaskMarket> list = qcCheckTaskMarketService.selectQcCheckTaskMarketList(qcCheckTaskMarket);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出市场不良检验任务列表
|
||||
*/
|
||||
@RequiresPermissions("quality:qcMarket:export")
|
||||
@Log(title = "市场不良检验任务", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
List<QcCheckTaskMarket> list = qcCheckTaskMarketService.selectQcCheckTaskMarketList(qcCheckTaskMarket);
|
||||
ExcelUtil<QcCheckTaskMarket> util = new ExcelUtil<QcCheckTaskMarket>(QcCheckTaskMarket.class);
|
||||
util.exportExcel(response, list, "市场不良检验任务数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取市场不良检验任务详细信息
|
||||
*/
|
||||
@RequiresPermissions("quality:qcMarket:query")
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") String recordId) {
|
||||
return success(qcCheckTaskMarketService.selectQcCheckTaskMarketByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增市场不良检验任务
|
||||
*/
|
||||
@RequiresPermissions("quality:qcMarket:add")
|
||||
@Log(title = "市场不良检验任务", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
int r = qcCheckTaskMarketService.insertQcCheckTaskMarket(qcCheckTaskMarket);
|
||||
if (r > 0) {
|
||||
return toAjax(r);
|
||||
}
|
||||
return error("添加失败:请检查物料的关联检测项");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改市场不良检验任务
|
||||
*/
|
||||
@RequiresPermissions("quality:qcMarket:edit")
|
||||
@Log(title = "市场不良检验任务", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
return toAjax(qcCheckTaskMarketService.updateQcCheckTaskMarket(qcCheckTaskMarket));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除市场不良检验任务
|
||||
*/
|
||||
@RequiresPermissions("quality:qcMarket:remove")
|
||||
@Log(title = "市场不良检验任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public AjaxResult remove(@PathVariable String[] recordIds) {
|
||||
return toAjax(qcCheckTaskMarketService.deleteQcCheckTaskMarketByRecordIds(recordIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,126 @@
|
||||
package com.op.quality.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.quality.domain.QcGoal;
|
||||
//import com.op.quality.service.IQcGoalService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 质量目标Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qcGoal")
|
||||
public class QcGoalController extends BaseController {
|
||||
// @Autowired
|
||||
// private IQcGoalService qcGoalService;
|
||||
//
|
||||
// /**
|
||||
// * 查询质量目标列表
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoal:list")
|
||||
// @GetMapping("/list")
|
||||
// public TableDataInfo list(QcGoal qcGoal) {
|
||||
// startPage();
|
||||
// List<QcGoal> list = qcGoalService.selectQcGoalList(qcGoal);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询二级质量目标
|
||||
// */
|
||||
// @GetMapping("/getChildrenList/{parentId}")
|
||||
// public List<QcGoal> getChildrenList(@PathVariable("parentId") String parentId) {
|
||||
// QcGoal goal = new QcGoal();
|
||||
// goal.setParentGoal(parentId);
|
||||
// List<QcGoal> list = qcGoalService.selectChildrenByParent(goal);
|
||||
// return list;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 导出质量目标列表
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoal:export")
|
||||
// @Log(title = "质量目标", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, QcGoal qcGoal) {
|
||||
// List<QcGoal> list = qcGoalService.selectQcGoalList(qcGoal);
|
||||
// ExcelUtil<QcGoal> util = new ExcelUtil<QcGoal>(QcGoal. class);
|
||||
// util.exportExcel(response, list, "质量目标数据");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取质量目标详细信息
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoal:query")
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
// return success(qcGoalService.selectQcGoalById(id));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取质量目标下拉树列表
|
||||
// */
|
||||
// @GetMapping("/treeSelect")
|
||||
// public AjaxResult treeSelect(QcGoal qcGoal) {
|
||||
// List<QcGoal> qcGoals = qcGoalService.selectQcGoalList(qcGoal);
|
||||
// return success(qcGoalService.buildQcGoalTreeSelect(qcGoals));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增质量目标
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoal:add")
|
||||
// @Log(title = "质量目标", businessType = BusinessType.INSERT)
|
||||
// @PostMapping
|
||||
// public AjaxResult add(@RequestBody QcGoal qcGoal) {
|
||||
// return toAjax(qcGoalService.insertQcGoal(qcGoal));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 拆解质量目标
|
||||
// */
|
||||
// @GetMapping("/generate/{id}")
|
||||
// public TableDataInfo generate(@PathVariable("id") String id) {
|
||||
// List<QcGoal> qcGoalList = qcGoalService.generate(id);
|
||||
// return getDataTable(qcGoalList);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 修改质量目标
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoal:edit")
|
||||
// @Log(title = "质量目标", businessType = BusinessType.UPDATE)
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody QcGoal qcGoal) {
|
||||
// return toAjax(qcGoalService.updateQcGoal(qcGoal));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除质量目标
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoal:remove")
|
||||
// @Log(title = "质量目标", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable String[] ids) {
|
||||
// int rows = qcGoalService.deleteQcGoalByIds(ids);
|
||||
// if (rows > 0 ) {
|
||||
// return success("操作成功");
|
||||
// }else {
|
||||
// return error("操作失败,请检查要删除的项目是否含有子项目");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
@ -0,0 +1,118 @@
|
||||
package com.op.quality.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.op.quality.domain.QcGoal;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.op.common.log.annotation.Log;
|
||||
import com.op.common.log.enums.BusinessType;
|
||||
import com.op.common.security.annotation.RequiresPermissions;
|
||||
import com.op.quality.domain.QcGoalDistribute;
|
||||
//import com.op.quality.service.IQcGoalDistributeService;
|
||||
import com.op.common.core.web.controller.BaseController;
|
||||
import com.op.common.core.web.domain.AjaxResult;
|
||||
import com.op.common.core.utils.poi.ExcelUtil;
|
||||
import com.op.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 质量目标分配Controller
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-03-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qcGoalDistribute")
|
||||
public class QcGoalDistributeController extends BaseController {
|
||||
// @Autowired
|
||||
// private IQcGoalDistributeService qcGoalDistributeService;
|
||||
//
|
||||
///**
|
||||
// * 查询质量目标分配列表
|
||||
// */
|
||||
//@RequiresPermissions("quality:qcGoalDistribute:list")
|
||||
//@GetMapping("/list")
|
||||
// public TableDataInfo list(QcGoalDistribute qcGoalDistribute) {
|
||||
// startPage();
|
||||
// List<QcGoalDistribute> list = qcGoalDistributeService.selectQcGoalDistributeList(qcGoalDistribute);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 导出质量目标分配列表
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoalDistribute:export")
|
||||
// @Log(title = "质量目标分配", businessType = BusinessType.EXPORT)
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, QcGoalDistribute qcGoalDistribute) {
|
||||
// List<QcGoalDistribute> list = qcGoalDistributeService.selectQcGoalDistributeList(qcGoalDistribute);
|
||||
// ExcelUtil<QcGoalDistribute> util = new ExcelUtil<QcGoalDistribute>(QcGoalDistribute. class);
|
||||
// util.exportExcel(response, list, "质量目标分配数据");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取质量目标分配详细信息
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoalDistribute:query")
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
// return success(qcGoalDistributeService.selectQcGoalDistributeById(id));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增质量目标分配
|
||||
// */
|
||||
// @Log(title = "质量目标分配", businessType = BusinessType.INSERT)
|
||||
// @PostMapping
|
||||
// public AjaxResult add(@RequestBody QcGoalDistribute qcGoalDistribute) {
|
||||
// return toAjax(qcGoalDistributeService.insertQcGoalDistribute(qcGoalDistribute));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改质量目标分配
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoalDistribute:edit")
|
||||
// @Log(title = "质量目标分配", businessType = BusinessType.UPDATE)
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody QcGoalDistribute qcGoalDistribute) {
|
||||
// return toAjax(qcGoalDistributeService.updateQcGoalDistribute(qcGoalDistribute));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除质量目标分配
|
||||
// */
|
||||
// @RequiresPermissions("quality:qcGoalDistribute:remove")
|
||||
// @Log(title = "质量目标分配", businessType = BusinessType.DELETE)
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable String[] ids) {
|
||||
// return toAjax(qcGoalDistributeService.deleteQcGoalDistributeByIds(ids));
|
||||
// }
|
||||
// /**
|
||||
// * 获取未分配供应商数据
|
||||
// */
|
||||
// @GetMapping(value = "/getLeftList")
|
||||
// public TableDataInfo getLeftList(QcGoalDistribute qcGoalDistribute) {
|
||||
// startPage();
|
||||
// List<QcGoalDistribute> list = qcGoalDistributeService.getLeftList(qcGoalDistribute);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取已分配供应商数据
|
||||
// */
|
||||
// @GetMapping(value = "/getRightList")
|
||||
// public TableDataInfo getRightList(QcGoalDistribute qcGoalDistribute) {
|
||||
// startPage();
|
||||
// List<QcGoalDistribute> list = qcGoalDistributeService.getRightList(qcGoalDistribute);
|
||||
// return getDataTable(list);
|
||||
// }
|
||||
|
||||
}
|
||||
@ -0,0 +1,558 @@
|
||||
package com.op.quality.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 市场不良检验任务对象 qc_check_task_market
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
public class QcCheckTaskMarket extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String recordId;
|
||||
|
||||
/**
|
||||
* 检验任务编号
|
||||
*/
|
||||
@Excel(name = "检验任务编号")
|
||||
private String checkNo;
|
||||
|
||||
/**
|
||||
* 来料批次号
|
||||
*/
|
||||
@Excel(name = "来料批次号")
|
||||
private String incomeBatchNo;
|
||||
|
||||
/**
|
||||
* 订单号
|
||||
*/
|
||||
@Excel(name = "订单号")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 物料号
|
||||
*/
|
||||
@Excel(name = "物料号")
|
||||
private String materialCode;
|
||||
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@Excel(name = "物料名称")
|
||||
private String materialName;
|
||||
|
||||
/**
|
||||
* 收货数量
|
||||
*/
|
||||
@Excel(name = "收货数量")
|
||||
private BigDecimal quality;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Excel(name = "单位")
|
||||
private String unit;
|
||||
|
||||
/**
|
||||
* 供应商编码
|
||||
*/
|
||||
@Excel(name = "供应商编码")
|
||||
private String supplierCode;
|
||||
|
||||
/**
|
||||
* 供应商名称
|
||||
*/
|
||||
@Excel(name = "供应商名称")
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 来料时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "来料时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date incomeTime;
|
||||
|
||||
/**
|
||||
* 检测地点
|
||||
*/
|
||||
@Excel(name = "检测地点")
|
||||
private String checkLoc;
|
||||
|
||||
/**
|
||||
* 检测状态0待检测1检测中2检测完成
|
||||
*/
|
||||
@Excel(name = "检测状态0待检测1检测中2检测完成")
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
* 检测人工号
|
||||
*/
|
||||
@Excel(name = "检测人工号")
|
||||
private String checkManCode;
|
||||
|
||||
/**
|
||||
* 检测人姓名
|
||||
*/
|
||||
@Excel(name = "检测人姓名")
|
||||
private String checkManName;
|
||||
|
||||
/**
|
||||
* 检验时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date checkTime;
|
||||
|
||||
/**
|
||||
* 检验结果Y合格
|
||||
*/
|
||||
@Excel(name = "检验结果Y合格")
|
||||
private String checkResult;
|
||||
|
||||
/**
|
||||
* 是否启用1启用0停用
|
||||
*/
|
||||
@Excel(name = "是否启用1启用0停用")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 预留字段1
|
||||
*/
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/**
|
||||
* 预留字段2
|
||||
*/
|
||||
@Excel(name = "预留字段2")
|
||||
private String attr2;
|
||||
|
||||
/**
|
||||
* 预留字段3
|
||||
*/
|
||||
@Excel(name = "预留字段3")
|
||||
private String attr3;
|
||||
|
||||
/**
|
||||
* 预留字段4
|
||||
*/
|
||||
@Excel(name = "预留字段4")
|
||||
private String attr4;
|
||||
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@Excel(name = "工厂编码")
|
||||
private String factoryCode;
|
||||
|
||||
/**
|
||||
* 删除标识1删除0正常
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 检验节点
|
||||
*/
|
||||
@Excel(name = "检验节点")
|
||||
private String checkType;
|
||||
|
||||
/**
|
||||
* 不合格数量
|
||||
*/
|
||||
@Excel(name = "不合格数量")
|
||||
private BigDecimal noOkQuality;
|
||||
|
||||
/**
|
||||
* 抽样数量
|
||||
*/
|
||||
@Excel(name = "抽样数量")
|
||||
private BigDecimal sampleQuality;
|
||||
|
||||
/**
|
||||
* A类不良
|
||||
*/
|
||||
@Excel(name = "A类不良")
|
||||
private BigDecimal aNoOkquality;
|
||||
|
||||
/**
|
||||
* B类不良
|
||||
*/
|
||||
@Excel(name = "B类不良")
|
||||
private BigDecimal bNoOkquality;
|
||||
|
||||
/**
|
||||
* C类不良
|
||||
*/
|
||||
@Excel(name = "C类不良")
|
||||
private BigDecimal cNoOkquality;
|
||||
|
||||
/**
|
||||
* 检验节点大类
|
||||
*/
|
||||
@Excel(name = "检验节点大类")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
@Excel(name = "订单类型")
|
||||
private String orderType;
|
||||
|
||||
private String incomeTimeStart;
|
||||
private String incomeTimeEnd;
|
||||
private String checkTimeStart;
|
||||
private String checkTimeEnd;
|
||||
|
||||
private List<QcCheckTaskDefect> defects;
|
||||
|
||||
public void setRecordId(String recordId) {
|
||||
this.recordId = recordId;
|
||||
}
|
||||
|
||||
public String getRecordId() {
|
||||
return recordId;
|
||||
}
|
||||
|
||||
public void setCheckNo(String checkNo) {
|
||||
this.checkNo = checkNo;
|
||||
}
|
||||
|
||||
public String getCheckNo() {
|
||||
return checkNo;
|
||||
}
|
||||
|
||||
public void setIncomeBatchNo(String incomeBatchNo) {
|
||||
this.incomeBatchNo = incomeBatchNo;
|
||||
}
|
||||
|
||||
public String getIncomeBatchNo() {
|
||||
return incomeBatchNo;
|
||||
}
|
||||
|
||||
public void setOrderNo(String orderNo) {
|
||||
this.orderNo = orderNo;
|
||||
}
|
||||
|
||||
public String getOrderNo() {
|
||||
return orderNo;
|
||||
}
|
||||
|
||||
public void setMaterialCode(String materialCode) {
|
||||
this.materialCode = materialCode;
|
||||
}
|
||||
|
||||
public String getMaterialCode() {
|
||||
return materialCode;
|
||||
}
|
||||
|
||||
public void setMaterialName(String materialName) {
|
||||
this.materialName = materialName;
|
||||
}
|
||||
|
||||
public String getMaterialName() {
|
||||
return materialName;
|
||||
}
|
||||
|
||||
public void setQuality(BigDecimal quality) {
|
||||
this.quality = quality;
|
||||
}
|
||||
|
||||
public BigDecimal getQuality() {
|
||||
return quality;
|
||||
}
|
||||
|
||||
public void setUnit(String unit) {
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit() {
|
||||
return unit;
|
||||
}
|
||||
|
||||
public void setSupplierCode(String supplierCode) {
|
||||
this.supplierCode = supplierCode;
|
||||
}
|
||||
|
||||
public String getSupplierCode() {
|
||||
return supplierCode;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setIncomeTime(Date incomeTime) {
|
||||
this.incomeTime = incomeTime;
|
||||
}
|
||||
|
||||
public Date getIncomeTime() {
|
||||
return incomeTime;
|
||||
}
|
||||
|
||||
public void setCheckLoc(String checkLoc) {
|
||||
this.checkLoc = checkLoc;
|
||||
}
|
||||
|
||||
public String getCheckLoc() {
|
||||
return checkLoc;
|
||||
}
|
||||
|
||||
public void setCheckStatus(String checkStatus) {
|
||||
this.checkStatus = checkStatus;
|
||||
}
|
||||
|
||||
public String getCheckStatus() {
|
||||
return checkStatus;
|
||||
}
|
||||
|
||||
public void setCheckManCode(String checkManCode) {
|
||||
this.checkManCode = checkManCode;
|
||||
}
|
||||
|
||||
public String getCheckManCode() {
|
||||
return checkManCode;
|
||||
}
|
||||
|
||||
public void setCheckManName(String checkManName) {
|
||||
this.checkManName = checkManName;
|
||||
}
|
||||
|
||||
public String getCheckManName() {
|
||||
return checkManName;
|
||||
}
|
||||
|
||||
public void setCheckTime(Date checkTime) {
|
||||
this.checkTime = checkTime;
|
||||
}
|
||||
|
||||
public Date getCheckTime() {
|
||||
return checkTime;
|
||||
}
|
||||
|
||||
public void setCheckResult(String checkResult) {
|
||||
this.checkResult = checkResult;
|
||||
}
|
||||
|
||||
public String getCheckResult() {
|
||||
return checkResult;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
|
||||
public void setAttr2(String attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
|
||||
public void setAttr3(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
|
||||
public void setAttr4(String attr4) {
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public String getAttr4() {
|
||||
return attr4;
|
||||
}
|
||||
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setCheckType(String checkType) {
|
||||
this.checkType = checkType;
|
||||
}
|
||||
|
||||
public String getCheckType() {
|
||||
return checkType;
|
||||
}
|
||||
|
||||
public BigDecimal getNoOkQuality() {
|
||||
return noOkQuality;
|
||||
}
|
||||
|
||||
public void setNoOkQuality(BigDecimal noOkQuality) {
|
||||
this.noOkQuality = noOkQuality;
|
||||
}
|
||||
|
||||
public void setSampleQuality(BigDecimal sampleQuality) {
|
||||
this.sampleQuality = sampleQuality;
|
||||
}
|
||||
|
||||
public BigDecimal getSampleQuality() {
|
||||
return sampleQuality;
|
||||
}
|
||||
|
||||
public void setaNoOkquality(BigDecimal aNoOkquality) {
|
||||
this.aNoOkquality = aNoOkquality;
|
||||
}
|
||||
|
||||
public BigDecimal getaNoOkquality() {
|
||||
return aNoOkquality;
|
||||
}
|
||||
|
||||
public void setbNoOkquality(BigDecimal bNoOkquality) {
|
||||
this.bNoOkquality = bNoOkquality;
|
||||
}
|
||||
|
||||
public BigDecimal getbNoOkquality() {
|
||||
return bNoOkquality;
|
||||
}
|
||||
|
||||
public void setcNoOkquality(BigDecimal cNoOkquality) {
|
||||
this.cNoOkquality = cNoOkquality;
|
||||
}
|
||||
|
||||
public BigDecimal getcNoOkquality() {
|
||||
return cNoOkquality;
|
||||
}
|
||||
|
||||
public void setTypeCode(String typeCode) {
|
||||
this.typeCode = typeCode;
|
||||
}
|
||||
|
||||
public String getTypeCode() {
|
||||
return typeCode;
|
||||
}
|
||||
|
||||
public void setOrderType(String orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public String getOrderType() {
|
||||
return orderType;
|
||||
}
|
||||
|
||||
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 List<QcCheckTaskDefect> getDefects() {
|
||||
return defects;
|
||||
}
|
||||
|
||||
public void setDefects(List<QcCheckTaskDefect> defects) {
|
||||
this.defects = defects;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("recordId", getRecordId())
|
||||
.append("checkNo", getCheckNo())
|
||||
.append("incomeBatchNo", getIncomeBatchNo())
|
||||
.append("orderNo", getOrderNo())
|
||||
.append("materialCode", getMaterialCode())
|
||||
.append("materialName", getMaterialName())
|
||||
.append("quality", getQuality())
|
||||
.append("unit", getUnit())
|
||||
.append("supplierCode", getSupplierCode())
|
||||
.append("supplierName", getSupplierName())
|
||||
.append("incomeTime", getIncomeTime())
|
||||
.append("checkLoc", getCheckLoc())
|
||||
.append("checkStatus", getCheckStatus())
|
||||
.append("checkManCode", getCheckManCode())
|
||||
.append("checkManName", getCheckManName())
|
||||
.append("checkTime", getCheckTime())
|
||||
.append("checkResult", getCheckResult())
|
||||
.append("status", getStatus())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("checkType", getCheckType())
|
||||
.append("nookQuality", getNoOkQuality())
|
||||
.append("sampleQuality", getSampleQuality())
|
||||
.append("aNoOkquality", getaNoOkquality())
|
||||
.append("bNoOkquality", getbNoOkquality())
|
||||
.append("cNoOkquality", getcNoOkquality())
|
||||
.append("typeCode", getTypeCode())
|
||||
.append("orderType", getOrderType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,216 @@
|
||||
package com.op.quality.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.op.common.core.annotation.Excel;
|
||||
import com.op.common.core.web.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 质量目标分配对象 qc_goal_distribute
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-03-07
|
||||
*/
|
||||
public class QcGoalDistribute extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 所属质量目标id
|
||||
*/
|
||||
@Excel(name = "所属质量目标id")
|
||||
private String belongGoalId;
|
||||
|
||||
/**
|
||||
* 供应商(产品)编码
|
||||
*/
|
||||
@Excel(name = "供应商(产品)编码")
|
||||
private String supplierCode;
|
||||
|
||||
/**
|
||||
* 供应商(产品)名称
|
||||
*/
|
||||
@Excel(name = "供应商(产品)名称")
|
||||
private String supplierName;
|
||||
|
||||
/**
|
||||
* 预留字段1
|
||||
*/
|
||||
@Excel(name = "预留字段1")
|
||||
private String attr1;
|
||||
|
||||
/**
|
||||
* 预留字段2
|
||||
*/
|
||||
@Excel(name = "预留字段2")
|
||||
private String attr2;
|
||||
|
||||
/**
|
||||
* 预留字段3
|
||||
*/
|
||||
@Excel(name = "预留字段3")
|
||||
private String attr3;
|
||||
|
||||
/**
|
||||
* 预留字段4
|
||||
*/
|
||||
@Excel(name = "预留字段4")
|
||||
private String attr4;
|
||||
|
||||
/**
|
||||
* 工厂编码
|
||||
*/
|
||||
@Excel(name = "工厂编码")
|
||||
private String factoryCode;
|
||||
|
||||
/**
|
||||
* 删除标识1删除0正常
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
private String label;
|
||||
|
||||
private String key;
|
||||
|
||||
private String[] SupplierCodes;
|
||||
|
||||
private List<String> selectedValues;
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBelongGoalId(String belongGoalId) {
|
||||
this.belongGoalId = belongGoalId;
|
||||
}
|
||||
|
||||
public String getBelongGoalId() {
|
||||
return belongGoalId;
|
||||
}
|
||||
|
||||
public void setSupplierCode(String supplierCode) {
|
||||
this.supplierCode = supplierCode;
|
||||
}
|
||||
|
||||
public String getSupplierCode() {
|
||||
return supplierCode;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setAttr1(String attr1) {
|
||||
this.attr1 = attr1;
|
||||
}
|
||||
|
||||
public String getAttr1() {
|
||||
return attr1;
|
||||
}
|
||||
|
||||
public void setAttr2(String attr2) {
|
||||
this.attr2 = attr2;
|
||||
}
|
||||
|
||||
public String getAttr2() {
|
||||
return attr2;
|
||||
}
|
||||
|
||||
public void setAttr3(String attr3) {
|
||||
this.attr3 = attr3;
|
||||
}
|
||||
|
||||
public String getAttr3() {
|
||||
return attr3;
|
||||
}
|
||||
|
||||
public void setAttr4(String attr4) {
|
||||
this.attr4 = attr4;
|
||||
}
|
||||
|
||||
public String getAttr4() {
|
||||
return attr4;
|
||||
}
|
||||
|
||||
public void setFactoryCode(String factoryCode) {
|
||||
this.factoryCode = factoryCode;
|
||||
}
|
||||
|
||||
public String getFactoryCode() {
|
||||
return factoryCode;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public String[] getSupplierCodes() {
|
||||
return SupplierCodes;
|
||||
}
|
||||
|
||||
public void setSupplierCodes(String[] supplierCodes) {
|
||||
SupplierCodes = supplierCodes;
|
||||
}
|
||||
|
||||
public List<String> getSelectedValues() {
|
||||
return selectedValues;
|
||||
}
|
||||
|
||||
public void setSelectedValues(List<String> selectedValues) {
|
||||
this.selectedValues = selectedValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("belongGoalId", getBelongGoalId())
|
||||
.append("supplierCode", getSupplierCode())
|
||||
.append("supplierName", getSupplierName())
|
||||
.append("attr1", getAttr1())
|
||||
.append("attr2", getAttr2())
|
||||
.append("attr3", getAttr3())
|
||||
.append("attr4", getAttr4())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("factoryCode", getFactoryCode())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,67 @@
|
||||
package com.op.quality.mapper;
|
||||
|
||||
import com.op.quality.domain.QcCheckTaskMarket;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 市场不良检验任务Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
@Mapper
|
||||
public interface QcCheckTaskMarketMapper {
|
||||
/**
|
||||
* 查询市场不良检验任务
|
||||
*
|
||||
* @param recordId 市场不良检验任务主键
|
||||
* @return 市场不良检验任务
|
||||
*/
|
||||
public QcCheckTaskMarket selectQcCheckTaskMarketByRecordId(String recordId);
|
||||
|
||||
/**
|
||||
* 查询市场不良检验任务列表
|
||||
*
|
||||
* @param qcCheckTaskMarket 市场不良检验任务
|
||||
* @return 市场不良检验任务集合
|
||||
*/
|
||||
public List<QcCheckTaskMarket> selectQcCheckTaskMarketList(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
/**
|
||||
* 新增市场不良检验任务
|
||||
*
|
||||
* @param qcCheckTaskMarket 市场不良检验任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcCheckTaskMarket(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
/**
|
||||
* 修改市场不良检验任务
|
||||
*
|
||||
* @param qcCheckTaskMarket 市场不良检验任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcCheckTaskMarket(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
/**
|
||||
* 删除市场不良检验任务
|
||||
*
|
||||
* @param recordId 市场不良检验任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcCheckTaskMarketByRecordId(String recordId);
|
||||
|
||||
/**
|
||||
* 批量删除市场不良检验任务
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcCheckTaskMarketByRecordIds(String[] recordIds);
|
||||
|
||||
int getTodayMaxNum(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
package com.op.quality.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.quality.domain.QcGoalDistribute;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 质量目标分配Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-03-07
|
||||
*/
|
||||
@Mapper
|
||||
public interface QcGoalDistributeMapper {
|
||||
/**
|
||||
* 查询质量目标分配
|
||||
*
|
||||
* @param id 质量目标分配主键
|
||||
* @return 质量目标分配
|
||||
*/
|
||||
public QcGoalDistribute selectQcGoalDistributeById(String id);
|
||||
|
||||
/**
|
||||
* 查询质量目标分配列表
|
||||
*
|
||||
* @param qcGoalDistribute 质量目标分配
|
||||
* @return 质量目标分配集合
|
||||
*/
|
||||
public List<QcGoalDistribute> selectQcGoalDistributeList(QcGoalDistribute qcGoalDistribute);
|
||||
|
||||
/**
|
||||
* 新增质量目标分配
|
||||
*
|
||||
* @param qcGoalDistribute 质量目标分配
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcGoalDistribute(QcGoalDistribute qcGoalDistribute);
|
||||
|
||||
/**
|
||||
* 修改质量目标分配
|
||||
*
|
||||
* @param qcGoalDistribute 质量目标分配
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcGoalDistribute(QcGoalDistribute qcGoalDistribute);
|
||||
|
||||
/**
|
||||
* 删除质量目标分配
|
||||
*
|
||||
* @param id 质量目标分配主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcGoalDistributeById(String id);
|
||||
|
||||
public int deleteQcGoalDistributeByBelongId(String id);
|
||||
|
||||
/**
|
||||
* 批量删除质量目标分配
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcGoalDistributeByIds(String[] ids);
|
||||
|
||||
public List<QcGoalDistribute> getGoalDistributeUndo(QcGoalDistribute qcGoalDistribute);
|
||||
public List<QcGoalDistribute> getGoalDistributeDo(QcGoalDistribute qcGoalDistribute);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.op.quality.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.op.quality.domain.QcGoal;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 质量目标Mapper接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-03-04
|
||||
*/
|
||||
@Mapper
|
||||
public interface QcGoalMapper {
|
||||
/**
|
||||
* 查询质量目标
|
||||
*
|
||||
* @param id 质量目标主键
|
||||
* @return 质量目标
|
||||
*/
|
||||
public QcGoal selectQcGoalById(String id);
|
||||
|
||||
/**
|
||||
* 查询质量目标列表
|
||||
*
|
||||
* @param qcGoal 质量目标
|
||||
* @return 质量目标集合
|
||||
*/
|
||||
public List<QcGoal> selectQcGoalList(QcGoal qcGoal);
|
||||
|
||||
public List<QcGoal> selectChildrenByParent(QcGoal qcGoal);
|
||||
|
||||
/**
|
||||
* 新增质量目标
|
||||
*
|
||||
* @param qcGoal 质量目标
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcGoal(QcGoal qcGoal);
|
||||
|
||||
/**
|
||||
* 批量插入
|
||||
* @param qcGoalList
|
||||
* @return
|
||||
*/
|
||||
public int insertQcGoalList(@Param("qcGoalList") List<QcGoal> qcGoalList);
|
||||
|
||||
/**
|
||||
* 修改质量目标
|
||||
*
|
||||
* @param qcGoal 质量目标
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcGoal(QcGoal qcGoal);
|
||||
|
||||
/**
|
||||
* 删除质量目标
|
||||
*
|
||||
* @param id 质量目标主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcGoalById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除质量目标
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcGoalByIds(String[] ids);
|
||||
|
||||
public int getTodayMaxNum(QcGoal qcGoal);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.op.quality.service;
|
||||
|
||||
import com.op.quality.domain.QcCheckTaskMarket;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 市场不良检验任务Service接口
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
public interface IQcCheckTaskMarketService {
|
||||
/**
|
||||
* 查询市场不良检验任务
|
||||
*
|
||||
* @param recordId 市场不良检验任务主键
|
||||
* @return 市场不良检验任务
|
||||
*/
|
||||
public QcCheckTaskMarket selectQcCheckTaskMarketByRecordId(String recordId);
|
||||
|
||||
/**
|
||||
* 查询市场不良检验任务列表
|
||||
*
|
||||
* @param qcCheckTaskMarket 市场不良检验任务
|
||||
* @return 市场不良检验任务集合
|
||||
*/
|
||||
public List<QcCheckTaskMarket> selectQcCheckTaskMarketList(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
/**
|
||||
* 新增市场不良检验任务
|
||||
*
|
||||
* @param qcCheckTaskMarket 市场不良检验任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertQcCheckTaskMarket(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
/**
|
||||
* 修改市场不良检验任务
|
||||
*
|
||||
* @param qcCheckTaskMarket 市场不良检验任务
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateQcCheckTaskMarket(QcCheckTaskMarket qcCheckTaskMarket);
|
||||
|
||||
/**
|
||||
* 批量删除市场不良检验任务
|
||||
*
|
||||
* @param recordIds 需要删除的市场不良检验任务主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcCheckTaskMarketByRecordIds(String[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除市场不良检验任务信息
|
||||
*
|
||||
* @param recordId 市场不良检验任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteQcCheckTaskMarketByRecordId(String recordId);
|
||||
}
|
||||
@ -0,0 +1,300 @@
|
||||
package com.op.quality.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder;
|
||||
import com.op.common.core.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 com.op.quality.domain.*;
|
||||
import com.op.quality.mapper.*;
|
||||
import com.op.quality.service.IQcCheckTaskDefectService;
|
||||
import com.op.quality.service.IQcCheckTaskMarketService;
|
||||
import com.op.quality.service.IQcCheckTaskUserService;
|
||||
import com.op.system.api.domain.quality.QcUserMaterialDTO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 不良检验任务Service业务层处理
|
||||
*
|
||||
* @author Open Platform
|
||||
* @date 2024-01-12
|
||||
*/
|
||||
@Service
|
||||
public class QcCheckTaskMarketServiceImpl implements IQcCheckTaskMarketService {
|
||||
protected Logger logger = LoggerFactory.getLogger(getClass());
|
||||
@Autowired
|
||||
private QcCheckTaskMarketMapper qcCheckTaskMarketMapper;
|
||||
|
||||
@Autowired
|
||||
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
|
||||
|
||||
@Autowired
|
||||
private QcCheckTypeProjectMapper qcCheckTypeProjectMapper;
|
||||
@Autowired
|
||||
private QcMaterialGroupDetailMapper qcMaterialGroupDetailMapper;
|
||||
|
||||
@Autowired
|
||||
private IQcCheckTaskUserService qcCheckTaskUserService;
|
||||
|
||||
@Autowired
|
||||
private QcCheckTaskIncomeMapper qcCheckTaskIncomeMapper;
|
||||
|
||||
@Autowired
|
||||
private IQcCheckTaskDefectService qcCheckTaskDefectService;
|
||||
@Autowired
|
||||
private QcSampleRuleMapper qcSampleRuleMapper;
|
||||
/**
|
||||
* 查询不良检验任务
|
||||
*
|
||||
* @param recordId 不良检验任务主键
|
||||
* @return 不良检验任务
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public QcCheckTaskMarket selectQcCheckTaskMarketByRecordId(String recordId) {
|
||||
QcCheckTaskMarket qcCheckTaskMarket = qcCheckTaskMarketMapper.selectQcCheckTaskMarketByRecordId(recordId);
|
||||
//获取拼接好的检验人员信息
|
||||
QcCheckTaskUser qcCheckTaskUser = qcCheckTaskUserService.selectQcCheckTaskUserByBelongTo(recordId);
|
||||
if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) {
|
||||
qcCheckTaskMarket.setCheckManName(qcCheckTaskUser.getManNames());
|
||||
}
|
||||
if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) {
|
||||
qcCheckTaskMarket.setCheckManCode(qcCheckTaskUser.getManCodes());
|
||||
}
|
||||
//获取不良品检验信息
|
||||
List<QcCheckTaskDefect> qcCheckTaskDefectList = qcCheckTaskDefectService.selectDefectByBelongTo(recordId);
|
||||
if (!CollectionUtils.isEmpty(qcCheckTaskDefectList)) {
|
||||
qcCheckTaskMarket.setDefects(qcCheckTaskDefectList);
|
||||
}
|
||||
return qcCheckTaskMarket;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询不良检验任务列表
|
||||
*
|
||||
* @param qcCheckTaskMarket 不良检验任务
|
||||
* @return 不良检验任务
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public List<QcCheckTaskMarket> selectQcCheckTaskMarketList(QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
qcCheckTaskMarket.setDelFlag("0");
|
||||
qcCheckTaskMarket.setTypeCode("market");
|
||||
return qcCheckTaskMarketMapper.selectQcCheckTaskMarketList(qcCheckTaskMarket);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增不良检验任务
|
||||
*
|
||||
* @param qcCheckTaskMarket 不良检验任务
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int insertQcCheckTaskMarket(QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
String factoryCode = "";
|
||||
if (StringUtils.isNotBlank(qcCheckTaskMarket.getFactoryCode())) {
|
||||
DynamicDataSourceContextHolder.push("ds_" + qcCheckTaskMarket.getFactoryCode());
|
||||
factoryCode = qcCheckTaskMarket.getFactoryCode();
|
||||
} else {
|
||||
//获取当前所选工厂
|
||||
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
String key = "#header.poolName";
|
||||
factoryCode = request.getHeader(key.substring(8)).replace("ds_", "");
|
||||
}
|
||||
|
||||
qcCheckTaskMarket.setCreateTime(DateUtils.getNowDate());
|
||||
|
||||
String bpDD = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
|
||||
int liushuiNum = qcCheckTaskMarketMapper.getTodayMaxNum(qcCheckTaskMarket);
|
||||
String liushuiStr = String.format("%04d", liushuiNum);
|
||||
|
||||
String createBy = SecurityUtils.getUsername();
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
|
||||
qcCheckTaskMarket.setCheckNo(bpDD + liushuiStr);
|
||||
|
||||
/**取检测项**/
|
||||
QcCheckTypeProject qctp = new QcCheckTypeProject();
|
||||
qctp.setTypeId(qcCheckTaskMarket.getCheckType());//生产过程检验
|
||||
qctp.setMaterialCode(qcCheckTaskMarket.getMaterialCode());//特性
|
||||
/**qc_check_type_project**/
|
||||
List<QcCheckTaskDetail> items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp);
|
||||
if (CollectionUtils.isEmpty(items)) {
|
||||
/**qc_material_group_detail**/
|
||||
QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckTaskMarket.getMaterialCode());
|
||||
if (group == null) {
|
||||
return 0;//没有找到检测项目
|
||||
}
|
||||
qctp.setGroupId(group.getGroupId());//共性
|
||||
items = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
|
||||
}
|
||||
|
||||
/**qc_check_task_detail**/
|
||||
if (CollectionUtils.isEmpty(items)) {
|
||||
return 0;//没有找到检测项目
|
||||
}
|
||||
|
||||
/**qc_check_task**/
|
||||
String beLongId = IdUtils.fastSimpleUUID();
|
||||
qcCheckTaskMarket.setRecordId(beLongId);
|
||||
qcCheckTaskMarket.setFactoryCode(factoryCode);
|
||||
qcCheckTaskMarket.setCreateTime(nowDate);
|
||||
qcCheckTaskMarket.setTypeCode("market");//大检验节点
|
||||
/**qc_task_user start**/
|
||||
if (StringUtils.isNotBlank(qcCheckTaskMarket.getCheckManName())) {
|
||||
String checkManName = qcCheckTaskMarket.getCheckManName();
|
||||
String checkManCode = qcCheckTaskMarket.getCheckManCode();
|
||||
qcCheckTaskMarket.setCheckManName("");
|
||||
qcCheckTaskMarket.setCheckManCode("");
|
||||
String[] splitNames = checkManName.split(",");
|
||||
String[] splitCodes = checkManCode.split(",");
|
||||
List<QcCheckTaskUser> qcCheckTaskUserList = new ArrayList<>();
|
||||
for (int i = 0; i < splitNames.length; i++) {
|
||||
QcCheckTaskUser qcCheckTaskUser = new QcCheckTaskUser();
|
||||
qcCheckTaskUser.setCheckManName(splitNames[i]);
|
||||
qcCheckTaskUser.setCheckManCode(splitCodes[i]);
|
||||
qcCheckTaskUser.setCheckNo(qcCheckTaskMarket.getCheckNo());
|
||||
qcCheckTaskUser.setBelongTo(beLongId);
|
||||
qcCheckTaskUserList.add(qcCheckTaskUser);
|
||||
}
|
||||
//检验人插入
|
||||
qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList);
|
||||
} else {//上位机
|
||||
qcCheckTaskMarket.setCheckManName("");
|
||||
qcCheckTaskMarket.setCheckManCode("");
|
||||
/**qc_user_material取默认检查人**/
|
||||
List<QcUserMaterialDTO> users = qcCheckTaskIncomeMapper.getUserByMaterial(qcCheckTaskMarket.getMaterialCode());
|
||||
if (!CollectionUtils.isEmpty(users)) {
|
||||
for (QcUserMaterialDTO user : users) {
|
||||
user.setId(IdUtils.fastSimpleUUID());
|
||||
user.setBelongTo(beLongId);
|
||||
user.setCheckNo(qcCheckTaskMarket.getCheckNo());
|
||||
user.setCreateBy(createBy);
|
||||
user.setFactoryCode(factoryCode);
|
||||
user.setCreateTime(nowDate);
|
||||
}
|
||||
int m = qcCheckTaskIncomeMapper.addCheckUsers(users);
|
||||
logger.info("检查人新增" + m + "成功");
|
||||
}
|
||||
}
|
||||
/** 不良品数据插入 */
|
||||
if(qcCheckTaskMarket.getNoOkQuality()==null){
|
||||
BigDecimal noOkQuality = new BigDecimal(0);
|
||||
List<QcCheckTaskDefect> defectList = qcCheckTaskMarket.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());
|
||||
}
|
||||
}
|
||||
qcCheckTaskMarket.setNoOkQuality(noOkQuality);
|
||||
}
|
||||
|
||||
/**qc_sample_rule**/
|
||||
QcCheckTaskIncome sampQua = new QcCheckTaskIncome();
|
||||
sampQua.setCheckType(qcCheckTaskMarket.getCheckType());
|
||||
sampQua.setQuality(qcCheckTaskMarket.getQuality());
|
||||
String sampNum = qcSampleRuleMapper.getSampNum(sampQua);
|
||||
if(StringUtils.isNotBlank(sampNum)){
|
||||
qcCheckTaskMarket.setSampleQuality(new BigDecimal(sampNum));
|
||||
}
|
||||
|
||||
/**qc_check_task**/
|
||||
qcCheckTaskMarketMapper.insertQcCheckTaskMarket(qcCheckTaskMarket);
|
||||
|
||||
/**qc_check_task_detail**/
|
||||
for (QcCheckTaskDetail item : items) {
|
||||
item.setRecordId(IdUtils.fastSimpleUUID());
|
||||
item.setBelongTo(beLongId);
|
||||
item.setCreateTime(nowDate);
|
||||
item.setCreateBy(createBy);
|
||||
item.setFactoryCode(factoryCode);
|
||||
item.setStatus("N");
|
||||
}
|
||||
return qcCheckTaskDetailMapper.addBatch(items);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改不良检验任务
|
||||
*
|
||||
* @param qcCheckTaskMarket 不良检验任务
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int updateQcCheckTaskMarket(QcCheckTaskMarket qcCheckTaskMarket) {
|
||||
qcCheckTaskMarket.setUpdateTime(DateUtils.getNowDate());
|
||||
/** qc_task_user**/
|
||||
String checkManName = qcCheckTaskMarket.getCheckManName();
|
||||
String checkManCode = qcCheckTaskMarket.getCheckManCode();
|
||||
qcCheckTaskMarket.setCheckManName("");
|
||||
qcCheckTaskMarket.setCheckManCode("");
|
||||
String[] splitNames = checkManName.split(",");
|
||||
String[] splitCodes = checkManCode.split(",");
|
||||
List<QcCheckTaskUser> qcCheckTaskUserList = new ArrayList<>();
|
||||
for (int i = 0; i < splitNames.length; i++) {
|
||||
QcCheckTaskUser qcCheckTaskUser = new QcCheckTaskUser();
|
||||
qcCheckTaskUser.setCheckManName(splitNames[i]);
|
||||
qcCheckTaskUser.setCheckManCode(splitCodes[i]);
|
||||
qcCheckTaskUser.setCheckNo(qcCheckTaskMarket.getCheckNo());
|
||||
qcCheckTaskUser.setBelongTo(qcCheckTaskMarket.getRecordId());
|
||||
qcCheckTaskUserList.add(qcCheckTaskUser);
|
||||
}
|
||||
qcCheckTaskUserService.updateQcCheckTaskUser(qcCheckTaskUserList);
|
||||
/** 不良品数据修改 **/
|
||||
BigDecimal noOkQuality = new BigDecimal(0);
|
||||
List<QcCheckTaskDefect> defectList = qcCheckTaskMarket.getDefects();
|
||||
String belongTo = qcCheckTaskMarket.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());
|
||||
}
|
||||
}
|
||||
qcCheckTaskMarket.setNoOkQuality(noOkQuality);
|
||||
|
||||
return qcCheckTaskMarketMapper.updateQcCheckTaskMarket(qcCheckTaskMarket);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除不良检验任务
|
||||
*
|
||||
* @param recordIds 需要删除的不良检验任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteQcCheckTaskMarketByRecordIds(String[] recordIds) {
|
||||
return qcCheckTaskMarketMapper.deleteQcCheckTaskMarketByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除不良检验任务信息
|
||||
*
|
||||
* @param recordId 不良检验任务主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@DS("#header.poolName")
|
||||
public int deleteQcCheckTaskMarketByRecordId(String recordId) {
|
||||
return qcCheckTaskMarketMapper.deleteQcCheckTaskMarketByRecordId(recordId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,153 @@
|
||||
//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.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.quality.mapper.QcGoalDistributeMapper;
|
||||
//import com.op.quality.domain.QcGoalDistribute;
|
||||
//import com.op.quality.service.IQcGoalDistributeService;
|
||||
//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-03-07
|
||||
// */
|
||||
//@Service
|
||||
//public class QcGoalDistributeServiceImpl implements IQcGoalDistributeService {
|
||||
// @Autowired
|
||||
// private QcGoalDistributeMapper qcGoalDistributeMapper;
|
||||
//
|
||||
// /**
|
||||
// * 查询质量目标分配
|
||||
// *
|
||||
// * @param id 质量目标分配主键
|
||||
// * @return 质量目标分配
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public QcGoalDistribute selectQcGoalDistributeById(String id) {
|
||||
// return qcGoalDistributeMapper.selectQcGoalDistributeById(id);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询质量目标分配列表
|
||||
// *
|
||||
// * @param qcGoalDistribute 质量目标分配
|
||||
// * @return 质量目标分配
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<QcGoalDistribute> selectQcGoalDistributeList(QcGoalDistribute qcGoalDistribute) {
|
||||
// return qcGoalDistributeMapper.selectQcGoalDistributeList(qcGoalDistribute);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增质量目标分配
|
||||
// *
|
||||
// * @param qcGoalDistribute 质量目标分配
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int insertQcGoalDistribute(QcGoalDistribute qcGoalDistribute) {
|
||||
//
|
||||
// if (StringUtils.isNotEmpty(qcGoalDistribute.getBelongGoalId())) {
|
||||
// qcGoalDistributeMapper.deleteQcGoalDistributeByBelongId(qcGoalDistribute.getBelongGoalId());
|
||||
// }
|
||||
// int count = 0;
|
||||
// if (qcGoalDistribute.getSelectedValues().size() > 0){
|
||||
// QcGoalDistribute dto = null;
|
||||
// Date now = DateUtils.getNowDate();
|
||||
// HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
// String key = "#header.poolName";
|
||||
// String factoryCode = request.getHeader(key.substring(8)).replace("ds_", "");
|
||||
// for (String supplierCode : qcGoalDistribute.getSelectedValues()) {
|
||||
// dto = new QcGoalDistribute();
|
||||
// dto.setId(IdUtils.fastSimpleUUID());
|
||||
// dto.setCreateTime(now);
|
||||
// dto.setCreateBy(SecurityUtils.getUsername());
|
||||
// dto.setBelongGoalId(qcGoalDistribute.getBelongGoalId());
|
||||
// dto.setSupplierCode(supplierCode);
|
||||
// dto.setFactoryCode(factoryCode);
|
||||
// count += qcGoalDistributeMapper.insertQcGoalDistribute(dto);
|
||||
// }
|
||||
// }else {
|
||||
// count = 1;
|
||||
// }
|
||||
// return count;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改质量目标分配
|
||||
// *
|
||||
// * @param qcGoalDistribute 质量目标分配
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int updateQcGoalDistribute(QcGoalDistribute qcGoalDistribute) {
|
||||
// qcGoalDistribute.setUpdateTime(DateUtils.getNowDate());
|
||||
// return qcGoalDistributeMapper.updateQcGoalDistribute(qcGoalDistribute);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除质量目标分配
|
||||
// *
|
||||
// * @param ids 需要删除的质量目标分配主键
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int deleteQcGoalDistributeByIds(String[] ids) {
|
||||
// return qcGoalDistributeMapper.deleteQcGoalDistributeByIds(ids);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除质量目标分配信息
|
||||
// *
|
||||
// * @param id 质量目标分配主键
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int deleteQcGoalDistributeById(String id) {
|
||||
// return qcGoalDistributeMapper.deleteQcGoalDistributeById(id);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<QcGoalDistribute> getLeftList(QcGoalDistribute qcGoalDistribute) {
|
||||
// List<QcGoalDistribute> dto = qcGoalDistributeMapper.getGoalDistributeUndo(qcGoalDistribute);
|
||||
// List<QcGoalDistribute> selected = qcGoalDistributeMapper.getGoalDistributeDo(qcGoalDistribute);
|
||||
// dto.addAll(selected);
|
||||
// dto.forEach(item -> {
|
||||
// item.setKey(item.getSupplierCode());
|
||||
// });
|
||||
// return dto;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<QcGoalDistribute> getRightList(QcGoalDistribute qcGoalDistribute) {
|
||||
// List<QcGoalDistribute> selected = qcGoalDistributeMapper.getGoalDistributeDo(qcGoalDistribute);
|
||||
// selected.forEach(item -> {
|
||||
// item.setKey(item.getSupplierCode());
|
||||
// });
|
||||
// return selected;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
//}
|
||||
@ -0,0 +1,245 @@
|
||||
//package com.op.quality.service.impl;
|
||||
//
|
||||
//import java.math.BigDecimal;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.Date;
|
||||
//import java.util.Iterator;
|
||||
//import java.util.List;
|
||||
//import java.util.stream.Collectors;
|
||||
//
|
||||
//import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
//import com.op.common.core.utils.DateUtils;
|
||||
//import com.op.common.security.utils.SecurityUtils;
|
||||
//import com.op.quality.domain.vo.TreeSelect;
|
||||
//import com.sun.xml.bind.v2.TODO;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Service;
|
||||
//import com.op.quality.mapper.QcGoalMapper;
|
||||
//import com.op.quality.domain.QcGoal;
|
||||
//import com.op.quality.service.IQcGoalService;
|
||||
//import org.springframework.util.ObjectUtils;
|
||||
//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-03-04
|
||||
// */
|
||||
//@Service
|
||||
//public class QcGoalServiceImpl implements IQcGoalService {
|
||||
// @Autowired
|
||||
// private QcGoalMapper qcGoalMapper;
|
||||
//
|
||||
// /**
|
||||
// * 查询质量目标
|
||||
// *
|
||||
// * @param id 质量目标主键
|
||||
// * @return 质量目标
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public QcGoal selectQcGoalById(String id) {
|
||||
// return qcGoalMapper.selectQcGoalById(id);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 查询质量目标列表
|
||||
// *
|
||||
// * @param qcGoal 质量目标
|
||||
// * @return 质量目标
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<QcGoal> selectQcGoalList(QcGoal qcGoal) {
|
||||
// List<QcGoal> qcGoals = qcGoalMapper.selectQcGoalList(qcGoal);
|
||||
// for (QcGoal item : qcGoals) {
|
||||
// item.setHasChildren(true);
|
||||
// }
|
||||
// return qcGoals;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<QcGoal> selectChildrenByParent(QcGoal goal) {
|
||||
// return qcGoalMapper.selectChildrenByParent(goal);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<TreeSelect> buildQcGoalTreeSelect(List<QcGoal> qcGoals) {
|
||||
// List<QcGoal> qcGoalTrees = buildGoalTree(qcGoals);
|
||||
// return qcGoalTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增质量目标
|
||||
// *
|
||||
// * @param qcGoal 质量目标
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int insertQcGoal(QcGoal qcGoal) {
|
||||
// qcGoal.setCreateTime(DateUtils.getNowDate());
|
||||
// qcGoal.setCreateBy(SecurityUtils.getUsername());
|
||||
//
|
||||
// qcGoal.setId(getSerialNumber(qcGoal));
|
||||
// qcGoal.setFactoryCode(getFactoryCode());
|
||||
// qcGoal.setParentGoal("0");
|
||||
//
|
||||
// return qcGoalMapper.insertQcGoal(qcGoal);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public List<QcGoal> generate(String id) {
|
||||
// QcGoal goal = qcGoalMapper.selectQcGoalById(id);
|
||||
// List<QcGoal> genResult = new ArrayList<>();
|
||||
//
|
||||
// // 提前分配大小,有助于减少不必要的计算和内存分配,从而提高代码的性能。
|
||||
// String goalYm = goal.getGoalYm();
|
||||
// BigDecimal nookQualityRate = goal.getNookQualityRate();
|
||||
// BigDecimal nookRate = goal.getNookRate();
|
||||
// String checkType = goal.getCheckType();
|
||||
// String typeCode = goal.getTypeCode();
|
||||
// String factoryCode = getFactoryCode();
|
||||
// String username = SecurityUtils.getUsername();
|
||||
// Date nowDate = DateUtils.getNowDate();
|
||||
// String parentGoal = goal.getId();
|
||||
//
|
||||
//
|
||||
// int liushuiNum = qcGoalMapper.getTodayMaxNum(goal);
|
||||
// String dateNumber = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
|
||||
//
|
||||
// int month = 12;
|
||||
// for (int i = 1; i <= month; i++) {
|
||||
// QcGoal monthGoal = new QcGoal();
|
||||
//
|
||||
// String liushuiStr = String.format("%04d", liushuiNum+i-1);
|
||||
// monthGoal.setId(dateNumber+liushuiStr);
|
||||
// String mon = String.format("%02d",i);
|
||||
// monthGoal.setGoalYm(goalYm+"-"+mon);
|
||||
// monthGoal.setGoalType("mm");
|
||||
// monthGoal.setNookQualityRate(nookQualityRate);
|
||||
// monthGoal.setNookRate(nookRate);
|
||||
// monthGoal.setCheckType(checkType);
|
||||
// monthGoal.setTypeCode(typeCode);
|
||||
// monthGoal.setScope(goal.getScope());
|
||||
// monthGoal.setCreateTime(nowDate);
|
||||
// monthGoal.setCreateBy(username);
|
||||
// monthGoal.setFactoryCode(factoryCode);
|
||||
// monthGoal.setParentGoal(parentGoal);
|
||||
// genResult.add(monthGoal);
|
||||
// }
|
||||
// // 批量插入
|
||||
// int flag = qcGoalMapper.insertQcGoalList(genResult);
|
||||
// if (flag > 0) {
|
||||
// return genResult;
|
||||
// }else {
|
||||
// return goal.getChildren();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改质量目标
|
||||
// *
|
||||
// * @param qcGoal 质量目标
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int updateQcGoal(QcGoal qcGoal) {
|
||||
// qcGoal.setUpdateTime(DateUtils.getNowDate());
|
||||
// qcGoal.setUpdateBy(SecurityUtils.getUsername());
|
||||
// return qcGoalMapper.updateQcGoal(qcGoal);
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 批量删除质量目标
|
||||
// *
|
||||
// * @param ids 需要删除的质量目标主键
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int deleteQcGoalByIds(String[] ids) {
|
||||
// boolean flag = false;
|
||||
// for (String id : ids) {
|
||||
// QcGoal goal = new QcGoal();
|
||||
// goal.setParentGoal(id);
|
||||
// List<QcGoal> hasChildren = qcGoalMapper.selectChildrenByParent(goal);
|
||||
// if (hasChildren.size() > 0) {
|
||||
// flag = true;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (flag) {
|
||||
// return 0;
|
||||
// }else {
|
||||
// return qcGoalMapper.deleteQcGoalByIds(ids);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除质量目标信息
|
||||
// *
|
||||
// * @param id 质量目标主键
|
||||
// * @return 结果
|
||||
// */
|
||||
// @Override
|
||||
// @DS("#header.poolName")
|
||||
// public int deleteQcGoalById(String id) {
|
||||
// return qcGoalMapper.deleteQcGoalById(id);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<QcGoal> buildGoalTree(List<QcGoal> qcGoals) {
|
||||
// List<QcGoal> returnList = new ArrayList<>();
|
||||
// List<String> tempList = qcGoals.stream().map(QcGoal::getId).collect(Collectors.toList());
|
||||
// for (Iterator<QcGoal> iterator = qcGoals.iterator(); iterator.hasNext(); ) {
|
||||
// QcGoal qcGoal = (QcGoal) iterator.next();
|
||||
// //如果是顶级节点,遍历父节点的所有子节点
|
||||
// if (!tempList.contains(qcGoal.getParentGoal())) {
|
||||
// List<QcGoal> childList = getChildList(qcGoals,qcGoal);
|
||||
// qcGoal.setChildren(childList);
|
||||
// returnList.add(qcGoal);
|
||||
// }
|
||||
// }
|
||||
// if (returnList.isEmpty()) {
|
||||
// returnList = qcGoals;
|
||||
// }
|
||||
// return returnList;
|
||||
// }
|
||||
//
|
||||
// private List<QcGoal> getChildList(List<QcGoal> list, QcGoal t) {
|
||||
// List<QcGoal> tlist = new ArrayList<>();
|
||||
// Iterator<QcGoal> it = list.iterator();
|
||||
// while (it.hasNext()) {
|
||||
// QcGoal goal = (QcGoal) it.next();
|
||||
// if (goal.getParentGoal().equals(t.getId())){
|
||||
// tlist.add(goal);
|
||||
// }
|
||||
// }
|
||||
// return tlist;
|
||||
// }
|
||||
//
|
||||
// @DS("#header.poolName")
|
||||
// private String getSerialNumber(QcGoal qcGoal) {
|
||||
// int liushuiNum = qcGoalMapper.getTodayMaxNum(qcGoal);
|
||||
// String liushuiStr = String.format("%04d", liushuiNum);
|
||||
// String dateNumber = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
|
||||
// return dateNumber + liushuiStr;
|
||||
// }
|
||||
// @DS("#header.poolName")
|
||||
// private String getFactoryCode() {
|
||||
// HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
// String key = "#header.poolName";
|
||||
// return request.getHeader(key.substring(8)).replace("ds_", "");
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@ -0,0 +1,240 @@
|
||||
<?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.QcCheckTaskMarketMapper">
|
||||
|
||||
<resultMap type="QcCheckTaskMarket" id="QcCheckTaskMarketResult">
|
||||
<result property="recordId" column="record_id"/>
|
||||
<result property="checkNo" column="check_no"/>
|
||||
<result property="incomeBatchNo" column="income_batch_no"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="materialCode" column="material_code"/>
|
||||
<result property="materialName" column="material_name"/>
|
||||
<result property="quality" column="quality"/>
|
||||
<result property="unit" column="unit"/>
|
||||
<result property="supplierCode" column="supplier_code"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<result property="incomeTime" column="income_time"/>
|
||||
<result property="checkLoc" column="check_loc"/>
|
||||
<result property="checkStatus" column="check_status"/>
|
||||
<result property="checkManCode" column="check_man_code"/>
|
||||
<result property="checkManName" column="check_man_name"/>
|
||||
<result property="checkTime" column="check_time"/>
|
||||
<result property="checkResult" column="check_result"/>
|
||||
<result property="status" column="status"/>
|
||||
<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="checkType" column="check_type"/>
|
||||
<result property="noOkQuality" column="noOk_quality"/>
|
||||
<result property="sampleQuality" column="sample_quality"/>
|
||||
<result property="aNoOkquality" column="aNoOkquality"/>
|
||||
<result property="bNoOkquality" column="bNoOkquality"/>
|
||||
<result property="cNoOkquality" column="cNoOkquality"/>
|
||||
<result property="typeCode" column="type_code"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcCheckTaskMarketVo">
|
||||
select record_id, check_no, income_batch_no, order_no, material_code, material_name, quality, unit, supplier_code,
|
||||
supplier_name, income_time, 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,
|
||||
check_type, noOk_quality, sample_quality, aNoOkquality, bNoOkquality, cNoOkquality, type_code, order_type
|
||||
from qc_check_task
|
||||
</sql>
|
||||
|
||||
<select id="selectQcCheckTaskMarketList" parameterType="QcCheckTaskMarket"
|
||||
resultMap="QcCheckTaskMarketResult">
|
||||
select qct.record_id, qct.check_no, qct.income_batch_no,
|
||||
qct.order_no, qct.material_code, qct.material_name, qct.quality, qct.unit,
|
||||
qct.supplier_code, qct.supplier_name, qct.income_time, qct.check_loc, qct.check_status,
|
||||
qct.check_man_code, qct.check_man_name,qct.check_time, qct.check_result, qct.status,
|
||||
qct.create_by,qct.create_time, qct.update_by, qct.update_time,
|
||||
qct.check_type,qct.sample_quality,qct.noOk_quality,
|
||||
q.type_code
|
||||
from qc_check_task qct
|
||||
left join qc_check_type q on q.id = qct.check_type
|
||||
<where>
|
||||
<if test="checkNo != null and checkNo != ''">and qct.check_no = #{checkNo}</if>
|
||||
<if test="incomeBatchNo != null and incomeBatchNo != ''">and qct.income_batch_no = #{incomeBatchNo}</if>
|
||||
<if test="orderNo != null and orderNo != ''">and qct.order_no = #{orderNo}</if>
|
||||
<if test="materialCode != null and materialCode != ''">and qct.material_code = #{materialCode}</if>
|
||||
<if test="materialName != null and materialName != ''">and qct.material_name like concat('%',
|
||||
#{materialName}, '%')
|
||||
</if>
|
||||
<if test="supplierCode != null and supplierCode != ''">and qct.supplier_code = #{supplierCode}</if>
|
||||
<if test="supplierName != null and supplierName != ''">and qct.supplier_name like concat('%',
|
||||
#{supplierName}, '%')
|
||||
</if>
|
||||
<if test="incomeTime != null ">and qct.income_time = #{incomeTime}</if>
|
||||
<if test="checkLoc != null and checkLoc != ''">and qct.check_loc = #{checkLoc}</if>
|
||||
<if test="checkStatus != null and checkStatus != ''">and qct.check_status = #{checkStatus}</if>
|
||||
<if test="checkManCode != null and checkManCode != ''">and qct.check_man_code = #{checkManCode}</if>
|
||||
<if test="checkManName != null and checkManName != ''">and qct.check_man_name like concat('%',
|
||||
#{checkManName}, '%')
|
||||
</if>
|
||||
<if test="checkResult != null and checkResult != ''">and qct.check_result = #{checkResult}</if>
|
||||
<if test="status != null and status != ''">and qct.status = #{status}</if>
|
||||
<if test="delFlag != null and delFlag != ''">and qct.del_flag = #{delFlag}</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">and qct.factory_code = #{factoryCode}</if>
|
||||
<if test="incomeTimeStart != null ">and CONVERT(varchar(30),qct.income_time, 120) >= #{incomeTimeStart}</if>
|
||||
<if test="incomeTimeEnd != null ">and #{incomeTimeEnd} > CONVERT(varchar(30),qct.income_time, 120)</if>
|
||||
<if test="checkTimeStart != null ">and CONVERT(varchar(30),qct.check_time, 120) >= #{checkTimeStart}</if>
|
||||
<if test="checkTimeEnd != null ">and #{checkTimeEnd} > CONVERT(varchar(30),qct.check_time, 120)</if>
|
||||
<if test="checkType != null ">and qct.check_type = #{checkType}</if>
|
||||
<if test="typeCode != null ">and q.type_code = #{typeCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectQcCheckTaskMarketByRecordId" parameterType="String" resultMap="QcCheckTaskMarketResult">
|
||||
<include refid="selectQcCheckTaskMarketVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcCheckTaskMarket" parameterType="QcCheckTaskMarket">
|
||||
insert into qc_check_task
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">record_id,</if>
|
||||
<if test="checkNo != null">check_no,</if>
|
||||
<if test="incomeBatchNo != null">income_batch_no,</if>
|
||||
<if test="orderNo != null">order_no,</if>
|
||||
<if test="materialCode != null">material_code,</if>
|
||||
<if test="materialName != null">material_name,</if>
|
||||
<if test="quality != null">quality,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="supplierCode != null">supplier_code,</if>
|
||||
<if test="supplierName != null">supplier_name,</if>
|
||||
<if test="incomeTime != null">income_time,</if>
|
||||
<if test="checkLoc != null">check_loc,</if>
|
||||
<if test="checkStatus != null">check_status,</if>
|
||||
<if test="checkManCode != null">check_man_code,</if>
|
||||
<if test="checkManName != null">check_man_name,</if>
|
||||
<if test="checkTime != null">check_time,</if>
|
||||
<if test="checkResult != null">check_result,</if>
|
||||
<if test="status != null">status,</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="checkType != null">check_type,</if>
|
||||
<if test="noOkQuality != null">noOk_quality,</if>
|
||||
<if test="sampleQuality != null">sample_quality,</if>
|
||||
<if test="aNoOkquality != null">aNoOkquality,</if>
|
||||
<if test="bNoOkquality != null">bNoOkquality,</if>
|
||||
<if test="cNoOkquality != null">cNoOkquality,</if>
|
||||
<if test="typeCode != null">type_code,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="recordId != null">#{recordId},</if>
|
||||
<if test="checkNo != null">#{checkNo},</if>
|
||||
<if test="incomeBatchNo != null">#{incomeBatchNo},</if>
|
||||
<if test="orderNo != null">#{orderNo},</if>
|
||||
<if test="materialCode != null">#{materialCode},</if>
|
||||
<if test="materialName != null">#{materialName},</if>
|
||||
<if test="quality != null">#{quality},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="supplierCode != null">#{supplierCode},</if>
|
||||
<if test="supplierName != null">#{supplierName},</if>
|
||||
<if test="incomeTime != null">#{incomeTime},</if>
|
||||
<if test="checkLoc != null">#{checkLoc},</if>
|
||||
<if test="checkStatus != null">#{checkStatus},</if>
|
||||
<if test="checkManCode != null">#{checkManCode},</if>
|
||||
<if test="checkManName != null">#{checkManName},</if>
|
||||
<if test="checkTime != null">#{checkTime},</if>
|
||||
<if test="checkResult != null">#{checkResult},</if>
|
||||
<if test="status != null">#{status},</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="checkType != null">#{checkType},</if>
|
||||
<if test="noOkQuality != null">#{noOkQuality},</if>
|
||||
<if test="sampleQuality != null">#{sampleQuality},</if>
|
||||
<if test="aNoOkquality != null">#{aNoOkquality},</if>
|
||||
<if test="bNoOkquality != null">#{bNoOkquality},</if>
|
||||
<if test="cNoOkquality != null">#{cNoOkquality},</if>
|
||||
<if test="typeCode != null">#{typeCode},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQcCheckTaskMarket" parameterType="QcCheckTaskMarket">
|
||||
update qc_check_task
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="checkNo != null">check_no = #{checkNo},</if>
|
||||
<if test="incomeBatchNo != null">income_batch_no = #{incomeBatchNo},</if>
|
||||
<if test="orderNo != null">order_no = #{orderNo},</if>
|
||||
<if test="materialCode != null">material_code = #{materialCode},</if>
|
||||
<if test="materialName != null">material_name = #{materialName},</if>
|
||||
<if test="quality != null">quality = #{quality},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="supplierCode != null">supplier_code = #{supplierCode},</if>
|
||||
<if test="supplierName != null">supplier_name = #{supplierName},</if>
|
||||
<if test="incomeTime != null">income_time = #{incomeTime},</if>
|
||||
<if test="checkLoc != null">check_loc = #{checkLoc},</if>
|
||||
<if test="checkStatus != null">check_status = #{checkStatus},</if>
|
||||
<if test="checkManCode != null">check_man_code = #{checkManCode},</if>
|
||||
<if test="checkManName != null">check_man_name = #{checkManName},</if>
|
||||
<if test="checkTime != null">check_time = #{checkTime},</if>
|
||||
<if test="checkResult != null">check_result = #{checkResult},</if>
|
||||
<if test="status != null">status = #{status},</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="checkType != null">check_type = #{checkType},</if>
|
||||
<if test="noOkQuality != null">noOk_quality = #{noOkQuality},</if>
|
||||
<if test="sampleQuality != null">sample_quality = #{sampleQuality},</if>
|
||||
<if test="aNoOkquality != null">aNoOkquality = #{aNoOkquality},</if>
|
||||
<if test="bNoOkquality != null">bNoOkquality = #{bNoOkquality},</if>
|
||||
<if test="cNoOkquality != null">cNoOkquality = #{cNoOkquality},</if>
|
||||
<if test="typeCode != null">type_code = #{typeCode},</if>
|
||||
<if test="orderType != null">order_type = #{orderType},</if>
|
||||
</trim>
|
||||
where record_id = #{recordId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQcCheckTaskMarketByRecordId" parameterType="String">
|
||||
delete from qc_check_task where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcCheckTaskMarketByRecordIds" parameterType="String">
|
||||
delete from qc_check_task where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getTodayMaxNum" resultType="java.lang.Integer">
|
||||
select count(0)+1
|
||||
from qc_check_task
|
||||
where CONVERT(varchar(10),create_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,218 @@
|
||||
<?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.QcGoalDistributeMapper">
|
||||
|
||||
<resultMap type="QcGoalDistribute" id="QcGoalDistributeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="belongGoalId" column="belong_goal_id"/>
|
||||
<result property="supplierCode" column="supplier_code"/>
|
||||
<result property="supplierName" column="supplier_name"/>
|
||||
<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"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcGoalDistributeVo">
|
||||
select id, belong_goal_id, supplier_code, supplier_name, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_goal_distribute
|
||||
</sql>
|
||||
|
||||
<select id="selectQcGoalDistributeList" parameterType="QcGoalDistribute" resultMap="QcGoalDistributeResult">
|
||||
<include refid="selectQcGoalDistributeVo"/>
|
||||
<where>
|
||||
<if test="belongGoalId != null and belongGoalId != ''">
|
||||
and belong_goal_id = #{belongGoalId}
|
||||
</if>
|
||||
<if test="supplierCode != null and supplierCode != ''">
|
||||
and supplier_code = #{supplierCode}
|
||||
</if>
|
||||
<if test="supplierName != null and supplierName != ''">
|
||||
and supplier_name like concat('%', #{supplierName}, '%')
|
||||
</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>
|
||||
</select>
|
||||
|
||||
<select id="selectQcGoalDistributeById" parameterType="String"
|
||||
resultMap="QcGoalDistributeResult">
|
||||
<include refid="selectQcGoalDistributeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcGoalDistribute" parameterType="QcGoalDistribute">
|
||||
insert into qc_goal_distribute
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
</if>
|
||||
<if test="belongGoalId != null">belong_goal_id,
|
||||
</if>
|
||||
<if test="supplierCode != null">supplier_code,
|
||||
</if>
|
||||
<if test="supplierName != null">supplier_name,
|
||||
</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>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},
|
||||
</if>
|
||||
<if test="belongGoalId != null">#{belongGoalId},
|
||||
</if>
|
||||
<if test="supplierCode != null">#{supplierCode},
|
||||
</if>
|
||||
<if test="supplierName != null">#{supplierName},
|
||||
</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>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateQcGoalDistribute" parameterType="QcGoalDistribute">
|
||||
update qc_goal_distribute
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="belongGoalId != null">belong_goal_id =
|
||||
#{belongGoalId},
|
||||
</if>
|
||||
<if test="supplierCode != null">supplier_code =
|
||||
#{supplierCode},
|
||||
</if>
|
||||
<if test="supplierName != null">supplier_name =
|
||||
#{supplierName},
|
||||
</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>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteQcGoalDistributeById" parameterType="String">
|
||||
delete from qc_goal_distribute where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcGoalDistributeByIds" parameterType="String">
|
||||
delete from qc_goal_distribute where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcGoalDistributeByBelongId" parameterType="String">
|
||||
delete from qc_goal_distribute where belong_goal_id = #{belongGoalId}
|
||||
</delete>
|
||||
|
||||
<select id="getGoalDistributeUndo" parameterType="QcGoalDistribute" resultMap="QcGoalDistributeResult">
|
||||
select bs.supplier_code,
|
||||
concat(bs.zh_desc,'(',bs.supplier_code,')') label,
|
||||
concat(bs.zh_desc,'(',bs.supplier_code,')') supplierName
|
||||
from base_supplier bs
|
||||
where bs.active_flag = '1' and bs.del_flag = '0'
|
||||
and bs.supplier_code not in (
|
||||
select gd.supplier_code
|
||||
from qc_goal_distribute gd
|
||||
where gd.belong_goal_id =#{belongGoalId}
|
||||
)
|
||||
<if test="supplierName != null and supplierName != ''">and bs.zh_desc like concat('%', #{supplierName},
|
||||
'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getGoalDistributeDo" parameterType="QcGoalDistribute" resultMap="QcGoalDistributeResult">
|
||||
select distinct
|
||||
gd.supplier_code,
|
||||
concat(bs.zh_desc,'(',bs.supplier_code,')') label
|
||||
from qc_goal_distribute gd
|
||||
left join base_supplier bs on gd.supplier_code = bs.supplier_code
|
||||
where gd.belong_goal_id =#{belongGoalId}
|
||||
<if test="supplierName != null and supplierName != ''">and bs.zh_desc like concat('%', #{supplierName},
|
||||
'%')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,261 @@
|
||||
<?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.QcGoalMapper">
|
||||
|
||||
<resultMap type="QcGoal" id="QcGoalResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="goalYm" column="goal_ym"/>
|
||||
<result property="goalType" column="goal_type"/>
|
||||
<result property="nookRate" column="noOk_rate"/>
|
||||
<result property="nookQualityRate" column="noOk_quality_rate"/>
|
||||
<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="checkType" column="check_type"/>
|
||||
<result property="typeCode" column="type_code"/>
|
||||
<result property="scope" column="scope"/>
|
||||
<result property="parentGoal" column="parent_goal"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectQcGoalVo">
|
||||
select id, goal_ym, goal_type, noOk_rate, noOk_quality_rate, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag, check_type, type_code, scope, parent_goal from qc_goal
|
||||
</sql>
|
||||
|
||||
<select id="selectQcGoalList" parameterType="QcGoal" resultMap="QcGoalResult">
|
||||
<include refid="selectQcGoalVo"/>
|
||||
<where>
|
||||
<if test="goalYm != null and goalYm != ''">
|
||||
and goal_ym = #{goalYm}
|
||||
</if>
|
||||
<if test="goalType != null and goalType != ''">
|
||||
and goal_type = #{goalType}
|
||||
</if>
|
||||
<if test="nookRate != null ">
|
||||
and noOk_rate = #{nookRate}
|
||||
</if>
|
||||
<if test="nookQualityRate != null ">
|
||||
and noOk_quality_rate = #{nookQualityRate}
|
||||
</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">
|
||||
and factory_code = #{factoryCode}
|
||||
</if>
|
||||
<if test="checkType != null and checkType != ''">
|
||||
and check_type = #{checkType}
|
||||
</if>
|
||||
<if test="typeCode != null and typeCode != ''">
|
||||
and type_code = #{typeCode}
|
||||
</if>
|
||||
<if test="scope != null and scope != ''">
|
||||
and scope = #{scope}
|
||||
</if>
|
||||
<if test="parentGoal != null and parentGoal != ''">
|
||||
and parent_goal = #{parentGoal}
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectChildrenByParent" parameterType="QcGoal" resultMap="QcGoalResult">
|
||||
<include refid="selectQcGoalVo"/>
|
||||
<where>
|
||||
<if test="goalYm != null and goalYm != ''">
|
||||
and goal_ym = #{goalYm}
|
||||
</if>
|
||||
<if test="goalType != null and goalType != ''">
|
||||
and goal_type = #{goalType}
|
||||
</if>
|
||||
<if test="nookRate != null ">
|
||||
and noOk_rate = #{nookRate}
|
||||
</if>
|
||||
<if test="nookQualityRate != null ">
|
||||
and noOk_quality_rate = #{nookQualityRate}
|
||||
</if>
|
||||
<if test="factoryCode != null and factoryCode != ''">
|
||||
and factory_code = #{factoryCode}
|
||||
</if>
|
||||
<if test="checkType != null and checkType != ''">
|
||||
and check_type = #{checkType}
|
||||
</if>
|
||||
<if test="typeCode != null and typeCode != ''">
|
||||
and type_code = #{typeCode}
|
||||
</if>
|
||||
<if test="scope != null and scope != ''">
|
||||
and scope = #{scope}
|
||||
</if>
|
||||
<if test="parentGoal != null and parentGoal != ''">
|
||||
and parent_goal = #{parentGoal}
|
||||
</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="selectQcGoalById" parameterType="String"
|
||||
resultMap="QcGoalResult">
|
||||
<include refid="selectQcGoalVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertQcGoal" parameterType="QcGoal">
|
||||
insert into qc_goal
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
</if>
|
||||
<if test="goalYm != null">goal_ym,
|
||||
</if>
|
||||
<if test="goalType != null">goal_type,
|
||||
</if>
|
||||
<if test="nookRate != null">noOk_rate,
|
||||
</if>
|
||||
<if test="nookQualityRate != null">noOk_quality_rate,
|
||||
</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="checkType != null">check_type,
|
||||
</if>
|
||||
<if test="typeCode != null">type_code,
|
||||
</if>
|
||||
<if test="scope != null">scope,
|
||||
</if>
|
||||
<if test="parentGoal != null">parent_goal,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},
|
||||
</if>
|
||||
<if test="goalYm != null">#{goalYm},
|
||||
</if>
|
||||
<if test="goalType != null">#{goalType},
|
||||
</if>
|
||||
<if test="nookRate != null">#{nookRate},
|
||||
</if>
|
||||
<if test="nookQualityRate != null">#{nookQualityRate},
|
||||
</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="checkType != null">#{checkType},
|
||||
</if>
|
||||
<if test="typeCode != null">#{typeCode},
|
||||
</if>
|
||||
<if test="scope != null">#{scope},
|
||||
</if>
|
||||
<if test="parentGoal != null">#{parentGoal},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertQcGoalList" parameterType="List">
|
||||
insert into qc_goal(id,goal_ym,goal_type,noOk_rate,noOk_quality_rate,create_by,create_time,
|
||||
update_by,update_time,factory_code,check_type,type_code,scope,parent_goal)values
|
||||
<foreach collection="qcGoalList" item="item" index="index" separator=",">
|
||||
(#{item.id},
|
||||
#{item.goalYm},
|
||||
#{item.goalType},
|
||||
#{item.nookRate},
|
||||
#{item.nookQualityRate},
|
||||
#{item.createBy},
|
||||
#{item.createTime},
|
||||
#{item.updateBy},
|
||||
#{item.updateTime},
|
||||
#{item.factoryCode},
|
||||
#{item.checkType},
|
||||
#{item.typeCode},
|
||||
#{item.scope},
|
||||
#{item.parentGoal})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateQcGoal" parameterType="QcGoal">
|
||||
update qc_goal
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="goalYm != null">goal_ym =
|
||||
#{goalYm},
|
||||
</if>
|
||||
<if test="goalType != null">goal_type =
|
||||
#{goalType},
|
||||
</if>
|
||||
<if test="nookRate != null">noOk_rate =
|
||||
#{nookRate},
|
||||
</if>
|
||||
<if test="nookQualityRate != null">noOk_quality_rate =
|
||||
#{nookQualityRate},
|
||||
</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="checkType != null">check_type =
|
||||
#{checkType},
|
||||
</if>
|
||||
<if test="typeCode != null">type_code =
|
||||
#{typeCode},
|
||||
</if>
|
||||
<if test="scope != null">scope =
|
||||
#{scope},
|
||||
</if>
|
||||
<if test="parentGoal != null">parent_goal =
|
||||
#{parentGoal},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="getTodayMaxNum" resultType="java.lang.Integer">
|
||||
select count(0)+1
|
||||
from qc_goal
|
||||
where CONVERT(varchar(10),create_time, 120) = CONVERT(varchar(10),GETDATE(), 120)
|
||||
</select>
|
||||
|
||||
<delete id="deleteQcGoalById" parameterType="String">
|
||||
delete from qc_goal where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteQcGoalByIds" parameterType="String">
|
||||
delete from qc_goal where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue