Merge remote-tracking branch 'origin/master'

master
mengjiao 1 year ago
commit c563412e61

@ -198,4 +198,6 @@ public class DevicePDAController extends BaseController {
public AjaxResult getFaultReasonList(EquFaultReason equFaultReason) {
return devicePDAService.selectEquFaultReasonList(equFaultReason);
}
}

@ -114,6 +114,28 @@ public class EquSpareApply extends BaseEntity {
@Excel(name = "物料描述")
private String materialDesc;
/** 单价 */
@Excel(name = "单价")
private BigDecimal unitPrice;
/** 总价 */
@Excel(name = "总价")
private BigDecimal totalPrice;
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
public BigDecimal getUnitPrice() {
return unitPrice;
}
public void setTotalPrice(BigDecimal totalPrice) {
this.totalPrice = totalPrice;
}
public BigDecimal getTotalPrice() {
return totalPrice;
}
public void setMaterialCode(String materialCode) {
this.materialCode = materialCode;
}

@ -366,7 +366,13 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
// 费用
BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equOrder.getOrderCode());
BigDecimal orderCost = equOrder.getOrderCost();
equOrder.setOrderCost(sparePartsCost.add(orderCost));
if (orderCost!=null) {
if (sparePartsCost==null) {
equOrder.setOrderCost(orderCost);
}else {
equOrder.setOrderCost(sparePartsCost.add(orderCost));
}
}
// 更新设备状态为正常运行
equ.setStatus("1");
@ -782,6 +788,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
//工厂号
//备件费用?????
equSpareApply.setFactoryCode(request.getHeader(key.substring(8)).replace("ds_", ""));
equSpareApplyMapper.insertEquSpareApply(equSpareApply);
@ -832,9 +839,9 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
EquRepairWorkOrder example = equRepairWorkOrderMapper.selectEquRepairWorkOrderByWorkId(equRepairWorkOrder.getWorkId());
// 费用
BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equRepairWorkOrder.getOrderCode());
BigDecimal orderCost = BigDecimal.valueOf(Double.valueOf(equRepairWorkOrder.getWorkCost()));
equRepairWorkOrder.setWorkCost(String.valueOf(sparePartsCost.add(orderCost)));
// BigDecimal sparePartsCost = equSpareApplyMapper.getSparePartsCost(equRepairWorkOrder.getOrderCode());
// BigDecimal orderCost = BigDecimal.valueOf(Double.valueOf(equRepairWorkOrder.getWorkCost()));
// equRepairWorkOrder.setWorkCost(String.valueOf(sparePartsCost.add(orderCost)));
//修改设备状态 由维修中改为正常运行
EquEquipment equEquipment = new EquEquipment();

@ -112,7 +112,7 @@ public class EquCheckItemServiceImpl implements IEquCheckItemService {
EquCheckItem checkItem = new EquCheckItem();
checkItem.setItemType(equCheckItemDTO.getItemType());
checkItem.setItemName(equCheckItemDTO.getItemName());
List<EquCheckItem> check = equCheckItemMapper.selectEquCheckItemList(checkItem);
List<EquCheckItem> check = equCheckItemMapper.selectPrecisionEquCheckItemList(checkItem);
if (check.size() > 0) {
return error(500, "检查项已存在!新增失败!");
}

@ -95,6 +95,8 @@ public class EquSpareApplyServiceImpl implements IEquSpareApplyService {
String code = applyList.getWorkCode();
applyList.setApplyCode("AW" + code.substring(2) + serialNum);
}
//总价
// applyList.setTotalPrice(applyList.getAmount().multiply(applyList.getUnitPrice()));
//领用时间
applyList.setApplyTime(DateUtils.getNowDate());
//申领人

@ -48,6 +48,7 @@
<result property="itemTools" column="item_tools" />
<result property="outsourceCode" column="outsource_code" />
<result property="equipmentName" column="equipment_name" />
</resultMap>
<sql id="selectEquOrderVo">
@ -138,10 +139,51 @@
</select>
<select id="selectTodayTask" parameterType="String" resultMap="EquOrderResult">
<include refid="selectEquOrderVo"/>
where plan_type = #{planType} and del_flag = '0' and order_status != '1' and order_code in (
select order_code from equ_order_person where del_flag = '0' and user_name = #{userId} GROUP BY order_code
)
select eo.order_id,
eo.plan_id,
eo.plan_code,
eo.plan_type,
eo.order_code,
eo.plan_workshop,
eo.plan_prod_line,
eo.plan_loop,
eo.plan_loop_type,
eo.plan_loop_start,
eo.plan_loop_end,
eo.order_start,
eo.order_end,
eo.equipment_code,
eo.order_status,
eo.order_cost,
eo.plan_person,
eo.order_cost_time,
eo.order_sign_person,
eo.factory_code,
eo.attr1,
eo.attr2,
eo.attr3,
eo.del_flag,
eo.create_by,
eo.create_time,
eo.update_by,
eo.update_time,
eo.upkeep,
eo.calculation_rule,
eo.shut_down,
eo.order_inspect,
eo.repair_code,
eo.work_code,
eo.outsource_code,
be.equipment_name
from equ_order eo
left join base_equipment be on eo.equipment_code = be.equipment_code
where eo.plan_type = #{planType}
and eo.del_flag = '0'
and eo.order_status != '1'
and eo.order_code in (select order_code
from equ_order_person
where del_flag = '0' and user_name = #{userId}
GROUP BY order_code)
</select>
<select id="selectTaskRecord" parameterType="String" resultMap="EquOrderResult">

@ -28,10 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="unitPrice" column="unit_price" />
<result property="totalPrice" column="total_price" />
</resultMap>
<sql id="selectEquSpareApplyVo">
select apply_id, apply_code, work_code,parent_code,apply_type,spare_code, spare_name, spare_model, spare_quantity, spare_group_line, spare_use_equipment, apply_time, apply_people, apply_approve_people, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code from equ_spare_apply
select apply_id, apply_code, work_code,parent_code,apply_type,spare_code, spare_name, spare_model, spare_quantity, spare_group_line, spare_use_equipment, apply_time, apply_people, apply_approve_people, attr1, attr2, attr3, del_flag, create_by, create_time, update_by, update_time, factory_code , unit_price , total_price from equ_spare_apply
</sql>
<select id="selectEquSpareApplyList" parameterType="EquSpareApply" resultMap="EquSpareApplyResult">
@ -55,6 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="attr2 != null and attr2 != ''"> and attr2 = #{attr2}</if>
<if test="attr3 != null and attr3 != ''"> and attr3 = #{attr3}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="unitPrice != null and unitPrice != ''"> and unit_price = #{unitPrice}</if>
<if test="totalPrice != null and totalPrice != ''"> and total_price = #{totalPrice}</if>
and del_flag = '0'
ORDER BY apply_time DESC
</where>
@ -92,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="factoryCode != null">factory_code,</if>
<if test="unitPrice != null">unit_price,</if>
<if test="totalPrice != null">total_price,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyId != null">#{applyId},</if>
@ -117,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null">#{factoryCode},</if>
<if test="unitPrice != null">#{unitPrice},</if>
<if test="totalPrice != null">#{totalPrice},</if>
</trim>
</insert>
@ -145,6 +153,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="factoryCode != null">factory_code = #{factoryCode},</if>
<if test="unitPrice != null">unit_price = #{unitPrice},</if>
<if test="totalPrice != null">total_price = #{totalPrice},</if>
</trim>
where apply_id = #{applyId}
</update>
@ -210,7 +220,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getSparePartsCost" resultType="java.math.BigDecimal">
select SUM(a.spare_quantity * w.unit_price)
from equ_spare_apply a
left join wms_ods_mate_storage_news_attached w on a.spare_code = w.primary_code
left join wms_ods_mate_storage_news_attached w on a.spare_code = w.primary_code
where a.work_code = #{orderCode}
</select>

@ -1,185 +0,0 @@
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.common.security.utils.SecurityUtils;
import com.op.quality.domain.QcBomComponent;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcSupplier;
import com.op.quality.service.IQcCheckReportFirstService;
import com.op.system.api.domain.SysUser;
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 2023-10-19
*/
@RestController
@RequestMapping("/qcFirstReport")
public class QcCheckReportFirstController extends BaseController {
@Autowired
private IQcCheckReportFirstService qcCheckReportFirstService;
/**
*
*/
@RequiresPermissions("quality:firstReport:list")
@GetMapping("/list")
public TableDataInfo list(QcCheckReportIncome qcCheckReportIncome) {
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
qcCheckReportIncome.setCheckTimeStart(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)+" 23:59:59";
qcCheckReportIncome.setCheckTimeEnd(dateEndStr);//end
}
// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
// qcCheckReportIncome.setCheckTimeStart(qcCheckReportIncome.getIncomeTimeStart());//start
// qcCheckReportIncome.setCheckTimeEnd(qcCheckReportIncome.getIncomeTimeStart());//end
// }
startPage();
List<QcCheckReportIncome> list = qcCheckReportFirstService.selectQcCheckReportIncomeList(qcCheckReportIncome);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("quality:firstReport:export")
@Log(title = "来料检验", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, QcCheckReportIncome qcCheckReportIncome) {
//默认时间范围T 00:00:00~T+1 00:00:00
if(StringUtils.isEmpty(qcCheckReportIncome.getIncomeTimeStart())){
qcCheckReportIncome.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";
qcCheckReportIncome.setIncomeTimeEnd(dateEndStr);//end
}
// if(StringUtils.isEmpty(qcCheckReportIncome.getCheckTimeStart())){
// qcCheckReportIncome.setCheckTimeStart(qcCheckReportIncome.getIncomeTimeStart());//start
// qcCheckReportIncome.setCheckTimeEnd(qcCheckReportIncome.getIncomeTimeStart());//end
// }
List<QcCheckReportIncome> list = qcCheckReportFirstService.selectQcCheckReportIncomeList(qcCheckReportIncome);
ExcelUtil<QcCheckReportIncome> util = new ExcelUtil<QcCheckReportIncome>(QcCheckReportIncome.class);
util.exportExcel(response, list, "来料检验数据");
}
/**
*
*/
@RequiresPermissions("quality:firstReport:query")
@GetMapping(value = "/{recordId}")
public AjaxResult getInfo(@PathVariable("recordId") String recordId) {
return success(qcCheckReportFirstService.selectQcCheckReportIncomeByRecordId(recordId));
}
/**
*
*/
@RequiresPermissions("quality:firstReport:add")
@Log(title = "来料检验", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody QcCheckReportIncome qcCheckReportIncome) {
int r = qcCheckReportFirstService.insertQcCheckReportIncome(qcCheckReportIncome);
if(r>0){
return toAjax(r);
}
return error("添加失败:请检查物料的关联检测项");
}
/**
*
*/
@RequiresPermissions("quality:firstReport:edit")
@Log(title = "来料检验", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody QcCheckReportIncome qcCheckReportIncome) {
return toAjax(qcCheckReportFirstService.updateQcCheckReportIncome(qcCheckReportIncome));
}
/**
*
*/
@RequiresPermissions("quality:firstReport:remove")
@Log(title = "来料检验", businessType = BusinessType.DELETE)
@DeleteMapping("/{recordIds}")
public AjaxResult remove(@PathVariable String[] recordIds) {
return toAjax(qcCheckReportFirstService.deleteQcCheckReportIncomeByRecordIds(recordIds));
}
/**
* BOM
*/
@GetMapping("/getQcListBom")
public TableDataInfo getQcListBom(QcBomComponent bomComponent) {
startPage();
List<QcBomComponent> list = qcCheckReportFirstService.getQcListBom(bomComponent);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/getQcListSupplier")
public TableDataInfo getQcListSupplier(QcSupplier qcSupplier) {
startPage();
List<QcSupplier> list = qcCheckReportFirstService.getQcListSupplier(qcSupplier);
return getDataTable(list);
}
/**
*
*/
@GetMapping("/getQcListUser")
public TableDataInfo getQcListUser(SysUser sysUser) {
startPage();
List<SysUser> list = qcCheckReportFirstService.getQcListUser(sysUser);
return getDataTable(list);
}
/**
*
*/
@PutMapping("/changeIncomeStatus")
public AjaxResult changeIncomeStatus(@RequestBody QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setUpdateBy(SecurityUtils.getUsername());
qcCheckReportIncome.setUpdateTime(DateUtils.getNowDate());
return toAjax(qcCheckReportFirstService.updateIncomeStatus(qcCheckReportIncome));
}
/**
*
* @param
* @return
*/
@GetMapping("/getCkeckProjectList")
public TableDataInfo getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail) {
List<QcCheckTaskDetail> list = qcCheckReportFirstService.getCkeckProjectList(qcCheckTaskDetail);
return getDataTable(list);
}
}

@ -36,6 +36,12 @@ public class QcProjectType extends BaseEntity {
/** 删除标识1删除0正常 */
private String delFlag;
@Excel(name = "检验标准")
private String standardNo;
@Excel(name = "版本")
private String version;
public void setId(String id) {
this.id = id;
}
@ -79,6 +85,22 @@ public class QcProjectType extends BaseEntity {
return delFlag;
}
public String getStandardNo() {
return standardNo;
}
public void setStandardNo(String standardNo) {
this.standardNo = standardNo;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -92,6 +114,8 @@ public class QcProjectType extends BaseEntity {
.append("updateTime", getUpdateTime())
.append("factoryCode", getFactoryCode())
.append("delFlag", getDelFlag())
.append("standard", getStandardNo())
.append("version", getVersion())
.toString();
}
}

@ -1,78 +0,0 @@
package com.op.quality.service;
import com.op.quality.domain.QcBomComponent;
import com.op.quality.domain.QcCheckReportIncome;
import com.op.quality.domain.QcCheckTaskDetail;
import com.op.quality.domain.QcSupplier;
import com.op.system.api.domain.SysUser;
import java.util.List;
/**
* Service
*
* @author Open Platform
* @date 2023-10-19
*/
public interface IQcCheckReportFirstService {
/**
*
*
* @param recordId
* @return
*/
public QcCheckReportIncome selectQcCheckReportIncomeByRecordId(String recordId);
/**
*
*
* @param qcCheckReportIncome
* @return
*/
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome);
/**
*
*
* @param qcCheckReportIncome
* @return
*/
public int insertQcCheckReportIncome(QcCheckReportIncome qcCheckReportIncome);
/**
*
*
* @param qcCheckReportIncome
* @return
*/
public int updateQcCheckReportIncome(QcCheckReportIncome qcCheckReportIncome);
/**
*
*
* @param recordIds
* @return
*/
public int deleteQcCheckReportIncomeByRecordIds(String[] recordIds);
/**
*
*
* @param recordId
* @return
*/
public int deleteQcCheckReportIncomeByRecordId(String recordId);
public List<QcBomComponent> getQcListBom(QcBomComponent bomComponent);
public List<QcSupplier> getQcListSupplier(QcSupplier qcSupplier);
public List<SysUser> getQcListUser(SysUser sysUser);
int updateIncomeStatus(QcCheckReportIncome qcCheckReportIncome);
List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail);
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome);
}

@ -1,207 +0,0 @@
package com.op.quality.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.op.common.core.utils.DateUtils;
import com.op.common.core.utils.uuid.IdUtils;
import com.op.common.security.utils.SecurityUtils;
import com.op.quality.domain.*;
import com.op.quality.mapper.QcCheckReportIncomeMapper;
import com.op.quality.mapper.QcCheckTaskDetailMapper;
import com.op.quality.mapper.QcCheckTypeProjectMapper;
import com.op.quality.mapper.QcMaterialGroupDetailMapper;
import com.op.quality.service.IQcCheckReportFirstService;
import com.op.quality.service.IQcCheckReportIncomeService;
import com.op.system.api.domain.SysUser;
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.util.Date;
import java.util.List;
/**
* Service
*
* @author Open Platform
* @date 2023-10-19
*/
@Service
public class QcCheckReportFirstServiceImpl implements IQcCheckReportFirstService {
@Autowired
private QcCheckReportIncomeMapper qcCheckReportIncomeMapper;
@Autowired
private QcCheckTypeProjectMapper qcCheckTypeProjectMapper;
@Autowired
private QcMaterialGroupDetailMapper qcMaterialGroupDetailMapper;
@Autowired
private QcCheckTaskDetailMapper qcCheckTaskDetailMapper;
/**
*
*
* @param recordId
* @return
*/
@Override
@DS("#header.poolName")
public QcCheckReportIncome selectQcCheckReportIncomeByRecordId(String recordId) {
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeByRecordId(recordId);
}
/**
*
*
* @param qcCheckReportIncome
* @return
*/
@Override
@DS("#header.poolName")
public List<QcCheckReportIncome> selectQcCheckReportIncomeList(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setDelFlag("0");
qcCheckReportIncome.setTypeCode("produce");
qcCheckReportIncome.setCheckType("checkTypeSC");
return qcCheckReportIncomeMapper.selectQcCheckReportIncomeList(qcCheckReportIncome);
}
/**
*
*
* @param qcCheckReportIncome
* @return
*/
@Override
@DS("#header.poolName")
public int insertQcCheckReportIncome(QcCheckReportIncome qcCheckReportIncome) {
String bpDD = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate());
int liushuiNum = qcCheckReportIncomeMapper.getTodayMaxNum(qcCheckReportIncome);
String liushuiStr = String.format("%04d", liushuiNum);
String createBy = SecurityUtils.getUsername();
Date nowDate= DateUtils.getNowDate();
//获取当前所选工厂
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String key = "#header.poolName";
String factoryCode = request.getHeader(key.substring(8)).replace("ds_","");
qcCheckReportIncome.setCheckNo(bpDD+liushuiStr);
/**qc_check_task_income**/
String beLongId = IdUtils.fastSimpleUUID();
qcCheckReportIncome.setRecordId(beLongId);
qcCheckReportIncome.setFactoryCode(factoryCode);
qcCheckReportIncome.setCreateTime(nowDate);
qcCheckReportIncomeMapper.insertQcCheckReportIncome(qcCheckReportIncome);
/**取检测项**/
QcCheckTypeProject qctp= new QcCheckTypeProject();
qctp.setTypeId(qcCheckReportIncome.getCheckType());//生产过程检验
qctp.setMaterialCode(qcCheckReportIncome.getMaterialCode());//特性
/**qc_check_type_project**/
List<QcCheckTaskDetail> items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp);
if(CollectionUtils.isEmpty(items)){
/**qc_material_group_detail**/
QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckReportIncome.getMaterialCode());
if(group == null){
return 0;//没有找到检测项目
}
qctp.setGroupId(group.getGroupId());//共性
items = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp);
}
/**qc_check_task_detail**/
if(CollectionUtils.isEmpty(items)){
return 0;//没有找到检测项目
}
for(QcCheckTaskDetail item:items){
item.setRecordId(IdUtils.fastSimpleUUID());
item.setBelongTo(beLongId);
item.setCreateTime(nowDate);
item.setCreateBy(createBy);
item.setFactoryCode(factoryCode);
item.setStatus("N");
}
return qcCheckTaskDetailMapper.addBatch(items);
}
/**
*
*
* @param qcCheckReportIncome
* @return
*/
@Override
@DS("#header.poolName")
public int updateQcCheckReportIncome(QcCheckReportIncome qcCheckReportIncome) {
qcCheckReportIncome.setUpdateTime(DateUtils.getNowDate());
return qcCheckReportIncomeMapper.updateQcCheckReportIncome(qcCheckReportIncome);
}
/**
*
*
* @param recordIds
* @return
*/
@Override
@DS("#header.poolName")
public int deleteQcCheckReportIncomeByRecordIds(String[] recordIds) {
return qcCheckReportIncomeMapper.deleteQcCheckReportIncomeByRecordIds(recordIds);
}
/**
*
*
* @param recordId
* @return
*/
@Override
@DS("#header.poolName")
public int deleteQcCheckReportIncomeByRecordId(String recordId) {
return qcCheckReportIncomeMapper.deleteQcCheckReportIncomeByRecordId(recordId);
}
@Override
@DS("#header.poolName")
public List<QcBomComponent> getQcListBom(QcBomComponent bomComponent) {
return qcCheckReportIncomeMapper.getQcListBom(bomComponent);
}
@Override
@DS("#header.poolName")
public List<QcSupplier> getQcListSupplier(QcSupplier qcSupplier) {
return qcCheckReportIncomeMapper.getQcListSupplier(qcSupplier);
}
@Override
@DS("master")
public List<SysUser> getQcListUser(SysUser sysUser) {
return qcCheckReportIncomeMapper.getQcListUser(sysUser);
}
@Override
@DS("#header.poolName")
public int updateIncomeStatus(QcCheckReportIncome qcCheckReportIncome) {
return qcCheckReportIncomeMapper.updateQcCheckReportIncome(qcCheckReportIncome);
}
@Override
@DS("#header.poolName")
public List<QcCheckTaskDetail> getCkeckProjectList(QcCheckTaskDetail qcCheckTaskDetail) {
return qcCheckReportIncomeMapper.getCkeckProjectList(qcCheckTaskDetail);
}
@Override
@DS("#header.poolName")
public List<QcCheckReportIncome> getPrintData(QcCheckReportIncome qcCheckReportIncome) {
return null;
}
}

@ -35,13 +35,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="delFlag" column="del_flag" />
<result property="sampleQuality" column="sample_quality" />
<result property="checkName" column="check_name" />
<result property="checkType" column="check_type"/>
</resultMap>
<sql id="selectQcCheckReportIncomeVo">
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,sample_quality,
check_time, check_result, status, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time,
check_time, check_result, status, check_type, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time,
factory_code, del_flag from qc_check_task
</sql>

@ -15,10 +15,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" />
<result property="factoryCode" column="factory_code" />
<result property="delFlag" column="del_flag" />
<result property="standardNo" column="standard_no" />
<result property="version" column="version" />
</resultMap>
<sql id="selectQcProjectTypeVo">
select id, project_type_code, project_type_name, attr1, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_project_type
select id, project_type_code, project_type_name, attr1, create_by, create_time, update_by, update_time,
factory_code, del_flag, standard_no, version from qc_project_type
</sql>
<select id="selectQcProjectTypeList" parameterType="QcProjectType" resultMap="QcProjectTypeResult">
@ -28,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="projectTypeName != null and projectTypeName != ''"> and project_type_name like concat('%', #{projectTypeName}, '%')</if>
<if test="attr1 != null and attr1 != ''"> and attr1 = #{attr1}</if>
<if test="factoryCode != null and factoryCode != ''"> and factory_code = #{factoryCode}</if>
<if test="standardNo != null and standardNo != ''"> and standard_no = #{standardNo}</if>
<if test="version != null and version != ''"> and version = #{version}</if>
</where>
</select>
@ -49,6 +54,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="standardNo != null">standard_no,</if>
<if test="version != null">version = #{version}</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -61,6 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="factoryCode != null and factoryCode != ''">#{factoryCode},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="standardNo != null">#{standardNo}</if>
<if test="version != null">#{version}</if>
</trim>
</insert>
@ -76,6 +85,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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="standardNo != null">standard_no = #{standardNo},</if>
<if test="version != null">version = #{version},</if>
</trim>
where id = #{id}
</update>

@ -106,8 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from sys_factory where f_type = 'c'
</select>
<select id="getXJCheckTableList" resultType="com.op.quality.domain.QcStaticTable">
select distinct check_no checkNo,
order_no orderNo,income_batch_no incomeBatchNo,
select distinct
order_no orderNo,
material_code materialCode, material_name materialName,
quality,unit,
supplier_code supplierCode,supplier_name supplierName,
@ -150,7 +150,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)ymdms
from qc_check_task qct
left join qc_check_task_detail qctd on qct.record_id = qctd.belong_to
where qct.qct.order_no = #{orderNo} and qct.check_type = 'checkTypeSCXJ'
where qct.order_no = #{orderNo} and qct.check_type = 'checkTypeSCXJ'
order by qctd.create_time
</select>

@ -66,8 +66,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user_datasource sud on sd.id = sud.datasource_id
left join sys_user su on su.user_id = sud.user_id
where sud.user_id is not null
<if test="nickName != null and nickName != ''">
AND su.nick_name like concat('%', #{nickName}, '%')
<if test="userName != null and userName != ''">
AND su.nick_name like concat('%', #{userName}, '%')
</if>
<if test="datasourceId != null and datasourceId != ''">
AND sd.id = #{datasourceId}

Loading…
Cancel
Save