This commit is contained in:
mashuai 2025-06-04 16:52:04 +08:00
parent 0c253991fd
commit 6039b472ae
7 changed files with 37 additions and 13 deletions

View File

@ -246,7 +246,11 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
MaCodeDto maCodeDto = new MaCodeDto();
maCodeDto.setMaCode(maCodeVo.getMaCode());
maCodeDto.setMaId(maCodeVo.getMaId());
maCodeDto.setApDetection(maCodeVo.getApDetection());
if (maCodeVo.getGoodNum() != null && maCodeVo.getGoodNum().compareTo(BigDecimal.ZERO) > 0) {
maCodeDto.setApDetection("完好");
} else if (maCodeVo.getBadNum() != null && maCodeVo.getBadNum().compareTo(BigDecimal.ZERO) > 0) {
maCodeDto.setApDetection("损坏");
}
maCodeDto.setTypeName(maCodeVo.getTypeName());
maCodeDto.setMaterialName(maCodeVo.getMaterialName());
maCodeDto.setTypeId(maCodeVo.getTypeId());

View File

@ -76,4 +76,11 @@ public interface BmFileInfoMapper {
* @return 结果
*/
int deleteBmFileInfoByBizInfo(BmFileInfo bmFileInfo);
/**
* 根据任务id删除文件
* @param taskId
* @return
*/
int deleteBmFileList(Long taskId);
}

View File

@ -117,15 +117,14 @@ public class PurchaseCheckDetails extends BaseEntity {
private String supplierName;
/** 状态参考数据字典purchase_task_status键值 */
@Excel(name = "状态", readConverterExp = "1=待通知,2=待验收,3=待绑定,4=待入库,19=已入库", sort = 11)
@Excel(name = "状态", readConverterExp = "1=待通知,2=待验收,3=待绑定,4=待入库,12=验收被驳回,13=绑定被驳回,14=入库被驳回,19=已入库,21=入库进行中,22=入库已完成", sort = 11)
@ApiModelProperty(value = "状态参考数据字典purchase_task_status键值")
private Integer status;
/** 出厂日期 */
@ApiModelProperty(value = "出厂日期")
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd", sort = 10)
private Date productionTime;
@Excel(name = "出厂日期", width = 30, sort = 10)
private String productionTime;
/** 验收图片 */
//@Excel(name = "验收图片")
@ -189,4 +188,7 @@ public class PurchaseCheckDetails extends BaseEntity {
/** 租赁价格 */
@ApiModelProperty(value = "租赁价格")
private BigDecimal rentPrice;
@ApiModelProperty(value = "文件实收份数")
private Integer fileReceiveNum;
}

View File

@ -142,6 +142,9 @@ public class PurchaseCheckInfo extends BaseEntity {
@ApiModelProperty(value = "会签层级 1 代表供应科层级2 代表技术科层级3 代表库管班层级")
private String signLevel;
@ApiModelProperty(value = "出厂日期")
private String productionTime;
public String getCheckUser() {
return checkUser;
}

View File

@ -115,4 +115,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fileType != null "> and file_type = #{fileType}</if>
</where>
</delete>
<delete id="deleteBmFileList">
delete from bm_file_info where task_id = #{taskId}
and task_type = 0
</delete>
</mapper>

View File

@ -515,13 +515,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt2.type_id AS thirdTypeId,
mt.type_name AS typeModelName,
SUM(
IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0)) AS repairInputNum
IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0) - IFNULL(rid.reject_num, 0)) AS repairInputNum
FROM repair_input_details rid
LEFT JOIN ma_type mt ON mt.type_id = rid.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
WHERE IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0) > 0
WHERE IFNULL(rid.repair_num, 0) - IFNULL(rid.input_num, 0) - IFNULL(rid.reject_num, 0) > 0
GROUP BY
mt.type_id) AS subquery3 ON subquery3.type_id = mt.type_id
LEFT JOIN (
@ -565,7 +565,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
mt2.type_name AS typeName,
mt2.type_id AS thirdTypeId,
mt.type_name AS typeModelName,
SUM(IF(sad.status IN ('0','1'), IFNULL(sad.scrap_num, 0), 0)) AS pendingScrapNum,
SUM(IF(sad.ledger_status = '0', IFNULL(sad.scrap_num, 0), 0)) AS pendingScrapNum,
SUM(IF(sad.ledger_status = '1', IFNULL(sad.scrap_num, 0), 0)) AS scrapNum
FROM scrap_apply_details sad
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
@ -838,7 +838,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
LEFT JOIN sys_user su ON sad.audit_by = su.user_id
WHERE sad.status IN ('0','1')
WHERE sad.ledger_status = '0'
<if test="typeId != null">
AND sad.type_id = #{typeId}
</if>

View File

@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="companyId" column="company_id" />
<result property="taskStatus" column="task_status" />
<result property="checkUser" column="checkUser" />
<result property="productionTime" column="production_time" />
</resultMap>
<resultMap type="com.bonus.material.purchase.domain.vo.PurchaseCheckFormVo" id="PurchaseCheckFormResult">
@ -32,10 +33,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectPurchaseCheckInfoBaseSQL">
select
id, task_id, purchase_time, arrival_time, purchaser, supplier_id, tax_rate, create_by,
create_time, update_by, update_time, remark, company_id
pci.id, pci.task_id, pci.purchase_time, pci.arrival_time, pci.purchaser, pci.supplier_id, pci.tax_rate, pci.create_by,
pci.create_time, pci.update_by, pci.update_time, pci.remark, pci.company_id, pcd.production_time
from
purchase_check_info
purchase_check_info pci
left join purchase_check_details pcd ON pci.task_id = pcd.task_id
</sql>
<sql id="selectPurchaseCheckInfoJoinSQL">
@ -65,7 +67,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectPurchaseCheckInfoById" parameterType="Long" resultMap="PurchaseCheckInfoResult">
<include refid="selectPurchaseCheckInfoBaseSQL"/>
where id = #{id}
where pci.id = #{id}
LIMIT 1
</select>
<insert id="insertPurchaseCheckInfo" parameterType="com.bonus.material.purchase.domain.PurchaseCheckInfo" useGeneratedKeys="true" keyProperty="id">