Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
50057eb2d3
|
|
@ -72,5 +72,7 @@ public class RepairApplyDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "维修人")
|
||||
private String repairer;
|
||||
|
||||
@ApiModelProperty(value = "发送到下一个阶段")
|
||||
private String sentToNextPhase;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@ public class RepairTaskDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value = "维修任务编码")
|
||||
private String taskCode;
|
||||
|
||||
public RepairTaskDetails(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.material.repair.domain.vo;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.material.basic.domain.BmFileInfo;
|
||||
import com.bonus.material.repair.domain.RepairPartDetails;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -49,6 +50,10 @@ public class RepairDeviceVO {
|
|||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
/** 退料ID */
|
||||
@ApiModelProperty(value = "退料ID")
|
||||
private Long backId;
|
||||
|
||||
@ApiModelProperty(value = "维修配件信息")
|
||||
private String partInfo;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@ package com.bonus.material.repair.mapper;
|
|||
|
||||
import java.util.List;
|
||||
import com.bonus.material.repair.domain.RepairApplyDetails;
|
||||
import com.bonus.material.repair.domain.RepairTaskDetails;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 维修详细Mapper接口
|
||||
|
|
@ -42,6 +44,12 @@ public interface RepairApplyDetailsMapper {
|
|||
*/
|
||||
public int updateRepairApplyDetails(RepairApplyDetails repairApplyDetails);
|
||||
|
||||
/**
|
||||
* 根据任务Id获取维修详细
|
||||
* @param taskId 任务信息ID
|
||||
*/
|
||||
List<RepairTaskDetails> getRepairDetailsWhichNotSent(@Param("taskId") Long taskId);
|
||||
|
||||
/**
|
||||
* 删除维修详细
|
||||
*
|
||||
|
|
@ -50,6 +58,8 @@ public interface RepairApplyDetailsMapper {
|
|||
*/
|
||||
public int deleteRepairApplyDetailsById(Long id);
|
||||
|
||||
public int deleteRepairApplyDetailsByTaskIdAndStatus(@Param("taskId") Long taskId, @Param("status") String status);
|
||||
|
||||
/**
|
||||
* 批量删除维修详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -83,6 +83,8 @@ public interface RepairAuditDetailsMapper {
|
|||
|
||||
int deleteRepairAuditDetailsByTaskId(Long taskId);
|
||||
|
||||
int deleteRepairAuditDetailsByRepairId(@Param("repairId") Long repairId);
|
||||
|
||||
/**
|
||||
* 批量删除修试审核详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ public interface RepairMapper {
|
|||
*/
|
||||
int updateRepairedNum(@Param("id") Long id, @Param("repairNum") int repairNum, @Param("repairer") Long repairer, @Param("userId") Long userId);
|
||||
|
||||
int updateRepairNum(@Param("id") Long id, @Param("repairNum") int repairNum, @Param("repairer") Long repairer, @Param("userId") Long userId);
|
||||
|
||||
int updateRepairedNumAndStatus(@Param("id") Long id, @Param("repairNum") int repairNum, @Param("status") int status, @Param("repairer") Long repairer, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
|
|
@ -104,6 +106,8 @@ public interface RepairMapper {
|
|||
*/
|
||||
int updateTaskStatus(@Param("taskList") List<RepairTask> taskList, @Param("userId") Long userid, @Param("taskStatus") Integer taskStatus);
|
||||
|
||||
int updateSingleTaskStatus(@Param("task") RepairTask task, @Param("userId") Long userid, @Param("taskStatus") Integer taskStatus);
|
||||
|
||||
/**
|
||||
* 新增任务
|
||||
* @param task 任务信息
|
||||
|
|
@ -128,12 +132,6 @@ public interface RepairMapper {
|
|||
*/
|
||||
int getUnFinish(RepairTask task);
|
||||
|
||||
/**
|
||||
* 根据任务Id获取维修详细
|
||||
* @param task 任务信息
|
||||
*/
|
||||
List<RepairTaskDetails> getDetailsListByTaskId(RepairTask task);
|
||||
|
||||
/**
|
||||
* 新增修饰审核审核数据
|
||||
* @param details 数据详情
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import com.bonus.common.biz.enums.RepairTaskStatusEnum;
|
|||
import com.bonus.common.biz.enums.RepairTypeEnum;
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.basic.domain.BmFileInfo;
|
||||
|
|
@ -15,18 +16,20 @@ import com.bonus.material.repair.domain.vo.RepairDeviceSummaryVo;
|
|||
import com.bonus.material.repair.domain.vo.RepairDeviceVO;
|
||||
import com.bonus.material.repair.domain.vo.RepairInputDetailsVo;
|
||||
import com.bonus.material.repair.domain.vo.RepairTicketVo;
|
||||
import com.bonus.material.repair.mapper.RepairApplyDetailsMapper;
|
||||
import com.bonus.material.repair.mapper.RepairAuditDetailsMapper;
|
||||
import com.bonus.material.repair.mapper.RepairMapper;
|
||||
import com.bonus.material.repair.service.RepairService;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
import com.bonus.system.api.model.LoginUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.dao.DataAccessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
|
@ -52,6 +55,9 @@ public class RepairServiceImpl implements RepairService {
|
|||
@Resource
|
||||
private RepairAuditDetailsMapper repairAuditDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private RepairApplyDetailsMapper repairApplyDetailsMapper;
|
||||
|
||||
// 1:内部维修 2:外部返厂维修 3:报废
|
||||
private final int INNER_REPAIR = 1; // 需要严格匹配枚举值 RepairTypeEnum.INNER_REPAIR.getTypeId();
|
||||
private final int RETURN_FACTORY = 2; // 需要严格匹配枚举值 RepairTypeEnum.RETURN_FACTORY.getTypeId();
|
||||
|
|
@ -74,16 +80,19 @@ public class RepairServiceImpl implements RepairService {
|
|||
Map<Long, List<RepairDeviceVO>> map = repairDeviceList.stream().collect(Collectors.groupingBy(RepairDeviceVO::getTypeId));
|
||||
for (Long key : map.keySet()) {
|
||||
List<RepairDeviceVO> tempList = map.get(key);
|
||||
List<RepairDeviceVO> toRepairList = tempList.stream().filter(o -> !"1".equals(o.getStatus())).collect(Collectors.toList());
|
||||
if (CollectionUtil.isNotEmpty(tempList)) {
|
||||
RepairDeviceSummaryVo vo = new RepairDeviceSummaryVo();
|
||||
Long[] ids = tempList.stream().map(RepairDeviceVO::getId).toArray(Long[]::new);
|
||||
int repairNumSum = tempList.stream().mapToInt(RepairDeviceVO::getRepairNum).sum();
|
||||
int repairedNumSum = tempList.stream().mapToInt(RepairDeviceVO::getRepairedNum).sum();
|
||||
int scrapNumSum = tempList.stream().mapToInt(RepairDeviceVO::getScrapNum).sum();
|
||||
//BigDecimal typeCostSum = tempList.stream().map(RepairDeviceVO::getTotalCost).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
vo.setRepairDeviceList(tempList);
|
||||
vo.setRepairDeviceList(toRepairList);
|
||||
vo.setIds(ids);
|
||||
vo.setTypeRepairNum(repairNumSum);
|
||||
vo.setTypeRepairedNum(repairedNumSum);
|
||||
vo.setTypeScrapNum(scrapNumSum);
|
||||
//vo.setTypeCost(typeCostSum);
|
||||
vo.setTaskId(tempList.get(0).getTaskId());
|
||||
vo.setCode(tempList.get(0).getCode());
|
||||
|
|
@ -452,6 +461,10 @@ public class RepairServiceImpl implements RepairService {
|
|||
continue;
|
||||
}
|
||||
|
||||
int innerRepairNum = 0;
|
||||
int outerRepairNum = 0;
|
||||
int scrapNum = 0;
|
||||
|
||||
// 处理配件--数量管理--内部维修
|
||||
if (CollectionUtil.isNotEmpty(bean.getNumberInRepairPartList())) {
|
||||
// 获取维修详情表中的维修详情记录:待维修、已维修、已报废的数量
|
||||
|
|
@ -463,17 +476,8 @@ public class RepairServiceImpl implements RepairService {
|
|||
|
||||
partList = bean.getNumberInRepairPartList();
|
||||
if (bean.getNumberInRepairPartList().get(0).getRepairNum() != null && bean.getNumberInRepairPartList().get(0).getRepairNum() != 0) {
|
||||
// ---------------校验维修数量-----------------
|
||||
// 统计已维修数量 + 本次维修数量
|
||||
int repairNum = OptionalInt.of(details.getRepairedNum()).orElse(0) + bean.getNumberInRepairPartList().get(0).getRepairNum();
|
||||
// 统计报废数量 + 维修合计数量
|
||||
int num = repairNum + details.getScrapNum();
|
||||
if (num > details.getRepairNum()) {
|
||||
throw new ServiceException("维修数量大于维修总量");
|
||||
}
|
||||
// ---------------校验维修数量-----------------
|
||||
// 更新维修数量、并修改维修人员
|
||||
repairMapper.updateRepairedNum(bean.getId(), repairNum, loginUser.getUserid(), loginUser.getUserid());
|
||||
// 分拆维修单, 准备数据
|
||||
innerRepairNum = bean.getNumberInRepairPartList().get(0).getRepairNum();
|
||||
// 处理配件集合数据
|
||||
copeNumberManageInList(bean, partList, loginUser, bean.getManageType());
|
||||
}
|
||||
|
|
@ -496,16 +500,8 @@ public class RepairServiceImpl implements RepairService {
|
|||
|
||||
// 判断外部维修配件数量是否为空
|
||||
if (partList.get(0).getRepairNum() != null && partList.get(0).getRepairNum() != 0) {
|
||||
|
||||
// 统计已维修数量 + 本次维修数量
|
||||
int repairNum = OptionalInt.of(details.getRepairedNum()).orElse(0) + partList.get(0).getRepairNum();
|
||||
// 统计报废数量 + 维修合计数量
|
||||
if ((repairNum + OptionalInt.of(details.getScrapNum()).orElse(0)) > details.getRepairNum()) {
|
||||
throw new ServiceException("维修数量大于维修总量");
|
||||
}
|
||||
|
||||
// 更新维修数量、维修人员不变
|
||||
repairMapper.updateRepairedNumTwo(bean.getId(), repairNum, loginUser.getUserid());
|
||||
// 分拆维修单, 准备数据
|
||||
outerRepairNum = partList.get(0).getRepairNum();
|
||||
|
||||
if (partList.get(0).getSupplierId() == null) {
|
||||
throw new ServiceException("请选择返厂厂家");
|
||||
|
|
@ -543,19 +539,10 @@ public class RepairServiceImpl implements RepairService {
|
|||
if (Objects.isNull(details)) {
|
||||
throw new ServiceException("此维修记录不存在,请检查后提交!");
|
||||
}
|
||||
// -------------校验维修数量开始----------------
|
||||
// 统计历史已报废数量 + 本次报废数量 = 报废总数
|
||||
int scrapNum = OptionalInt.of(details.getScrapNum()).orElse(0) + bean.getNumberScrapRepairPartList().get(0).getScrapNum();
|
||||
// 统计 报废总数 + 历史已维修数量,
|
||||
int num = scrapNum + details.getRepairedNum();
|
||||
// 不能大与总的待维修数量
|
||||
if (num > details.getRepairNum()) {
|
||||
throw new ServiceException("报废数量大于维修总量! 本次报废数量:" + bean.getScrapNum() + ",已报废数量:" + details.getScrapNum() + ",维修总量:" + details.getRepairNum());
|
||||
}
|
||||
// -------------校验维修数量结束----------------
|
||||
|
||||
// 更新报废数量
|
||||
repairMapper.updateScrapNum(bean.getId(), scrapNum, loginUser.getUserid());
|
||||
// 分拆维修单, 准备数据
|
||||
scrapNum = bean.getNumberScrapRepairPartList().get(0).getScrapNum();
|
||||
|
||||
|
||||
if (CollectionUtil.isNotEmpty(bean.getNumberScrapRepairPartList().get(0).getFileList())) {
|
||||
for (BmFileInfo fileInfo : bean.getNumberScrapRepairPartList().get(0).getFileList()) {
|
||||
|
|
@ -595,6 +582,11 @@ public class RepairServiceImpl implements RepairService {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
// 拆分维修单
|
||||
SplitRepairDetailsToMultiple(bean, innerRepairNum, outerRepairNum, scrapNum, loginUser);
|
||||
|
||||
|
||||
} else {
|
||||
throw new ServiceException("请选择正确的维修类型");
|
||||
}
|
||||
|
|
@ -603,6 +595,26 @@ public class RepairServiceImpl implements RepairService {
|
|||
return AjaxResult.success("维修完成");
|
||||
}
|
||||
|
||||
private void SplitRepairDetailsToMultiple(RepairDeviceVO bean, int innerRepairNum, int outerRepairNum, int scrapNum, LoginUser loginUser) {
|
||||
if ((bean.getRepairNum() - innerRepairNum - outerRepairNum - scrapNum) == 0) { //本次修完了
|
||||
repairMapper.updateRepairedNum(bean.getId(), innerRepairNum + outerRepairNum, loginUser.getUserid(), loginUser.getUserid());
|
||||
repairMapper.updateScrapNum(bean.getId(), scrapNum, loginUser.getUserid());
|
||||
} else {
|
||||
RepairApplyDetails newDetail = new RepairApplyDetails();
|
||||
BeanUtils.copyProperties(bean, newDetail);
|
||||
newDetail.setRepairNum((long) (innerRepairNum + outerRepairNum + scrapNum));
|
||||
newDetail.setRepairedNum((long) innerRepairNum + outerRepairNum);
|
||||
newDetail.setScrapNum((long) scrapNum);
|
||||
newDetail.setCreateBy(SecurityUtils.getUsername());
|
||||
newDetail.setCreateTime(DateUtils.getNowDate());
|
||||
newDetail.setRepairer(SecurityUtils.getUsername());
|
||||
newDetail.setStatus("1");
|
||||
repairApplyDetailsMapper.insertRepairApplyDetails(newDetail);
|
||||
repairMapper.updateRepairNum(bean.getId(), bean.getRepairNum() - innerRepairNum - outerRepairNum - scrapNum, loginUser.getUserid(), loginUser.getUserid());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 配件列表价格合计
|
||||
* @param partList 配件列表
|
||||
|
|
@ -611,7 +623,7 @@ public class RepairServiceImpl implements RepairService {
|
|||
*/
|
||||
private static BigDecimal countPartCosts(List<RepairPartDetails> partList, BigDecimal sfCosts) {
|
||||
for (RepairPartDetails partDetails : partList) {
|
||||
if (partDetails.getPartPrice() != null) {
|
||||
if (partDetails.getPartPrice() != null && partDetails.getPartNum() != null) {
|
||||
BigDecimal partPrice = partDetails.getPartPrice();
|
||||
BigDecimal partNumber = new BigDecimal(partDetails.getPartNum());
|
||||
sfCosts = sfCosts.add(partPrice.multiply(partNumber));
|
||||
|
|
@ -784,36 +796,38 @@ public class RepairServiceImpl implements RepairService {
|
|||
|
||||
// 1.查询选择任务是否还有未完成维修的数据
|
||||
for (RepairTask task : taskList) {
|
||||
if (repairMapper.getUnFinish(task) > 0) {
|
||||
return AjaxResult.error("选中的数据中包含维修未完成的,请完成维修再进行提交审核");
|
||||
if (repairMapper.getUnFinish(task) == 0) {
|
||||
repairMapper.updateSingleTaskStatus(task, loginUser.getUserid(), RepairTaskStatusEnum.TASK_STATUS_COMPLETE.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
// 2.更新tm_task任务状态
|
||||
repairMapper.updateTaskStatus(taskList, loginUser.getUserid(), RepairTaskStatusEnum.TASK_STATUS_COMPLETE.getStatus());
|
||||
|
||||
// 3.业务逻辑处理
|
||||
for (RepairTask task : taskList) {
|
||||
task.setCreateBy(loginUser.getUserid());
|
||||
// 查询任务的协议id
|
||||
Long agreementId = repairMapper.getAgreementId(task);
|
||||
// 查询维修任务的详情表
|
||||
List<RepairTaskDetails> detailsList = repairMapper.getDetailsListByTaskId(task);
|
||||
Long oldWxTaskId = task.getTaskId();
|
||||
List<RepairTaskDetails> detailsList = repairApplyDetailsMapper.getRepairDetailsWhichNotSent(oldWxTaskId);
|
||||
if (!CollectionUtils.isEmpty(detailsList)) {
|
||||
task.setCreateBy(loginUser.getUserid());
|
||||
Long agreementId = repairMapper.getAgreementId(task);
|
||||
// 新增tm_task表数据、修饰审核任务、状态是待审核
|
||||
task.setTaskType(TmTaskTypeEnum.TM_TASK_REPAIR_AUDIT.getTaskTypeId());
|
||||
task.setTaskStatus(RepairTaskStatusEnum.TASK_STATUS_TO_EXAM.getStatus());
|
||||
repairMapper.addTask(task);
|
||||
|
||||
// 循环插入【修饰审核明细表】
|
||||
repairAuditDetailsMapper.deleteRepairAuditDetailsByTaskId(task.getTaskId());
|
||||
task.setRepairCode(detailsList.get(0).getTaskCode());
|
||||
repairMapper.addTask(task); // 注意:此处将会生成新的 taskId (审核入库用的)
|
||||
// 新增协议任务表tm_task_agreement--关联修饰任务与协议
|
||||
task.setAgreementId(agreementId);
|
||||
repairMapper.createAgreementTask(task);
|
||||
// 新增审计记录
|
||||
for (RepairTaskDetails details : detailsList) {
|
||||
RepairApplyDetails repairApplyDetails = new RepairApplyDetails();
|
||||
repairApplyDetails.setId(details.getId());
|
||||
repairApplyDetails.setSentToNextPhase("1");
|
||||
repairApplyDetailsMapper.updateRepairApplyDetails(repairApplyDetails);
|
||||
details.setCreateBy(String.valueOf(loginUser.getUserid()));
|
||||
details.setTaskId(task.getTaskId());
|
||||
repairMapper.addAuditDetails(details);
|
||||
}
|
||||
// 新增协议任务表--关联修饰任务与协议
|
||||
task.setAgreementId(agreementId);
|
||||
repairMapper.createAgreementTask(task);
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,14 +103,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="backId != null">back_id = #{backId},</if>
|
||||
<if test="repairer != null">repairer = #{repairer},</if>
|
||||
<if test="sentToNextPhase != null">sent_to_next_phase = #{sentToNextPhase},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getRepairDetailsWhichNotSent" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||
select rad.id,
|
||||
rad.ma_id as maId,
|
||||
rad.type_id as typeId,
|
||||
rad.repair_num as repairNum,
|
||||
rad.repaired_num as repairedNum,
|
||||
rad.scrap_num as scrapNum,
|
||||
rad.company_id as companyId,
|
||||
tt.code as taskCode
|
||||
from repair_apply_details rad
|
||||
left join tm_task tt on rad.task_id = tt.task_id
|
||||
where rad.task_id = #{taskId} and rad.status = '1' and rad.sent_to_next_phase = '0'
|
||||
</select>
|
||||
|
||||
<delete id="deleteRepairApplyDetailsById" parameterType="Long">
|
||||
delete from repair_apply_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairApplyDetailsByTaskIdAndStatus">
|
||||
delete from repair_apply_details where task_id = #{taskId} and status = #{status}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairApplyDetailsByIds" parameterType="String">
|
||||
delete from repair_apply_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -281,6 +281,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from repair_audit_details where task_id = #{taskId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairAuditDetailsByRepairId" parameterType="Long">
|
||||
delete from repair_audit_details where repair_id = #{repairId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairAuditDetailsByIds" parameterType="String">
|
||||
delete from repair_audit_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -42,6 +42,13 @@
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateRepairNum">
|
||||
update repair_apply_details
|
||||
set repair_num = #{repairNum},
|
||||
update_time = now()
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateRepairedNumAndStatus">
|
||||
update repair_apply_details
|
||||
set repaired_num = #{repairNum},
|
||||
|
|
@ -109,6 +116,14 @@
|
|||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateSingleTaskStatus">
|
||||
update tm_task
|
||||
set task_status = #{taskStatus},
|
||||
update_by = #{userId},
|
||||
update_time = now()
|
||||
where task_id = #{task.taskId}
|
||||
</update>
|
||||
|
||||
<select id="getRepairTaskInfoByTaskId" resultType="com.bonus.material.repair.domain.RepairTask">
|
||||
SELECT
|
||||
rd.task_id as taskId,
|
||||
|
|
@ -275,6 +290,7 @@
|
|||
su.nick_name as repairer,
|
||||
rad.update_time as updateTime,
|
||||
rad.type_id as typeId,
|
||||
rad.back_id as backId,
|
||||
rad.create_time,
|
||||
count(rc.id) AS totalCostRecords,
|
||||
sum(rc.costs) AS totalCost
|
||||
|
|
@ -383,18 +399,6 @@
|
|||
where task_id = #{taskId} and status = '0'
|
||||
</select>
|
||||
|
||||
<select id="getDetailsListByTaskId" resultType="com.bonus.material.repair.domain.RepairTaskDetails">
|
||||
select id,
|
||||
ma_id as maId,
|
||||
type_id as typeId,
|
||||
repair_num as repairNum,
|
||||
repaired_num as repairedNum,
|
||||
scrap_num as scrapNum,
|
||||
company_id as companyId
|
||||
from repair_apply_details
|
||||
where task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<select id="selectPartPrice" resultType="java.math.BigDecimal">
|
||||
select ifnull(buy_price,0) from ma_part_type where pa_id = #{partId}
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue