领料出库优化
This commit is contained in:
parent
949cfd2c9a
commit
9625d500f6
|
|
@ -44,11 +44,6 @@ public class MaterialConstants {
|
|||
*/
|
||||
public static final String LATITUDE_PATTERN = "^(-?(90(\\.0+)?|[1-8]?\\d(\\.\\d{1,6})?))$";
|
||||
|
||||
/**
|
||||
* 未完成
|
||||
*/
|
||||
public static final Integer TEN_CONSTANT = 10;
|
||||
|
||||
public final static String STRING_ADMIN = "admin";
|
||||
|
||||
/** 协议号的开头字母 */
|
||||
|
|
|
|||
|
|
@ -128,6 +128,9 @@ public class BmAgreementInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关联任务ID")
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty(value = "附件列表")
|
||||
private List<BmFileInfo> bmFileInfos;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public interface LeaseOutDetailsMapper {
|
|||
* @param leaseOutDetails 领料出库详细
|
||||
* @return 结果
|
||||
*/
|
||||
// public int insertLeaseOutDetails(LeaseOutDetails leaseOutDetails);
|
||||
public int insertLeaseOutDetails(LeaseOutDetails leaseOutDetails);
|
||||
|
||||
/**
|
||||
* 修改领料出库详细
|
||||
|
|
@ -72,7 +72,4 @@ public interface LeaseOutDetailsMapper {
|
|||
*/
|
||||
public int deleteLeaseOutDetailsByIds(Long[] ids);
|
||||
|
||||
/** 插入领料出库详情表 -- 根据字段选择注入 */
|
||||
int insertLeaseOutDetails(LeaseOutDetails record);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ public class PurchaseStorageServiceImpl implements IPurchaseStorageService {
|
|||
// } else
|
||||
if (!statusList.contains(PurchaseTaskStatusEnum.TO_STORE.getStatus()) && !statusList.contains(PurchaseTaskStatusEnum.TO_STORE_AFTER_REJECT.getStatus())
|
||||
&& statusList.stream().allMatch(status -> status.equals(PurchaseTaskStatusEnum.IN_STORE.getStatus()))) {
|
||||
return tmTaskMapper.updateStatusById(PurchaseTaskStatusEnum.TASK_FINISHED.getStatus(), id.toString());
|
||||
return tmTaskMapper.updateTaskStatus(id.toString(), PurchaseTaskStatusEnum.TASK_FINISHED.getStatus());
|
||||
}
|
||||
return 0;
|
||||
}).sum();
|
||||
|
|
|
|||
|
|
@ -52,13 +52,7 @@ public interface TmTaskMapper {
|
|||
*/
|
||||
int updateTmTask(TmTask tmTask);
|
||||
|
||||
|
||||
/**
|
||||
* 根据任务id更新任务状态 -- 批量、限制状态
|
||||
* @param taskId 任务id 必传
|
||||
* @param newTaskStatus 新状态
|
||||
*/
|
||||
int updateTmTaskStatusByTaskId(@Param("taskId") Long taskId, @Param("newTaskStatus") Integer newTaskStatus);
|
||||
int updateTaskStatus(@Param("taskId") String taskId, @Param("newStatus")int newStatus);
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
|
|
@ -76,14 +70,6 @@ public interface TmTaskMapper {
|
|||
*/
|
||||
int deleteTmTaskByTaskIds(Long[] taskIds);
|
||||
|
||||
/**
|
||||
* 更新任务状态
|
||||
* @param updatedStatus
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int updateStatusById(@Param("updatedStatus") Integer updatedStatus, @Param("id") String id);
|
||||
|
||||
int deleteTmTaskByPurchaseIds(Long[] ids);
|
||||
|
||||
/**
|
||||
|
|
@ -95,6 +81,4 @@ public interface TmTaskMapper {
|
|||
*/
|
||||
String selectTaskNumByMonths(Date nowDate, Integer taskType);
|
||||
|
||||
int updateTaskStatus(@Param("taskId") String taskId, @Param("status")int status);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,15 +20,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="fileName" column="file_name" />
|
||||
<result property="fileUrl" column="file_url" />
|
||||
<result property="status" column="status" />
|
||||
<result property="protocol" column="protocol" />
|
||||
<result property="isSlt" column="is_slt" />
|
||||
<result property="taskId" column="task_id" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectBmAgreementInfoList" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" resultMap="BmAgreementInfoResult">
|
||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,sign_time,
|
||||
bu.unit_id,bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||
FROM bm_agreement_info bai
|
||||
|
|
@ -60,13 +59,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</select>
|
||||
|
||||
<select id="selectBmAgreementInfoByAgreementId" parameterType="Long" resultMap="BmAgreementInfoResult">
|
||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time,
|
||||
SELECT bai.agreement_id, bai.agreement_code , contract_code,sign_time,
|
||||
bu.unit_id,bu.unit_name , bp.pro_id as projectId , bp.pro_name as projectName,
|
||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol
|
||||
plan_start_time,lease_day,auth_person,phone,bai.remark,bai.protocol,tta.task_id
|
||||
FROM bm_agreement_info bai
|
||||
LEFT JOIN bm_project bp ON bp.pro_id = bai.project_id
|
||||
LEFT JOIN bm_unit bu ON bu.unit_id = bai.unit_id
|
||||
where bai.status = '1' and agreement_id = #{agreementId}
|
||||
LEFT JOIN tm_task_agreement tta on bai.agreement_id = tta.agreement_id
|
||||
where bai.status = '1' and bai.agreement_id = #{agreementId}
|
||||
</select>
|
||||
|
||||
<insert id="insertBmAgreementInfo" parameterType="com.bonus.material.basic.domain.BmAgreementInfo" useGeneratedKeys="true" keyProperty="agreementId">
|
||||
|
|
@ -102,8 +102,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="fileName != null">file_name = #{fileName},</if>
|
||||
<if test="fileUrl != null">file_url = #{fileUrl},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="protocol != null">protocol = #{protocol},</if>
|
||||
<if test="isSlt != null">is_slt = #{isSlt},</if>
|
||||
|
|
|
|||
|
|
@ -85,8 +85,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<update id="updateStatusById">
|
||||
update tm_task set task_status = #{updatedStatus} where task_id = #{id}
|
||||
<update id="updateTaskStatus">
|
||||
update tm_task
|
||||
set task_status = #{newStatus},
|
||||
update_time = NOW()
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTmTaskByTaskId" parameterType="Long">
|
||||
|
|
@ -109,11 +112,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<update id="updateTmTaskStatusByTaskId">
|
||||
update tm_task set task_status = #{newTaskStatus}
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTmTaskByPurchaseIds" parameterType="String">
|
||||
delete from tm_task where task_id in
|
||||
(
|
||||
|
|
@ -132,10 +130,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY create_time DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<update id="updateTaskStatus">
|
||||
update tm_task
|
||||
set task_status = #{status},
|
||||
update_time = NOW()
|
||||
where task_id = #{taskId}
|
||||
</update>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue