维修记录明细问题修复,新购流程调整编写
This commit is contained in:
parent
9f93af7b13
commit
160e5a427b
|
|
@ -7,15 +7,17 @@ import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 新购验收任务详细purchase_check_details对象 purchase_check_details
|
||||
*
|
||||
*
|
||||
* @author bonus
|
||||
* @date 2023-12-10
|
||||
*/
|
||||
@Data
|
||||
public class PurchaseCheckDetails extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -116,21 +118,27 @@ public class PurchaseCheckDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "关键字筛选")
|
||||
private String keyWord;
|
||||
|
||||
public void setTaskId(Long taskId)
|
||||
@ApiModelProperty(value = "制造厂家id")
|
||||
private Long purveyorId;
|
||||
|
||||
@ApiModelProperty(value = "制造厂家名称")
|
||||
private String purveyorName;
|
||||
|
||||
public void setTaskId(Long taskId)
|
||||
{
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
public Long getTaskId()
|
||||
public Long getTaskId()
|
||||
{
|
||||
return taskId;
|
||||
}
|
||||
public void setTypeId(Long typeId)
|
||||
public void setTypeId(Long typeId)
|
||||
{
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
public Long getTypeId()
|
||||
public Long getTypeId()
|
||||
{
|
||||
return typeId;
|
||||
}
|
||||
|
|
@ -152,30 +160,30 @@ public class PurchaseCheckDetails extends BaseEntity
|
|||
{
|
||||
return purchaseNum;
|
||||
}
|
||||
public void setSupplierId(Long supplierId)
|
||||
public void setSupplierId(Long supplierId)
|
||||
{
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public Long getSupplierId()
|
||||
public Long getSupplierId()
|
||||
{
|
||||
return supplierId;
|
||||
}
|
||||
public void setProductionTime(Date productionTime)
|
||||
public void setProductionTime(Date productionTime)
|
||||
{
|
||||
this.productionTime = productionTime;
|
||||
}
|
||||
|
||||
public Date getProductionTime()
|
||||
public Date getProductionTime()
|
||||
{
|
||||
return productionTime;
|
||||
}
|
||||
public void setCompanyId(Long companyId)
|
||||
public void setCompanyId(Long companyId)
|
||||
{
|
||||
this.companyId = companyId;
|
||||
}
|
||||
|
||||
public Long getCompanyId()
|
||||
public Long getCompanyId()
|
||||
{
|
||||
return companyId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
TmTask task = new TmTask();
|
||||
// 暂定的状态字典表
|
||||
task.setTaskType(23);
|
||||
task.setTaskStatus(24);
|
||||
task.setTaskStatus(26);
|
||||
// 采购单号
|
||||
task.setCode(purchaseCodeRule());
|
||||
task.setCreateTime(DateUtils.getNowDate());
|
||||
|
|
@ -176,7 +176,12 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
if (checkDetailsList != null) {
|
||||
for (PurchaseCheckDetails purchaseCheckDetails : checkDetailsList) {
|
||||
purchaseCheckDetails.setTaskId(task.getTaskId());
|
||||
purchaseCheckDetails.setStatus(2);
|
||||
purchaseCheckDetails.setStatus(1);
|
||||
//新购,通知,验收合并为一步
|
||||
purchaseCheckDetails.setCheckNum(purchaseCheckDetails.getPurchaseNum());
|
||||
if ("1".equals(purchaseCheckDetails.getManageType())){
|
||||
purchaseCheckDetails.setBindNum(purchaseCheckDetails.getPurchaseNum());
|
||||
}
|
||||
}
|
||||
purchaseCheckDetailsMapper.insertPurchaseCheckDetailsList(checkDetailsList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper">
|
||||
|
||||
|
||||
<resultMap type="com.bonus.sgzb.material.domain.PurchaseCheckDetails" id="PurchaseCheckDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
|
|
@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="fileName" column="file_name" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="purveyorId" column="purveyor_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPurchaseCheckDetailsVo">
|
||||
|
|
@ -36,11 +37,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
pcd.supplier_id, pcd.status, msi.supplier, pcd.create_by, pcd.production_time, pcd.create_time, pcd.check_url_name,
|
||||
pcd.check_url, pcd.file_name, pcd.file_url,pcd.update_by, pcd.update_time, pcd.remark, pcd.company_id,
|
||||
mt1.type_name machineTypeName,mt.type_name specificationType, mt.manage_type manageType, tk.code ,mt.type_name typeName,
|
||||
mt.unit_name unitName
|
||||
mt.unit_name unitName,pcd.purveyor_id,msi2.supplier as purveyorName
|
||||
from purchase_check_details pcd
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
left join ma_supplier_info msi on pcd.supplier_id = msi.supplier_id
|
||||
left join ma_supplier_info msi2 on pcd.purveyor_id = msi2.supplier_id
|
||||
left join tm_task tk on pcd.task_id = tk.task_id
|
||||
where 1=1
|
||||
<if test="taskId != null ">and pcd.task_id = #{taskId}</if>
|
||||
|
|
@ -55,12 +57,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="productionTime != null ">and pcd.production_time = #{productionTime}</if>
|
||||
<if test="companyId != null ">and pcd.company_id = #{companyId}</if>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPurchaseCheckDetailsByTaskId" parameterType="Long" resultMap="PurchaseCheckDetailsResult">
|
||||
<include refid="selectPurchaseCheckDetailsVo"/>
|
||||
where task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertPurchaseCheckDetails" parameterType="com.bonus.sgzb.material.domain.PurchaseCheckDetails" useGeneratedKeys="true" keyProperty="taskId">
|
||||
insert into purchase_check_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -139,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deletePurchaseCheckDetailsByTaskIds" parameterType="String">
|
||||
delete from purchase_check_details where task_id in
|
||||
delete from purchase_check_details where task_id in
|
||||
<foreach item="taskId" collection="array" open="(" separator="," close=")">
|
||||
#{taskId}
|
||||
</foreach>
|
||||
|
|
@ -168,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="checkDetails.fileName != null">file_name,</if>
|
||||
<if test="checkDetails.fileUrl != null">file_url,</if>
|
||||
<if test="checkDetails.companyId != null">company_id,</if>
|
||||
<if test="checkDetails.purveyorId != null">purveyor_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="checkDetails.taskId != null">#{checkDetails.taskId},</if>
|
||||
|
|
@ -189,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="checkDetails.fileName != null">#{checkDetails.fileName},</if>
|
||||
<if test="checkDetails.fileUrl != null">#{checkDetails.fileUrl},</if>
|
||||
<if test="checkDetails.companyId != null">#{checkDetails.companyId},</if>
|
||||
<if test="checkDetails.purveyorId != null">#{checkDetails.purveyorId},</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -276,4 +280,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.sgzb.material.mapper.RepairAuditDetailsMapper">
|
||||
|
||||
|
||||
<resultMap type="com.bonus.sgzb.material.domain.RepairAuditDetails" id="RepairAuditDetailsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="taskId" column="task_id" />
|
||||
|
|
@ -70,12 +70,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
order by rad.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectRepairAuditDetailsById" parameterType="Long" resultMap="RepairAuditDetailsResult">
|
||||
<include refid="selectRepairAuditDetailsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertRepairAuditDetails" parameterType="com.bonus.sgzb.material.domain.RepairAuditDetails">
|
||||
insert into repair_audit_details
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -232,7 +232,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<delete id="deleteRepairAuditDetailsByIds" parameterType="String">
|
||||
delete from repair_audit_details where id in
|
||||
delete from repair_audit_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
|
@ -517,7 +517,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
COALESCE ( rar.repair_content, '' )) AS repairContent
|
||||
FROM
|
||||
repair_apply_record rar
|
||||
left join repair_part_details rpd on rar.part_id = rpd.part_id
|
||||
left join repair_part_details rpd on rar.part_id = rpd.part_id and rar.task_id = rpd.task_id
|
||||
left join ma_part_type mpt ON mpt.pa_id = rpd.part_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = rar.ma_id
|
||||
WHERE
|
||||
|
|
@ -539,4 +539,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue