diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java
index f505746..47a78f4 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/PurchaseCheckDetails.java
@@ -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;
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java
index 6128db8..3be0d2b 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/PurchaseCheckInfoServiceImpl.java
@@ -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);
}
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml
index a1c0f2b..9968774 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckDetailsMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -25,6 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
@@ -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
and pcd.task_id = #{taskId}
@@ -55,12 +57,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and pcd.production_time = #{productionTime}
and pcd.company_id = #{companyId}
-
+
-
+
insert into purchase_check_details
@@ -139,7 +141,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete from purchase_check_details where task_id in
+ delete from purchase_check_details where task_id in
#{taskId}
@@ -168,6 +170,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
file_name,
file_url,
company_id,
+ purveyor_id,
#{checkDetails.taskId},
@@ -189,6 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{checkDetails.fileName},
#{checkDetails.fileUrl},
#{checkDetails.companyId},
+ #{checkDetails.purveyorId},
@@ -276,4 +280,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
-
\ No newline at end of file
+
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml
index dd878f1..5a2b9f2 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairAuditDetailsMapper.xml
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-
+
@@ -70,12 +70,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by rad.create_time desc
-
+
-
+
insert into repair_audit_details
@@ -232,7 +232,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- delete from repair_audit_details where id in
+ delete from repair_audit_details where id in
#{id}
@@ -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"
-
\ No newline at end of file
+