检验任务
parent
7f25989760
commit
a8e475e169
@ -0,0 +1,152 @@
|
||||
package com.foreverwin.mesnac.common.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTask;
|
||||
import com.foreverwin.mesnac.common.service.InspectionTaskService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-INSPECTION-TASK")
|
||||
public class InspectionTaskController {
|
||||
|
||||
@Autowired
|
||||
public InspectionTaskService inspectionTaskService;
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@PostMapping("/save")
|
||||
public R getInspectionTaskList(@RequestBody Map<String, Object> paramMap){
|
||||
inspectionTaskService.save(paramMap);
|
||||
return R.ok("保存成功");
|
||||
}
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/createTask")
|
||||
public R createTask(@RequestBody Map<String, Object> paramMap) {
|
||||
inspectionTaskService.createTask(paramMap);
|
||||
return R.ok("创建任务成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getInspectionTaskById(@PathVariable String id) {
|
||||
return R.ok( inspectionTaskService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getInspectionTaskList(InspectionTask inspectionTask){
|
||||
List<InspectionTask> result;
|
||||
QueryWrapper<InspectionTask> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTask);
|
||||
result = inspectionTaskService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<InspectionTask> frontPage, InspectionTask inspectionTask){
|
||||
IPage result;
|
||||
QueryWrapper<InspectionTask> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTask);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(InspectionTask::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getCategory, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getTaskNo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getDescription, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getStatus, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getInspectionItemBo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getWorkCenter, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getShopOrder, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getSfc, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getOperation, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getStepId, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getResrce, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getResult, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getComments, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getCreateUser, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getModifyUser, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTask::getSfcDispatchBo, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = inspectionTaskService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param inspectionTask 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody InspectionTask inspectionTask) {
|
||||
return R.ok(inspectionTaskService.save(inspectionTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param inspectionTask 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody InspectionTask inspectionTask) {
|
||||
return R.ok(inspectionTaskService.updateById(inspectionTask));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(inspectionTaskService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对象
|
||||
* @param ids 实体集合ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
|
||||
public R removeByIds(List<String> ids){
|
||||
return R.ok(inspectionTaskService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,128 @@
|
||||
package com.foreverwin.mesnac.common.controller;
|
||||
|
||||
import com.foreverwin.modular.core.util.R;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.foreverwin.mesnac.common.service.InspectionTaskDetailService;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTaskDetail;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/Z-INSPECTION-TASK-DETAIL")
|
||||
public class InspectionTaskDetailController {
|
||||
|
||||
@Autowired
|
||||
public InspectionTaskDetailService inspectionTaskDetailService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getInspectionTaskDetailById(@PathVariable String id) {
|
||||
return R.ok( inspectionTaskDetailService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getInspectionTaskDetailList(InspectionTaskDetail inspectionTaskDetail){
|
||||
List<InspectionTaskDetail> result;
|
||||
QueryWrapper<InspectionTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTaskDetail);
|
||||
result = inspectionTaskDetailService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<InspectionTaskDetail> frontPage, InspectionTaskDetail inspectionTaskDetail){
|
||||
IPage result;
|
||||
QueryWrapper<InspectionTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTaskDetail);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(InspectionTaskDetail::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getTaskBo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getInspectionItemDetailBo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getCheckValues, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getResult, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getCheckUser, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getRemark, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getPictureNo, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getSfc, frontPage.getGlobalQuery())
|
||||
.or().like(InspectionTaskDetail::getPictureQty, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = inspectionTaskDetailService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param inspectionTaskDetail 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody InspectionTaskDetail inspectionTaskDetail) {
|
||||
return R.ok(inspectionTaskDetailService.save(inspectionTaskDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param inspectionTaskDetail 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody InspectionTaskDetail inspectionTaskDetail) {
|
||||
return R.ok(inspectionTaskDetailService.updateById(inspectionTaskDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(inspectionTaskDetailService.removeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除对象
|
||||
* @param ids 实体集合ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
|
||||
public R removeByIds(List<String> ids){
|
||||
return R.ok(inspectionTaskDetailService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.common.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.common.model.InspectionTaskDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务-明细表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
@Repository
|
||||
public interface InspectionTaskDetailMapper extends BaseMapper<InspectionTaskDetail> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.common.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.common.model.InspectionTask;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
@Repository
|
||||
public interface InspectionTaskMapper extends BaseMapper<InspectionTask> {
|
||||
|
||||
}
|
@ -0,0 +1,358 @@
|
||||
package com.foreverwin.mesnac.common.model;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务表
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
|
||||
@TableName("Z_INSPECTION_TASK")
|
||||
|
||||
public class InspectionTask extends Model<InspectionTask> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableField("HANDLE")
|
||||
private String handle;
|
||||
/**
|
||||
* 站点
|
||||
*/
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
/**
|
||||
* 检验类型
|
||||
*/
|
||||
@TableField("CATEGORY")
|
||||
private String category;
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
@TableField("TASK_NO")
|
||||
private String taskNo;
|
||||
/**
|
||||
* 任务描述
|
||||
*/
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
/**
|
||||
* 任务状态
|
||||
*/
|
||||
@TableField("STATUS")
|
||||
private String status;
|
||||
/**
|
||||
* 检验项目表HANDLE
|
||||
*/
|
||||
@TableField("INSPECTION_ITEM_BO")
|
||||
private String inspectionItemBo;
|
||||
/**
|
||||
* 生产车间
|
||||
*/
|
||||
@TableField("WORK_CENTER")
|
||||
private String workCenter;
|
||||
/**
|
||||
* 工单编号
|
||||
*/
|
||||
@TableField("SHOP_ORDER")
|
||||
private String shopOrder;
|
||||
/**
|
||||
* 生产批次
|
||||
*/
|
||||
@TableField("SFC")
|
||||
private String sfc;
|
||||
/**
|
||||
* 工序编号
|
||||
*/
|
||||
@TableField("OPERATION")
|
||||
private String operation;
|
||||
/**
|
||||
* 工艺路线步骤标识
|
||||
*/
|
||||
@TableField("STEP_ID")
|
||||
private String stepId;
|
||||
/**
|
||||
* 资源编号
|
||||
*/
|
||||
@TableField("RESRCE")
|
||||
private String resrce;
|
||||
/**
|
||||
* 任务结果
|
||||
*/
|
||||
@TableField("RESULT")
|
||||
private String result;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("COMMENTS")
|
||||
private String comments;
|
||||
/**
|
||||
* 创建用户
|
||||
*/
|
||||
@TableField("CREATE_USER")
|
||||
private String createUser;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@TableField("MODIFY_USER")
|
||||
private String modifyUser;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
/**
|
||||
* 派工明细表BO
|
||||
*/
|
||||
@TableField("SFC_DISPATCH_BO")
|
||||
private String sfcDispatchBo;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getTaskNo() {
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setTaskNo(String taskNo) {
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getInspectionItemBo() {
|
||||
return inspectionItemBo;
|
||||
}
|
||||
|
||||
public void setInspectionItemBo(String inspectionItemBo) {
|
||||
this.inspectionItemBo = inspectionItemBo;
|
||||
}
|
||||
|
||||
public String getWorkCenter() {
|
||||
return workCenter;
|
||||
}
|
||||
|
||||
public void setWorkCenter(String workCenter) {
|
||||
this.workCenter = workCenter;
|
||||
}
|
||||
|
||||
public String getShopOrder() {
|
||||
return shopOrder;
|
||||
}
|
||||
|
||||
public void setShopOrder(String shopOrder) {
|
||||
this.shopOrder = shopOrder;
|
||||
}
|
||||
|
||||
public String getSfc() {
|
||||
return sfc;
|
||||
}
|
||||
|
||||
public void setSfc(String sfc) {
|
||||
this.sfc = sfc;
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
public String getStepId() {
|
||||
return stepId;
|
||||
}
|
||||
|
||||
public void setStepId(String stepId) {
|
||||
this.stepId = stepId;
|
||||
}
|
||||
|
||||
public String getResrce() {
|
||||
return resrce;
|
||||
}
|
||||
|
||||
public void setResrce(String resrce) {
|
||||
this.resrce = resrce;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
|
||||
public String getCreateUser() {
|
||||
return createUser;
|
||||
}
|
||||
|
||||
public void setCreateUser(String createUser) {
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreatedDateTime() {
|
||||
return createdDateTime;
|
||||
}
|
||||
|
||||
public void setCreatedDateTime(LocalDateTime createdDateTime) {
|
||||
this.createdDateTime = createdDateTime;
|
||||
}
|
||||
|
||||
public String getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(String modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public LocalDateTime getModifiedDateTime() {
|
||||
return modifiedDateTime;
|
||||
}
|
||||
|
||||
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
|
||||
this.modifiedDateTime = modifiedDateTime;
|
||||
}
|
||||
|
||||
public String getSfcDispatchBo() {
|
||||
return sfcDispatchBo;
|
||||
}
|
||||
|
||||
public void setSfcDispatchBo(String sfcDispatchBo) {
|
||||
this.sfcDispatchBo = sfcDispatchBo;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String CATEGORY = "CATEGORY";
|
||||
|
||||
public static final String TASK_NO = "TASK_NO";
|
||||
|
||||
public static final String DESCRIPTION = "DESCRIPTION";
|
||||
|
||||
public static final String STATUS = "STATUS";
|
||||
|
||||
public static final String INSPECTION_ITEM_BO = "INSPECTION_ITEM_BO";
|
||||
|
||||
public static final String WORK_CENTER = "WORK_CENTER";
|
||||
|
||||
public static final String SHOP_ORDER = "SHOP_ORDER";
|
||||
|
||||
public static final String SFC = "SFC";
|
||||
|
||||
public static final String OPERATION = "OPERATION";
|
||||
|
||||
public static final String STEP_ID = "STEP_ID";
|
||||
|
||||
public static final String RESRCE = "RESRCE";
|
||||
|
||||
public static final String RESULT = "RESULT";
|
||||
|
||||
public static final String COMMENTS = "COMMENTS";
|
||||
|
||||
public static final String CREATE_USER = "CREATE_USER";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFY_USER = "MODIFY_USER";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
public static final String SFC_DISPATCH_BO = "SFC_DISPATCH_BO";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InspectionTask{" +
|
||||
"handle = " + handle +
|
||||
", site = " + site +
|
||||
", category = " + category +
|
||||
", taskNo = " + taskNo +
|
||||
", description = " + description +
|
||||
", status = " + status +
|
||||
", inspectionItemBo = " + inspectionItemBo +
|
||||
", workCenter = " + workCenter +
|
||||
", shopOrder = " + shopOrder +
|
||||
", sfc = " + sfc +
|
||||
", operation = " + operation +
|
||||
", stepId = " + stepId +
|
||||
", resrce = " + resrce +
|
||||
", result = " + result +
|
||||
", comments = " + comments +
|
||||
", createUser = " + createUser +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifyUser = " + modifyUser +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", sfcDispatchBo = " + sfcDispatchBo +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,233 @@
|
||||
package com.foreverwin.mesnac.common.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务-明细表
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
|
||||
@TableName("Z_INSPECTION_TASK_DETAIL")
|
||||
|
||||
public class InspectionTaskDetail extends Model<InspectionTaskDetail> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "HANDLE", type = IdType.INPUT)
|
||||
private String handle;
|
||||
/**
|
||||
* 站点
|
||||
*/
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
/**
|
||||
* 检验任务主表
|
||||
*/
|
||||
@TableField("TASK_BO")
|
||||
private String taskBo;
|
||||
/**
|
||||
* 检验项目明细
|
||||
*/
|
||||
@TableField("INSPECTION_ITEM_DETAIL_BO")
|
||||
private String inspectionItemDetailBo;
|
||||
/**
|
||||
* 检验实际量
|
||||
*/
|
||||
@TableField("CHECK_VALUES")
|
||||
private String checkValues;
|
||||
/**
|
||||
* OK,NG
|
||||
*/
|
||||
@TableField("RESULT")
|
||||
private String result;
|
||||
/**
|
||||
* 检验时间
|
||||
*/
|
||||
@TableField("CHECK_DATE")
|
||||
private LocalDateTime checkDate;
|
||||
/**
|
||||
* 检验人
|
||||
*/
|
||||
@TableField("CHECK_USER")
|
||||
private String checkUser;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("REMARK")
|
||||
private String remark;
|
||||
/**
|
||||
* 图片/上传地址
|
||||
*/
|
||||
@TableField("PICTURE_NO")
|
||||
private String pictureNo;
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
@TableField("SFC")
|
||||
private String sfc;
|
||||
/**
|
||||
* 上传图片数量
|
||||
*/
|
||||
@TableField("PICTURE_QTY")
|
||||
private String pictureQty;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getTaskBo() {
|
||||
return taskBo;
|
||||
}
|
||||
|
||||
public void setTaskBo(String taskBo) {
|
||||
this.taskBo = taskBo;
|
||||
}
|
||||
|
||||
public String getInspectionItemDetailBo() {
|
||||
return inspectionItemDetailBo;
|
||||
}
|
||||
|
||||
public void setInspectionItemDetailBo(String inspectionItemDetailBo) {
|
||||
this.inspectionItemDetailBo = inspectionItemDetailBo;
|
||||
}
|
||||
|
||||
public String getCheckValues() {
|
||||
return checkValues;
|
||||
}
|
||||
|
||||
public void setCheckValues(String checkValues) {
|
||||
this.checkValues = checkValues;
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public LocalDateTime getCheckDate() {
|
||||
return checkDate;
|
||||
}
|
||||
|
||||
public void setCheckDate(LocalDateTime checkDate) {
|
||||
this.checkDate = checkDate;
|
||||
}
|
||||
|
||||
public String getCheckUser() {
|
||||
return checkUser;
|
||||
}
|
||||
|
||||
public void setCheckUser(String checkUser) {
|
||||
this.checkUser = checkUser;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getPictureNo() {
|
||||
return pictureNo;
|
||||
}
|
||||
|
||||
public void setPictureNo(String pictureNo) {
|
||||
this.pictureNo = pictureNo;
|
||||
}
|
||||
|
||||
public String getSfc() {
|
||||
return sfc;
|
||||
}
|
||||
|
||||
public void setSfc(String sfc) {
|
||||
this.sfc = sfc;
|
||||
}
|
||||
|
||||
public String getPictureQty() {
|
||||
return pictureQty;
|
||||
}
|
||||
|
||||
public void setPictureQty(String pictureQty) {
|
||||
this.pictureQty = pictureQty;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String TASK_BO = "TASK_BO";
|
||||
|
||||
public static final String INSPECTION_ITEM_DETAIL_BO = "INSPECTION_ITEM_DETAIL_BO";
|
||||
|
||||
public static final String CHECK_VALUES = "CHECK_VALUES";
|
||||
|
||||
public static final String RESULT = "RESULT";
|
||||
|
||||
public static final String CHECK_DATE = "CHECK_DATE";
|
||||
|
||||
public static final String CHECK_USER = "CHECK_USER";
|
||||
|
||||
public static final String REMARK = "REMARK";
|
||||
|
||||
public static final String PICTURE_NO = "PICTURE_NO";
|
||||
|
||||
public static final String SFC = "SFC";
|
||||
|
||||
public static final String PICTURE_QTY = "PICTURE_QTY";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "InspectionTaskDetail{" +
|
||||
"handle = " + handle +
|
||||
", site = " + site +
|
||||
", taskBo = " + taskBo +
|
||||
", inspectionItemDetailBo = " + inspectionItemDetailBo +
|
||||
", checkValues = " + checkValues +
|
||||
", result = " + result +
|
||||
", checkDate = " + checkDate +
|
||||
", checkUser = " + checkUser +
|
||||
", remark = " + remark +
|
||||
", pictureNo = " + pictureNo +
|
||||
", sfc = " + sfc +
|
||||
", pictureQty = " + pictureQty +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.foreverwin.mesnac.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTaskDetail;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务-明细表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
public interface InspectionTaskDetailService extends IService<InspectionTaskDetail> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<InspectionTaskDetail> selectPage(FrontPage<InspectionTaskDetail> frontPage, InspectionTaskDetail inspectionTaskDetail);
|
||||
|
||||
List<InspectionTaskDetail> selectList(InspectionTaskDetail inspectionTaskDetail);
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.foreverwin.mesnac.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTask;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
public interface InspectionTaskService extends IService<InspectionTask> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<InspectionTask> selectPage(FrontPage<InspectionTask> frontPage, InspectionTask inspectionTask);
|
||||
|
||||
List<InspectionTask> selectList(InspectionTask inspectionTask);
|
||||
|
||||
void save(Map<String, Object> paramMap);
|
||||
|
||||
void createTask(Map<String, Object> paramMap);
|
||||
}
|
@ -0,0 +1,46 @@
|
||||
package com.foreverwin.mesnac.common.service.impl;
|
||||
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTaskDetail;
|
||||
import com.foreverwin.mesnac.common.mapper.InspectionTaskDetailMapper;
|
||||
import com.foreverwin.mesnac.common.service.InspectionTaskDetailService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务-明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class InspectionTaskDetailServiceImpl extends ServiceImpl<InspectionTaskDetailMapper, InspectionTaskDetail> implements InspectionTaskDetailService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private InspectionTaskDetailMapper inspectionTaskDetailMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InspectionTaskDetail> selectPage(FrontPage<InspectionTaskDetail> frontPage, InspectionTaskDetail inspectionTaskDetail) {
|
||||
QueryWrapper<InspectionTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTaskDetail);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectionTaskDetail> selectList(InspectionTaskDetail inspectionTaskDetail) {
|
||||
QueryWrapper<InspectionTaskDetail> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTaskDetail);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,219 @@
|
||||
package com.foreverwin.mesnac.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.foreverwin.mesnac.common.constant.Constants;
|
||||
import com.foreverwin.mesnac.common.enums.HandleEnum;
|
||||
import com.foreverwin.mesnac.common.mapper.InspectionTaskMapper;
|
||||
import com.foreverwin.mesnac.common.model.InspectionItemDetail;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTask;
|
||||
import com.foreverwin.mesnac.common.model.InspectionTaskDetail;
|
||||
import com.foreverwin.mesnac.common.service.InspectionItemService;
|
||||
import com.foreverwin.mesnac.common.service.InspectionTaskDetailService;
|
||||
import com.foreverwin.mesnac.common.service.InspectionTaskService;
|
||||
import com.foreverwin.mesnac.common.util.StringUtil;
|
||||
import com.foreverwin.modular.core.exception.BaseException;
|
||||
import com.foreverwin.modular.core.util.CommonMethods;
|
||||
import com.foreverwin.modular.core.util.FrontPage;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检验任务表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author Philip
|
||||
* @since 2021-07-05
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper, InspectionTask> implements InspectionTaskService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private InspectionTaskMapper inspectionTaskMapper;
|
||||
@Autowired
|
||||
private InspectionTaskDetailService inspectionTaskDetailService;
|
||||
@Autowired
|
||||
private InspectionItemService inspectionItemService;
|
||||
|
||||
@Override
|
||||
public IPage<InspectionTask> selectPage(FrontPage<InspectionTask> frontPage, InspectionTask inspectionTask) {
|
||||
QueryWrapper<InspectionTask> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTask);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectionTask> selectList(InspectionTask inspectionTask) {
|
||||
QueryWrapper<InspectionTask> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(inspectionTask);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(Map<String, Object> paramMap) {
|
||||
String site = CommonMethods.getSite();
|
||||
String user = CommonMethods.getUser();
|
||||
//类型(首检|S/巡检|X/专检|Y/FQC|F/尾检|W/自检|Z/互检|H)
|
||||
String category = (String) paramMap.get("CATEGORY");
|
||||
//获取检验项目
|
||||
List<Map<String, Object>> taskList = (List<Map<String, Object>>) paramMap.get("TASK_LIST");
|
||||
//更新任务表
|
||||
InspectionTask task = new InspectionTask();
|
||||
String taskHandle = (String) paramMap.get("TASK_HANDLE");
|
||||
if(StringUtil.isEmpty(taskHandle)){
|
||||
throw new BaseException("保存失败,请先进行检索数据!");
|
||||
}
|
||||
task.setHandle(taskHandle);
|
||||
task.setComments((String) paramMap.get("COMMENTS"));
|
||||
task.setStatus("COMPLETE");
|
||||
task.setModifyUser(user);
|
||||
task.setModifiedDateTime(LocalDateTime.now());
|
||||
task.setResult((String) paramMap.get("RESULT"));
|
||||
updateById(task);
|
||||
//新增任务从表
|
||||
if (taskList != null && taskList.size() != 0) {
|
||||
List<InspectionTaskDetail> detailList = new ArrayList<>();
|
||||
for (int i = 0; i < taskList.size(); i++) {
|
||||
String taskListHandle = HandleEnum.INSPECTION_TASK_DETAIL.getHandle(site, UUID.randomUUID().toString());
|
||||
InspectionTaskDetail inspectionTaskDetail = new InspectionTaskDetail();
|
||||
inspectionTaskDetail.setHandle(taskListHandle);
|
||||
inspectionTaskDetail.setSite(site);
|
||||
inspectionTaskDetail.setTaskBo((String) paramMap.get("TASK_HANDLE"));
|
||||
inspectionTaskDetail.setInspectionItemDetailBo((String) taskList.get(i).get("HANDLE"));
|
||||
inspectionTaskDetail.setCheckUser((String) paramMap.get("CHECK_USER"));
|
||||
String paramType = (String) taskList.get(i).get("PARAM_TYPE");
|
||||
String checkValue = "";
|
||||
if (paramType.equals("布尔")) {
|
||||
checkValue = (String) taskList.get(i).get("CHECK_VALUE1");
|
||||
} else {
|
||||
checkValue = (String) taskList.get(i).get("CHECK_VALUE2");
|
||||
}
|
||||
inspectionTaskDetail.setCheckValues(checkValue);
|
||||
inspectionTaskDetail.setResult((String) taskList.get(i).get("RESULT"));
|
||||
|
||||
String remark = (String) taskList.get(i).get("REMARK");
|
||||
if (StringUtil.isBlank(remark)) {
|
||||
inspectionTaskDetail.setRemark("");
|
||||
} else {
|
||||
inspectionTaskDetail.setRemark(remark);
|
||||
}
|
||||
|
||||
String pictureNo = (String) taskList.get(i).get("PICTURE_NO");
|
||||
if (StringUtil.isBlank(pictureNo)) {
|
||||
inspectionTaskDetail.setPictureNo("");
|
||||
} else {
|
||||
inspectionTaskDetail.setPictureNo(pictureNo);
|
||||
}
|
||||
|
||||
String pictureQty = (String) taskList.get(i).get("PICTURE_QTY");
|
||||
if ("".equals(pictureQty) || null == pictureQty || "NULL".equals(pictureQty)) {
|
||||
inspectionTaskDetail.setPictureQty("0");
|
||||
} else {
|
||||
inspectionTaskDetail.setPictureQty(pictureQty);
|
||||
}
|
||||
detailList.add(inspectionTaskDetail);
|
||||
}
|
||||
inspectionTaskDetailService.saveBatch(detailList);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createTask(Map<String, Object> paramMap) {
|
||||
|
||||
//站点
|
||||
String site = CommonMethods.getSite();
|
||||
//类型(自检|Z;互检|H;FQC|F;尾检|W)
|
||||
String category = (String) paramMap.get("CATEGORY");
|
||||
//产品批次
|
||||
String sfc = (String) paramMap.get("SFC");
|
||||
//产品批次
|
||||
String shopOrder = (String) paramMap.get("SHOP_ORDER");
|
||||
//工序
|
||||
String operation = (String) paramMap.get("OPERATION");
|
||||
//工序标识
|
||||
String stepId = (String) paramMap.get("STEP_ID");
|
||||
|
||||
//自检/互检/包装 校验是否在当前工序+工序标识 做过检验任务
|
||||
InspectionTask createTask = isCreateTask(site, category, sfc, operation, stepId);
|
||||
if (createTask!=null&&createTask.getStatus().equals(Constants.INSPECTION_TASK_STATUS_COMPLETE)) {
|
||||
throw new BaseException("当前产品批次[" + sfc + "]已做完检验任务");
|
||||
}
|
||||
|
||||
|
||||
List<InspectionItemDetail> inspectionItemDetails = inspectionItemService.selectQualityInspection(sfc, operation, stepId, category);
|
||||
if (inspectionItemDetails.size() == 0||StringUtil.isBlank(inspectionItemDetails.get(0).getInspectionItemBo())) {
|
||||
throw new BaseException("创建任务失败,未维护数据收集组!");
|
||||
}
|
||||
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString();
|
||||
Date date = new Date(System.currentTimeMillis());
|
||||
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String taskNo = "";
|
||||
String itemNumber = (String) paramMap.get("ITEM_NUMBER");
|
||||
String description = "";
|
||||
if (category.equals(Constants.INSPECTION_TYPE_Z)) {
|
||||
if (StringUtil.isBlank(itemNumber) ) {
|
||||
taskNo = "Z_" + dateFormat1.format(date);
|
||||
} else{
|
||||
taskNo = "Z_" + itemNumber + "_" + dateFormat1.format(date);
|
||||
}
|
||||
description = "自检检验任务";
|
||||
} else if (category.equals(Constants.INSPECTION_TYPE_H)) {
|
||||
if (StringUtil.isBlank(itemNumber)) {
|
||||
taskNo = "H_" + dateFormat1.format(date);
|
||||
} else {
|
||||
taskNo = "H_" + itemNumber + "_" + dateFormat1.format(date);
|
||||
}
|
||||
description = "互检检验任务";
|
||||
} else {
|
||||
throw new BaseException("生成任务号失败,请传入检验类型!");
|
||||
}
|
||||
InspectionTask task = new InspectionTask();
|
||||
task.setHandle(handle);
|
||||
task.setSite(site);
|
||||
task.setCategory(category);
|
||||
task.setTaskNo(taskNo);
|
||||
task.setStatus(Constants.INSPECTION_TASK_STATUS_NEW);
|
||||
task.setDescription(description);
|
||||
task.setInspectionItemBo( inspectionItemDetails.get(0).getInspectionItemBo());
|
||||
task.setShopOrder(shopOrder);
|
||||
task.setWorkCenter((String) paramMap.get("WORK_CENTER"));
|
||||
task.setSfc(sfc);
|
||||
task.setOperation(operation);
|
||||
task.setStepId(stepId);
|
||||
task.setResrce((String) paramMap.get("RESRCE"));
|
||||
task.setCreateUser((String) paramMap.get("CREATE_USER"));
|
||||
task.setCreatedDateTime(LocalDateTime.now());
|
||||
task.setModifyUser((String) paramMap.get("CREATE_USER"));
|
||||
task.setModifiedDateTime(LocalDateTime.now());
|
||||
task.setSfcDispatchBo((String) paramMap.get("SFC_DISPATCH_DETAIL_BO"));
|
||||
task.setSfc(sfc);
|
||||
save(task);
|
||||
}
|
||||
public InspectionTask isCreateTask(String site,String category,String sfc,String operation ,String stepId) {
|
||||
//自检/互检 校验是否在当前工序+工序标识 做过检验任务
|
||||
QueryWrapper<InspectionTask> queryWrapper=new QueryWrapper<>();
|
||||
queryWrapper.eq(InspectionTask.SITE,site);
|
||||
queryWrapper.eq(InspectionTask.SFC,sfc);
|
||||
queryWrapper.eq(InspectionTask.CATEGORY,category);
|
||||
queryWrapper.eq(InspectionTask.OPERATION,operation);
|
||||
queryWrapper.eq(InspectionTask.STEP_ID,stepId);
|
||||
queryWrapper.orderByDesc(InspectionTask.CREATED_DATE_TIME);
|
||||
List<InspectionTask> list = list(queryWrapper);
|
||||
if (list.size() > 0) {
|
||||
return list.get(0);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,434 @@
|
||||
<?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.foreverwin.mesnac.common.mapper.InspectionTaskDetailMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.InspectionTaskDetail">
|
||||
<id column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="TASK_BO" property="taskBo" />
|
||||
<result column="INSPECTION_ITEM_DETAIL_BO" property="inspectionItemDetailBo" />
|
||||
<result column="CHECK_VALUES" property="checkValues" />
|
||||
<result column="RESULT" property="result" />
|
||||
<result column="CHECK_DATE" property="checkDate" />
|
||||
<result column="CHECK_USER" property="checkUser" />
|
||||
<result column="REMARK" property="remark" />
|
||||
<result column="PICTURE_NO" property="pictureNo" />
|
||||
<result column="SFC" property="sfc" />
|
||||
<result column="PICTURE_QTY" property="pictureQty" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SITE, TASK_BO, INSPECTION_ITEM_DETAIL_BO, CHECK_VALUES, RESULT, CHECK_DATE, CHECK_USER, REMARK, PICTURE_NO, SFC, PICTURE_QTY
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_INSPECTION_TASK_DETAIL WHERE HANDLE=#{handle}
|
||||
</select>
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_INSPECTION_TASK_DETAIL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectBatchIds" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_INSPECTION_TASK_DETAIL WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</select>
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.InspectionTaskDetail">
|
||||
INSERT INTO Z_INSPECTION_TASK_DETAIL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="taskBo!=null">TASK_BO,</if>
|
||||
<if test="inspectionItemDetailBo!=null">INSPECTION_ITEM_DETAIL_BO,</if>
|
||||
<if test="checkValues!=null">CHECK_VALUES,</if>
|
||||
<if test="result!=null">RESULT,</if>
|
||||
<if test="checkDate!=null">CHECK_DATE,</if>
|
||||
<if test="checkUser!=null">CHECK_USER,</if>
|
||||
<if test="remark!=null">REMARK,</if>
|
||||
<if test="pictureNo!=null">PICTURE_NO,</if>
|
||||
<if test="sfc!=null">SFC,</if>
|
||||
<if test="pictureQty!=null">PICTURE_QTY,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="taskBo!=null">#{taskBo},</if>
|
||||
<if test="inspectionItemDetailBo!=null">#{inspectionItemDetailBo},</if>
|
||||
<if test="checkValues!=null">#{checkValues},</if>
|
||||
<if test="result!=null">#{result},</if>
|
||||
<if test="checkDate!=null">#{checkDate},</if>
|
||||
<if test="checkUser!=null">#{checkUser},</if>
|
||||
<if test="remark!=null">#{remark},</if>
|
||||
<if test="pictureNo!=null">#{pictureNo},</if>
|
||||
<if test="sfc!=null">#{sfc},</if>
|
||||
<if test="pictureQty!=null">#{pictureQty},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.InspectionTaskDetail">
|
||||
INSERT INTO Z_INSPECTION_TASK_DETAIL
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{taskBo},
|
||||
#{inspectionItemDetailBo},
|
||||
#{checkValues},
|
||||
#{result},
|
||||
#{checkDate},
|
||||
#{checkUser},
|
||||
#{remark},
|
||||
#{pictureNo},
|
||||
#{sfc},
|
||||
#{pictureQty},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateById">
|
||||
UPDATE Z_INSPECTION_TASK_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.taskBo!=null">TASK_BO=#{et.taskBo},</if>
|
||||
<if test="et.inspectionItemDetailBo!=null">INSPECTION_ITEM_DETAIL_BO=#{et.inspectionItemDetailBo},</if>
|
||||
<if test="et.checkValues!=null">CHECK_VALUES=#{et.checkValues},</if>
|
||||
<if test="et.result!=null">RESULT=#{et.result},</if>
|
||||
<if test="et.checkDate!=null">CHECK_DATE=#{et.checkDate},</if>
|
||||
<if test="et.checkUser!=null">CHECK_USER=#{et.checkUser},</if>
|
||||
<if test="et.remark!=null">REMARK=#{et.remark},</if>
|
||||
<if test="et.pictureNo!=null">PICTURE_NO=#{et.pictureNo},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.pictureQty!=null">PICTURE_QTY=#{et.pictureQty},</if>
|
||||
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateAllColumnById">
|
||||
UPDATE Z_INSPECTION_TASK_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
SITE=#{et.site},
|
||||
TASK_BO=#{et.taskBo},
|
||||
INSPECTION_ITEM_DETAIL_BO=#{et.inspectionItemDetailBo},
|
||||
CHECK_VALUES=#{et.checkValues},
|
||||
RESULT=#{et.result},
|
||||
CHECK_DATE=#{et.checkDate},
|
||||
CHECK_USER=#{et.checkUser},
|
||||
REMARK=#{et.remark},
|
||||
PICTURE_NO=#{et.pictureNo},
|
||||
SFC=#{et.sfc},
|
||||
PICTURE_QTY=#{et.pictureQty},
|
||||
</trim> WHERE HANDLE=#{et.handle} <if test="et instanceof java.util.Map"><if test="et.MP_OPTLOCK_VERSION_ORIGINAL!=null">and ${et.MP_OPTLOCK_VERSION_COLUMN}=#{et.MP_OPTLOCK_VERSION_ORIGINAL}</if></if>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE Z_INSPECTION_TASK_DETAIL <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.taskBo!=null">TASK_BO=#{et.taskBo},</if>
|
||||
<if test="et.inspectionItemDetailBo!=null">INSPECTION_ITEM_DETAIL_BO=#{et.inspectionItemDetailBo},</if>
|
||||
<if test="et.checkValues!=null">CHECK_VALUES=#{et.checkValues},</if>
|
||||
<if test="et.result!=null">RESULT=#{et.result},</if>
|
||||
<if test="et.checkDate!=null">CHECK_DATE=#{et.checkDate},</if>
|
||||
<if test="et.checkUser!=null">CHECK_USER=#{et.checkUser},</if>
|
||||
<if test="et.remark!=null">REMARK=#{et.remark},</if>
|
||||
<if test="et.pictureNo!=null">PICTURE_NO=#{et.pictureNo},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.pictureQty!=null">PICTURE_QTY=#{et.pictureQty},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
<delete id="deleteById">
|
||||
DELETE FROM Z_INSPECTION_TASK_DETAIL WHERE HANDLE=#{handle}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_INSPECTION_TASK_DETAIL
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_INSPECTION_TASK_DETAIL
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.taskBo!=null"> AND TASK_BO=#{ew.entity.taskBo}</if>
|
||||
<if test="ew.entity.inspectionItemDetailBo!=null"> AND INSPECTION_ITEM_DETAIL_BO=#{ew.entity.inspectionItemDetailBo}</if>
|
||||
<if test="ew.entity.checkValues!=null"> AND CHECK_VALUES=#{ew.entity.checkValues}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.checkDate!=null"> AND CHECK_DATE=#{ew.entity.checkDate}</if>
|
||||
<if test="ew.entity.checkUser!=null"> AND CHECK_USER=#{ew.entity.checkUser}</if>
|
||||
<if test="ew.entity.remark!=null"> AND REMARK=#{ew.entity.remark}</if>
|
||||
<if test="ew.entity.pictureNo!=null"> AND PICTURE_NO=#{ew.entity.pictureNo}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.pictureQty!=null"> AND PICTURE_QTY=#{ew.entity.pictureQty}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBatchIds">
|
||||
DELETE FROM Z_INSPECTION_TASK_DETAIL WHERE HANDLE IN (
|
||||
<foreach item="item" index="index" collection="coll" separator=",">#{item}
|
||||
</foreach>)
|
||||
</delete>
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
@ -0,0 +1,500 @@
|
||||
<?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.foreverwin.mesnac.common.mapper.InspectionTaskMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.common.model.InspectionTask">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="CATEGORY" property="category" />
|
||||
<result column="TASK_NO" property="taskNo" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
<result column="STATUS" property="status" />
|
||||
<result column="INSPECTION_ITEM_BO" property="inspectionItemBo" />
|
||||
<result column="WORK_CENTER" property="workCenter" />
|
||||
<result column="SHOP_ORDER" property="shopOrder" />
|
||||
<result column="SFC" property="sfc" />
|
||||
<result column="OPERATION" property="operation" />
|
||||
<result column="STEP_ID" property="stepId" />
|
||||
<result column="RESRCE" property="resrce" />
|
||||
<result column="RESULT" property="result" />
|
||||
<result column="COMMENTS" property="comments" />
|
||||
<result column="CREATE_USER" property="createUser" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFY_USER" property="modifyUser" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
<result column="SFC_DISPATCH_BO" property="sfcDispatchBo" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SITE, CATEGORY, TASK_NO, DESCRIPTION, STATUS, INSPECTION_ITEM_BO, WORK_CENTER, SHOP_ORDER, SFC, OPERATION, STEP_ID, RESRCE, RESULT, COMMENTS, CREATE_USER, CREATED_DATE_TIME, MODIFY_USER, MODIFIED_DATE_TIME, SFC_DISPATCH_BO
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM Z_INSPECTION_TASK
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectOne" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include> FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectList" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMaps" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectObjs" resultType="Object">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectPage" resultMap="BaseResultMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectMapsPage" resultType="HashMap">
|
||||
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.foreverwin.mesnac.common.model.InspectionTask">
|
||||
INSERT INTO Z_INSPECTION_TASK
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="category!=null">CATEGORY,</if>
|
||||
<if test="taskNo!=null">TASK_NO,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
<if test="status!=null">STATUS,</if>
|
||||
<if test="inspectionItemBo!=null">INSPECTION_ITEM_BO,</if>
|
||||
<if test="workCenter!=null">WORK_CENTER,</if>
|
||||
<if test="shopOrder!=null">SHOP_ORDER,</if>
|
||||
<if test="sfc!=null">SFC,</if>
|
||||
<if test="operation!=null">OPERATION,</if>
|
||||
<if test="stepId!=null">STEP_ID,</if>
|
||||
<if test="resrce!=null">RESRCE,</if>
|
||||
<if test="result!=null">RESULT,</if>
|
||||
<if test="comments!=null">COMMENTS,</if>
|
||||
<if test="createUser!=null">CREATE_USER,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifyUser!=null">MODIFY_USER,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
<if test="sfcDispatchBo!=null">SFC_DISPATCH_BO,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="category!=null">#{category},</if>
|
||||
<if test="taskNo!=null">#{taskNo},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
<if test="status!=null">#{status},</if>
|
||||
<if test="inspectionItemBo!=null">#{inspectionItemBo},</if>
|
||||
<if test="workCenter!=null">#{workCenter},</if>
|
||||
<if test="shopOrder!=null">#{shopOrder},</if>
|
||||
<if test="sfc!=null">#{sfc},</if>
|
||||
<if test="operation!=null">#{operation},</if>
|
||||
<if test="stepId!=null">#{stepId},</if>
|
||||
<if test="resrce!=null">#{resrce},</if>
|
||||
<if test="result!=null">#{result},</if>
|
||||
<if test="comments!=null">#{comments},</if>
|
||||
<if test="createUser!=null">#{createUser},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifyUser!=null">#{modifyUser},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="sfcDispatchBo!=null">#{sfcDispatchBo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.common.model.InspectionTask">
|
||||
INSERT INTO Z_INSPECTION_TASK
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{site},
|
||||
#{category},
|
||||
#{taskNo},
|
||||
#{description},
|
||||
#{status},
|
||||
#{inspectionItemBo},
|
||||
#{workCenter},
|
||||
#{shopOrder},
|
||||
#{sfc},
|
||||
#{operation},
|
||||
#{stepId},
|
||||
#{resrce},
|
||||
#{result},
|
||||
#{comments},
|
||||
#{createUser},
|
||||
#{createdDateTime},
|
||||
#{modifyUser},
|
||||
#{modifiedDateTime},
|
||||
#{sfcDispatchBo},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE Z_INSPECTION_TASK <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.category!=null">CATEGORY=#{et.category},</if>
|
||||
<if test="et.taskNo!=null">TASK_NO=#{et.taskNo},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.status!=null">STATUS=#{et.status},</if>
|
||||
<if test="et.inspectionItemBo!=null">INSPECTION_ITEM_BO=#{et.inspectionItemBo},</if>
|
||||
<if test="et.workCenter!=null">WORK_CENTER=#{et.workCenter},</if>
|
||||
<if test="et.shopOrder!=null">SHOP_ORDER=#{et.shopOrder},</if>
|
||||
<if test="et.sfc!=null">SFC=#{et.sfc},</if>
|
||||
<if test="et.operation!=null">OPERATION=#{et.operation},</if>
|
||||
<if test="et.stepId!=null">STEP_ID=#{et.stepId},</if>
|
||||
<if test="et.resrce!=null">RESRCE=#{et.resrce},</if>
|
||||
<if test="et.result!=null">RESULT=#{et.result},</if>
|
||||
<if test="et.comments!=null">COMMENTS=#{et.comments},</if>
|
||||
<if test="et.createUser!=null">CREATE_USER=#{et.createUser},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifyUser!=null">MODIFY_USER=#{et.modifyUser},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
<if test="et.sfcDispatchBo!=null">SFC_DISPATCH_BO=#{et.sfcDispatchBo},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteByMap">
|
||||
DELETE FROM Z_INSPECTION_TASK
|
||||
<if test="cm!=null and !cm.isEmpty">
|
||||
<where>
|
||||
<foreach collection="cm.keys" item="k" separator="AND">
|
||||
<if test="cm[k] != null">
|
||||
${k} = #{cm[${k}]}
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<delete id="delete">
|
||||
DELETE FROM Z_INSPECTION_TASK
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
<if test="ew.entity.taskNo!=null"> AND TASK_NO=#{ew.entity.taskNo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.status!=null"> AND STATUS=#{ew.entity.status}</if>
|
||||
<if test="ew.entity.inspectionItemBo!=null"> AND INSPECTION_ITEM_BO=#{ew.entity.inspectionItemBo}</if>
|
||||
<if test="ew.entity.workCenter!=null"> AND WORK_CENTER=#{ew.entity.workCenter}</if>
|
||||
<if test="ew.entity.shopOrder!=null"> AND SHOP_ORDER=#{ew.entity.shopOrder}</if>
|
||||
<if test="ew.entity.sfc!=null"> AND SFC=#{ew.entity.sfc}</if>
|
||||
<if test="ew.entity.operation!=null"> AND OPERATION=#{ew.entity.operation}</if>
|
||||
<if test="ew.entity.stepId!=null"> AND STEP_ID=#{ew.entity.stepId}</if>
|
||||
<if test="ew.entity.resrce!=null"> AND RESRCE=#{ew.entity.resrce}</if>
|
||||
<if test="ew.entity.result!=null"> AND RESULT=#{ew.entity.result}</if>
|
||||
<if test="ew.entity.comments!=null"> AND COMMENTS=#{ew.entity.comments}</if>
|
||||
<if test="ew.entity.createUser!=null"> AND CREATE_USER=#{ew.entity.createUser}</if>
|
||||
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
|
||||
<if test="ew.entity.modifyUser!=null"> AND MODIFY_USER=#{ew.entity.modifyUser}</if>
|
||||
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
|
||||
<if test="ew.entity.sfcDispatchBo!=null"> AND SFC_DISPATCH_BO=#{ew.entity.sfcDispatchBo}</if>
|
||||
</if>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
|
||||
${ew.sqlSegment}
|
||||
</if>
|
||||
</delete>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue