Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
1750b3b90d
|
|
@ -1,11 +1,14 @@
|
||||||
package com.bonus.material.purchase.domain;
|
package com.bonus.material.purchase.domain;
|
||||||
|
|
||||||
import com.bonus.common.core.annotation.Excel;
|
import com.bonus.common.core.annotation.Excel;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
import com.bonus.common.core.web.domain.BaseEntity;
|
import com.bonus.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新购验收编号管理对象 purchase_macode_info
|
* 新购验收编号管理对象 purchase_macode_info
|
||||||
*
|
*
|
||||||
|
|
@ -61,5 +64,21 @@ public class PurchaseMacodeInfo extends BaseEntity {
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
@ApiModelProperty(value = "数据所属组织")
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "物资单位名称")
|
||||||
|
private String unitName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格名称")
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "物资名称--规格parent类型")
|
||||||
|
private String maTypeName;
|
||||||
|
|
||||||
|
/** 出厂日期 */
|
||||||
|
@ApiModelProperty(value = "出厂日期")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "出厂日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date productionTime;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "出厂编码")
|
||||||
|
private String outFacCode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,9 @@ public interface PurchaseCheckDetailsMapper {
|
||||||
*/
|
*/
|
||||||
int batchUpdateDetailsTaskStatus(@Param("taskId") Long taskId, @Param("newTaskStatus") Integer newTaskStatus, @Param("checkResult") String checkResult);
|
int batchUpdateDetailsTaskStatus(@Param("taskId") Long taskId, @Param("newTaskStatus") Integer newTaskStatus, @Param("checkResult") String checkResult);
|
||||||
|
|
||||||
int updatePurchaseDetails(PurchaseCheckDetails details);
|
// int updatePurchaseDetails(PurchaseCheckDetails details);
|
||||||
|
|
||||||
|
int updatePurchaseDetails4Check(PurchaseCheckDetails details);
|
||||||
|
|
||||||
int getCountOfNoneThisStatus(@Param("taskId") Long taskId, @Param("status") Integer status);
|
int getCountOfNoneThisStatus(@Param("taskId") Long taskId, @Param("status") Integer status);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -249,13 +249,13 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
if (!CollectionUtils.isEmpty(codeList) && codeList.size() > 0) {
|
if (!CollectionUtils.isEmpty(codeList) && codeList.size() > 0) {
|
||||||
for (PurchaseCheckDetails details : codeList) {
|
for (PurchaseCheckDetails details : codeList) {
|
||||||
details.setStatus(PurchaseTaskStatusEnum.TO_BIND.getStatus());
|
details.setStatus(PurchaseTaskStatusEnum.TO_BIND.getStatus());
|
||||||
updateCount += purchaseCheckDetailsMapper.updatePurchaseDetails(details);
|
updateCount += purchaseCheckDetailsMapper.updatePurchaseDetails4Check(details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!CollectionUtils.isEmpty(numList) && numList.size() > 0) {
|
if (!CollectionUtils.isEmpty(numList) && numList.size() > 0) {
|
||||||
for (PurchaseCheckDetails details : numList) {
|
for (PurchaseCheckDetails details : numList) {
|
||||||
details.setStatus(PurchaseTaskStatusEnum.TO_STORE.getStatus());
|
details.setStatus(PurchaseTaskStatusEnum.TO_STORE.getStatus());
|
||||||
updateCount += purchaseCheckDetailsMapper.updatePurchaseDetails(details);
|
updateCount += purchaseCheckDetailsMapper.updatePurchaseDetails4Check(details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// // 维护tm_task的状态,但因为新购任务中的物资可以部分流转,所以汇总的状态失去意义,不再维护
|
// // 维护tm_task的状态,但因为新购任务中的物资可以部分流转,所以汇总的状态失去意义,不再维护
|
||||||
|
|
@ -287,7 +287,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
} else if (MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId().equals(details.getManageType())) {
|
} else if (MaTypeManageTypeEnum.NUMBER_DEVICE.getTypeId().equals(details.getManageType())) {
|
||||||
details.setStatus(PurchaseTaskStatusEnum.TO_STORE.getStatus());
|
details.setStatus(PurchaseTaskStatusEnum.TO_STORE.getStatus());
|
||||||
}
|
}
|
||||||
result = purchaseCheckDetailsMapper.updatePurchaseDetails(details) > 0 ? AjaxResult.success("detail验证成功") : AjaxResult.error("details无验证信息");
|
result = purchaseCheckDetailsMapper.updatePurchaseDetails4Check(details) > 0 ? AjaxResult.success("detail验证成功") : AjaxResult.error("details无验证信息");
|
||||||
}
|
}
|
||||||
// // 维护tm_task的状态,但因为新购任务中的物资可以部分流转,所以汇总的状态失去意义,不再维护
|
// // 维护tm_task的状态,但因为新购任务中的物资可以部分流转,所以汇总的状态失去意义,不再维护
|
||||||
// int count = purchaseCheckDetailsMapper.getCountOfNoneThisStatus(taskId, PurchaseTaskStatusEnum.TO_CHECK.getStatus());
|
// int count = purchaseCheckDetailsMapper.getCountOfNoneThisStatus(taskId, PurchaseTaskStatusEnum.TO_CHECK.getStatus());
|
||||||
|
|
|
||||||
|
|
@ -316,11 +316,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
task_id = #{taskId}
|
task_id = #{taskId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<update id="updatePurchaseDetails">
|
<!-- <update id="updatePurchaseDetails">-->
|
||||||
|
<!-- update-->
|
||||||
|
<!-- purchase_check_details-->
|
||||||
|
<!-- set-->
|
||||||
|
<!-- `status` = #{status}, check_result = #{checkResult}, check_num = purchase_num-->
|
||||||
|
<!-- where-->
|
||||||
|
<!-- 1=1-->
|
||||||
|
<!-- <if test="taskId != null">-->
|
||||||
|
<!-- and task_id = #{taskId}-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- <if test="typeId != null">-->
|
||||||
|
<!-- and type_id = #{typeId}-->
|
||||||
|
<!-- </if>-->
|
||||||
|
<!-- </update>-->
|
||||||
|
|
||||||
|
<update id="updatePurchaseDetails4Check">
|
||||||
update
|
update
|
||||||
purchase_check_details
|
purchase_check_details
|
||||||
set
|
set
|
||||||
`status` = #{status}, check_result = #{checkResult}
|
`status` = #{status}, check_result = #{checkResult}, check_num = purchase_num
|
||||||
where
|
where
|
||||||
1=1
|
1=1
|
||||||
<if test="taskId != null">
|
<if test="taskId != null">
|
||||||
|
|
|
||||||
|
|
@ -18,31 +18,41 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="companyId" column="company_id" />
|
<result property="companyId" column="company_id" />
|
||||||
|
<result property="outFacCode" column="out_fac_code" />
|
||||||
|
<result property="unitName" column="unit_name" />
|
||||||
|
<result property="typeName" column="type_name" />
|
||||||
|
<result property="maTypeName" column="ma_type_name" />
|
||||||
|
<result property="productionTime" column="production_time" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPurchaseMacodeInfoVo">
|
<sql id="selectPurchaseMacodeInfoVo">
|
||||||
select id, task_id, type_id, ma_code, qr_code, fix_code, code_type, status,
|
select pmi.id, pmi.task_id, pmi.type_id, pmi.ma_code, pmi.qr_code, pmi.fix_code, pmi.code_type, pmi.status,
|
||||||
create_by, create_time, update_by, update_time, remark, company_id
|
pmi.create_by, pmi.create_time, pmi.update_by, pmi.update_time, pmi.remark, pmi.company_id, pmi.out_fac_code,
|
||||||
from purchase_macode_info
|
mt.type_name, mt.unit_name, mtp.type_name as ma_type_name, pcd.production_time
|
||||||
|
from purchase_macode_info pmi
|
||||||
|
left join ma_type mt on pmi.type_id = mt.type_id
|
||||||
|
left join ma_type mtp on mt.parent_id = mtp.type_id
|
||||||
|
left join purchase_check_details pcd on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
|
<select id="selectPurchaseMacodeInfoList" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" resultMap="PurchaseMacodeInfoResult">
|
||||||
<include refid="selectPurchaseMacodeInfoVo"/>
|
<include refid="selectPurchaseMacodeInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="taskId != null "> and task_id = #{taskId}</if>
|
<if test="taskId != null "> and pmi.task_id = #{taskId}</if>
|
||||||
<if test="typeId != null "> and type_id = #{typeId}</if>
|
<if test="typeId != null "> and pmi.type_id = #{typeId}</if>
|
||||||
<if test="maCode != null and maCode != ''"> and ma_code = #{maCode}</if>
|
<if test="maCode != null and maCode != ''"> and pmi.ma_code = #{maCode}</if>
|
||||||
<if test="qrCode != null and qrCode != ''"> and qr_code = #{qrCode}</if>
|
<if test="outFacCode != null and outFacCode != ''"> and pmi.out_fac_code = #{outFacCode}</if>
|
||||||
<if test="fixCode != null and fixCode != ''"> and fix_code = #{fixCode}</if>
|
<if test="qrCode != null and qrCode != ''"> and pmi.qr_code = #{qrCode}</if>
|
||||||
<if test="codeType != null and codeType != ''"> and code_type = #{codeType}</if>
|
<if test="fixCode != null and fixCode != ''"> and pmi.fix_code = #{fixCode}</if>
|
||||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
<if test="codeType != null and codeType != ''"> and pmi.code_type = #{codeType}</if>
|
||||||
<if test="companyId != null "> and company_id = #{companyId}</if>
|
<if test="status != null and status != ''"> and pmi.status = #{status}</if>
|
||||||
|
<if test="companyId != null "> and pmi.company_id = #{companyId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPurchaseMacodeInfoById" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
|
<select id="selectPurchaseMacodeInfoById" parameterType="Long" resultMap="PurchaseMacodeInfoResult">
|
||||||
<include refid="selectPurchaseMacodeInfoVo"/>
|
<include refid="selectPurchaseMacodeInfoVo"/>
|
||||||
where id = #{id}
|
where pmi.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertPurchaseMacodeInfo" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertPurchaseMacodeInfo" parameterType="com.bonus.material.purchase.domain.PurchaseMacodeInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
@ -51,6 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="taskId != null">task_id,</if>
|
<if test="taskId != null">task_id,</if>
|
||||||
<if test="typeId != null">type_id,</if>
|
<if test="typeId != null">type_id,</if>
|
||||||
<if test="maCode != null">ma_code,</if>
|
<if test="maCode != null">ma_code,</if>
|
||||||
|
<if test="outFacCode != null">out_fac_code,</if>
|
||||||
<if test="qrCode != null">qr_code,</if>
|
<if test="qrCode != null">qr_code,</if>
|
||||||
<if test="fixCode != null">fix_code,</if>
|
<if test="fixCode != null">fix_code,</if>
|
||||||
<if test="codeType != null">code_type,</if>
|
<if test="codeType != null">code_type,</if>
|
||||||
|
|
@ -66,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="taskId != null">#{taskId},</if>
|
<if test="taskId != null">#{taskId},</if>
|
||||||
<if test="typeId != null">#{typeId},</if>
|
<if test="typeId != null">#{typeId},</if>
|
||||||
<if test="maCode != null">#{maCode},</if>
|
<if test="maCode != null">#{maCode},</if>
|
||||||
|
<if test="outFacCode != null">#{outFacCode},</if>
|
||||||
<if test="qrCode != null">#{qrCode},</if>
|
<if test="qrCode != null">#{qrCode},</if>
|
||||||
<if test="fixCode != null">#{fixCode},</if>
|
<if test="fixCode != null">#{fixCode},</if>
|
||||||
<if test="codeType != null">#{codeType},</if>
|
<if test="codeType != null">#{codeType},</if>
|
||||||
|
|
@ -85,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="taskId != null">task_id = #{taskId},</if>
|
<if test="taskId != null">task_id = #{taskId},</if>
|
||||||
<if test="typeId != null">type_id = #{typeId},</if>
|
<if test="typeId != null">type_id = #{typeId},</if>
|
||||||
<if test="maCode != null">ma_code = #{maCode},</if>
|
<if test="maCode != null">ma_code = #{maCode},</if>
|
||||||
|
<if test="outFacCode != null">out_fac_code = #{outFacCode},</if>
|
||||||
<if test="qrCode != null">qr_code = #{qrCode},</if>
|
<if test="qrCode != null">qr_code = #{qrCode},</if>
|
||||||
<if test="fixCode != null">fix_code = #{fixCode},</if>
|
<if test="fixCode != null">fix_code = #{fixCode},</if>
|
||||||
<if test="codeType != null">code_type = #{codeType},</if>
|
<if test="codeType != null">code_type = #{codeType},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue