后台修试管理代码提交

This commit is contained in:
1539530615@qq.com 2024-01-11 18:03:18 +08:00
parent 664c7e147d
commit 0149a02d82
7 changed files with 30 additions and 8 deletions

View File

@ -113,7 +113,11 @@ public class RepairServiceImpl implements RepairService {
bean.setPartName(partList.get(0).getPartName());
bean.setPartType(partList.get(0).getPartType());
bean.setRepairContent(partList.get(0).getRepairContent());
bean.setSupplierId(partList.get(0).getSupplierId());
if (partList.get(0).getSupplierId() == null){
throw new ServiceException("请选择返厂厂家");
}else {
bean.setSupplierId(partList.get(0).getSupplierId());
}
if (bean.getPartPrice() == null || bean.getPartPrice().isEmpty()){
bean.setPartPrice("0");
}else {

View File

@ -3,6 +3,7 @@ package com.bonus.sgzb.material.domain;
import java.math.BigDecimal;
import com.bonus.sgzb.common.core.annotation.Excel;
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
@ -12,6 +13,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author bonus
* @date 2023-12-18
*/
@Data
public class RepairInputDetails extends BaseEntity
{
private static final long serialVersionUID = 1L;
@ -54,6 +56,7 @@ public class RepairInputDetails extends BaseEntity
/** 数据所属组织 */
@Excel(name = "数据所属组织")
private Long companyId;
private Long createById;
public void setId(Long id)
{

View File

@ -105,6 +105,7 @@ public class ScrapApplyDetails extends BaseEntity
@ApiModelProperty(value = "数据状态")
private Integer repairStatus;
private Long createById;
public void setId(Long id)

View File

@ -191,8 +191,9 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
taskAgreement.setTaskId(task.getTaskId());
if (tmTaskAgreement.getAgreementId() == null){
throw new ServiceException("缺少协议数据");
}else {
taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId());
}
taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId());
taskAgreement.setCreateBy(SecurityUtils.getUsername());
agreementMapper.insertTmTaskAgreement(taskAgreement);
@ -200,12 +201,13 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
RepairInputDetails repairInputDetails = new RepairInputDetails();
repairInputDetails.setTaskId(task.getTaskId());
repairInputDetails.setAuditId(repairAuditDetails.getId());
repairInputDetails.setInputNum(repairAuditDetails.getRepairNum());
repairInputDetails.setRepairId(repairAuditDetails.getRepairId());
repairInputDetails.setRepairNum(repairAuditDetails.getRepairNum());
repairInputDetails.setTypeId(repairAuditDetails.getTypeId());
repairInputDetails.setMaId(repairAuditDetails.getMaId());
repairInputDetails.setStatus("0");
repairInputDetails.setCreateById(SecurityUtils.getUserId());
repairInputDetails.setCreateTime(new Date());
repairTestInputMapper.insertRepairInputDetails(repairInputDetails);
}
@ -223,7 +225,11 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
// 添加协议信息表
TmTaskAgreement taskAgreement = new TmTaskAgreement();
taskAgreement.setTaskId(task.getTaskId());
taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId());
if (tmTaskAgreement.getAgreementId() == null){
throw new ServiceException("缺少协议数据");
}else {
taskAgreement.setAgreementId(tmTaskAgreement.getAgreementId());
}
agreementMapper.insertTmTaskAgreement(taskAgreement);
// 添加退料任务
@ -232,9 +238,11 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
scrapApplyDetails.setTypeId(typeId);
scrapApplyDetails.setMaId(maId);
scrapApplyDetails.setScrapNum(scrapNum);
scrapApplyDetails.setScrapSource("1");
scrapApplyDetails.setScrapSource("2");
scrapApplyDetails.setStatus("0");
scrapApplyDetails.setParentId(taskId);
scrapApplyDetails.setCreateById(SecurityUtils.getUserId());
scrapApplyDetails.setCreateTime(new Date());
scrapApplyDetailsMapper.insertScrapApplyDetails(scrapApplyDetails);
}

View File

@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectRepairQuestList" resultType="com.bonus.sgzb.material.vo.ScrapApplyDetailsVO">
select DISTINCT tk.task_id taskId,tk.code scrapNum,tk.task_status taskStatus, dic.name taskStatusName, bui.unit_name unitName,bpl.lot_name projectName,
tk.create_by createBy, tk.create_time createTime, tk.remark ,tk.code repairNum
su.user_name createBy, tk.create_time createTime, tk.remark ,tk.code repairNum
from tm_task tk
left join tm_task_agreement tta on tk.task_id = tta.task_id
left join bm_agreement_info bai on tta.agreement_id = bai.agreement_id
@ -135,6 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join repair_audit_details rad on tk.task_id = rad.task_id
left join ma_type mt on rad.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join sys_user su on su.user_id = tk.create_by
where tk.task_type = 45
<if test="backUnit != null">
and bui.unit_id = #{backUnit}

View File

@ -221,6 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="repairNum != null">repair_num,</if>
<if test="inputNum != null">input_num,</if>
<if test="createBy != null">create_by,</if>
<if test="createById != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
@ -238,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="repairNum != null">#{repairNum},</if>
<if test="inputNum != null">#{inputNum},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createById != null">#{createById},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>

View File

@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectScrapApplyDetailsList" parameterType="com.bonus.sgzb.material.domain.ScrapApplyDetails" resultType="com.bonus.sgzb.material.vo.ScrapApplyDetailsVO">
select tk.code scrapNum,tk.task_status taskStatus, dic.name taskStatusName, bui.unit_name unitName,bpl.lot_name projectName,
tk.create_by createBy, tk.create_time createTime, tk.remark ,tk1.code repairNum,tk.task_id taskId
su.user_name createBy, tk.create_time createTime, tk.remark ,tk1.code repairNum,tk.task_id taskId
from tm_task tk
left join tm_task_agreement tta on tk.task_id = tta.task_id
left join bm_agreement_info bai on tta.agreement_id = bai.agreement_id
@ -44,6 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join (select id,p_id,name from sys_dic where p_id in (select id from sys_dic where value = 'bf_task')) dic on tk.task_status = dic.id
left join ma_type mt on sad.type_id = mt.type_id
left join ma_type mt1 on mt.parent_id = mt1.type_id
left join sys_user su on su.user_id = tk.create_by
where sad.scrap_source in ('1','2') and tk.task_type = 57
<if test="backUnit != null">
and bui.unit_id = #{backUnit}
@ -140,6 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="auditTime != null">audit_time,</if>
<if test="auditRemark != null">audit_remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createById != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
@ -162,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="auditTime != null">#{auditTime},</if>
<if test="auditRemark != null">#{auditRemark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createById != null">#{createById},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>