This commit is contained in:
parent
19cceff7b8
commit
a866447d06
|
|
@ -35,7 +35,9 @@ public enum TmTaskTypeEnum {
|
|||
// 现场维修
|
||||
TM_TASK_FIELD(21, "现场维修任务"),
|
||||
// 材料站领料
|
||||
TM_TASK_MATERIAL_LEASE(22, "材料站领料任务");
|
||||
TM_TASK_MATERIAL_LEASE(22, "材料站领料任务"),
|
||||
// 材料站退料
|
||||
TM_TASK_MATERIAL_BACK(23, "材料站退料任务");
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -420,4 +420,11 @@ public interface BackApplyInfoMapper {
|
|||
* @return
|
||||
*/
|
||||
HandlingOrder getSort(HandlingOrder bean);
|
||||
|
||||
/**
|
||||
* 查询退料详情
|
||||
* @param backApplyDetails
|
||||
* @return
|
||||
*/
|
||||
List<BackApplyDetails> selectBackApplyDetailsList(BackApplyDetails backApplyDetails);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,4 +196,7 @@ public class MaterialBackApplyInfo implements Serializable {
|
|||
* i8工程id集合
|
||||
*/
|
||||
private List<String> projectIdList;
|
||||
|
||||
@ApiModelProperty(value = "退料方式(0 材料退料,1 工器具退料,2 第三方推送)")
|
||||
private String backStyle;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,24 +388,17 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
|||
}
|
||||
}
|
||||
}
|
||||
for (MaterialBackApplyDetails backApplyDetails : dto.getBackApplyDetailsList()) {
|
||||
if (backApplyDetails.getNum() != null && backApplyDetails.getPreNum() != null) {
|
||||
if (backApplyDetails.getNum().compareTo(backApplyDetails.getPreNum())<0 ) {
|
||||
return AjaxResult.error(backApplyDetails.getTypeName() + "退料数量不能大于预退数量,请重新填写!");
|
||||
}
|
||||
}
|
||||
}
|
||||
int result = 0;
|
||||
try {
|
||||
int thisMonthMaxOrder = taskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_MATERIAL_LEASE.getTaskTypeId());
|
||||
int thisMonthMaxOrder = taskMapper.getMonthMaxOrderByDate(DateUtils.getCurrentYear(), DateUtils.getCurrentMonth(), TmTaskTypeEnum.TM_TASK_MATERIAL_BACK.getTaskTypeId());
|
||||
String code = genderTaskCode(thisMonthMaxOrder);
|
||||
TmTask tmTask = new TmTask();
|
||||
if (dto.getBackApplyInfo().getIsBack() == 1) {
|
||||
tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_MATERIAL_LEASE.getTaskTypeId(),
|
||||
tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_MATERIAL_BACK.getTaskTypeId(),
|
||||
BackTaskStatusEnum.BACK_TASK_IN_FINISHED.getStatus(),
|
||||
null, thisMonthMaxOrder + 1, code);
|
||||
} else {
|
||||
tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_MATERIAL_LEASE.getTaskTypeId(),
|
||||
tmTask = new TmTask(null, TmTaskTypeEnum.TM_TASK_MATERIAL_BACK.getTaskTypeId(),
|
||||
BackTaskStatusEnum.BACK_TASK_NO_FINISHED.getStatus(),
|
||||
null, thisMonthMaxOrder + 1, code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService {
|
|||
// 分配给对应的detail
|
||||
for (LeaseApplyDetails detail : details) {
|
||||
if (detail.getTypeId() != null) {
|
||||
List<MaCodeVo> maCodeVoList = maCodeMap.get(detail.getTypeId());
|
||||
List<MaCodeVo> maCodeVoList = maCodeMap.get(detail.getTypeId().toString());
|
||||
if (!CollectionUtils.isEmpty(maCodeVoList)) {
|
||||
detail.setMaCodeVoList(maCodeVoList);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.material.back.domain.BackApplyInfo;
|
||||
import com.bonus.material.basic.domain.BmUnit;
|
||||
import com.bonus.material.settlement.domain.SltAgreementInfo;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
|
|
@ -129,4 +130,11 @@ public interface TmTaskMapper {
|
|||
* @return
|
||||
*/
|
||||
TmTask selectTmTaskByPreTaskId(long parseLong);
|
||||
|
||||
/**
|
||||
* 查询单位信息
|
||||
* @param backApplyInfo
|
||||
* @return
|
||||
*/
|
||||
BmUnit selectBmUnitInfo(BackApplyInfo backApplyInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1136,4 +1136,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and time_type = #{timeType}
|
||||
ORDER BY sort desc LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="selectBackApplyDetailsList" resultType="com.bonus.material.back.domain.BackApplyDetails">
|
||||
SELECT
|
||||
id AS id,
|
||||
parent_id AS parentId,
|
||||
type_id AS typeId
|
||||
FROM
|
||||
back_check_details
|
||||
where parent_id = #{parentId} and type_id = #{typeId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="backTime != null">back_time,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="directId != null">direct_id,</if>
|
||||
<if test="backStyle != null and backStyle != ''">back_style,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null">#{code},</if>
|
||||
|
|
@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="backTime != null">#{backTime},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="directId != null">#{directId},</if>
|
||||
<if test="backStyle != null and backStyle != ''">#{backStyle},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
|
|
|||
|
|
@ -204,4 +204,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<include refid="selectTmTaskVo"/>
|
||||
where task_type = '22' and pre_task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<select id="selectBmUnitInfo" resultType="com.bonus.material.basic.domain.BmUnit">
|
||||
SELECT
|
||||
unit_id as unitId,
|
||||
type_id as typeId,
|
||||
unit_name as unitName
|
||||
FROM
|
||||
bm_unit
|
||||
WHERE
|
||||
unit_id = #{unitId}
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue