资产修改

main
dongdingding 2 months ago
parent 95fe875751
commit 62b6610647

@ -47,4 +47,11 @@ public class AssestTaskXqresponse {
*/
@ApiModelProperty("审核状态0待核查1待审核3审核通过4审核不通过5已报废")
private String status;
/**
*
*/
@ApiModelProperty("不通过原因")
private String btgyy;
}

@ -5,6 +5,7 @@ import com.ruoyi.tc.entity.po.AssetCurrentCpPo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
@ -16,7 +17,6 @@ import java.util.List;
*/
public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
/**
*
* @param assetId
* @param taskId
*/
@ -24,9 +24,6 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
void deletByAssetIdandTaskId(@Param("assetId") Long assetId, @Param("taskId") int taskId);
/**
* taskid
*
@ -35,5 +32,16 @@ public interface AssetCurrentCpMapper extends BaseMapper<AssetCurrentCpPo> {
*/
@Select("select * from asset_current_cp where task_id=#{taskId}")
List<AssetCurrentCpPo> findByTaskId(int taskId);
/**
*
*
* @param assetId id
* @param taskId id
* @param btgyy
*/
@Update("update asset_current_cp set btgyy=#{btgyy} where id=#{assetId} and task_id =#{taskId} ")
void updateByAssetId(@Param("assetId") Integer assetId, @Param("taskId") Integer taskId, @Param("btgyy") String btgyy);
}

@ -165,7 +165,7 @@ public interface AssetTaskMapper extends BaseMapper<AssetTask> {
* @return
*/
int updateByTaskId(@Param("taskStatus") Integer taskStatus, @Param("taskId") Integer taskId, @Param("finishTime") LocalDateTime finishTime,@Param("btgyy")String btgyy);
int updateByTaskId(@Param("taskStatus") Integer taskStatus, @Param("taskId") Integer taskId, @Param("finishTime") LocalDateTime finishTime);
/**

@ -30,5 +30,15 @@ public interface AssetCurrentCpService extends IService<AssetCurrentCpPo> {
*/
List<AssetCurrentCpPo> findByTaskId(int taskId);
/**
*
*
* @param assetId id
* @param taskId id
* @param btgyy
*/
void updateByAssetId(Integer assetId, Integer taskId, String btgyy);
}

@ -29,5 +29,10 @@ public class AssetCurrentCpServiceImpl extends ServiceImpl<AssetCurrentCpMapper,
public List<AssetCurrentCpPo> findByTaskId(int taskId) {
return assetCurrentCpMapper.findByTaskId(taskId);
}
@Override
public void updateByAssetId(Integer assetId, Integer taskId, String btgyy) {
assetCurrentCpMapper.updateByAssetId(assetId,taskId,btgyy);
}
}

@ -291,12 +291,14 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
} else if (allApproved && !hasPendingApproval && !hasRejected && hasExpired) {
// 资产状态全部为已通过,资产完成时间有超期的为超期完成
taskStatus = 3;
btgyy=req.getBtgyy();
finishTime = LocalDateTime.now();
taskSaveOrDelete(req);
} else if (hasRejected) {
// 审核不通过
taskStatus = 1;
btgyy=req.getBtgyy();
//修改不通过原因
assetCurrentCpService.updateByAssetId(req.getAssetId(), req.getTaskId(), btgyy);
} else if (hased && !hasRejected && !hasExpired) {
//存在已报废并且其他都已完成 且未超期
taskStatus = 2;
@ -312,7 +314,7 @@ public class AssetTaskServiceImpl extends ServiceImpl<AssetTaskMapper, AssetTask
taskStatus = 3;
}
//修改主表任务状态
assetTaskDao.updateByTaskId(taskStatus, req.getTaskId(), finishTime,btgyy);
assetTaskDao.updateByTaskId(taskStatus, req.getTaskId(), finishTime);
return a;
}

@ -210,7 +210,8 @@
b.dwmc as zcdwmc,
b.status,
b.id ,
b.task_id
b.task_id,
b.btgyy
from asset_task a
LEFT JOIN
asset_current_cp b ON FIND_IN_SET(b.dwmc, a.dwmc)
@ -406,10 +407,6 @@
<if test="finishTime != null ">
task_finish_time=#{finishTime}
</if>
<if test="btgyy != btgyy and btgyy!='' ">
btgyy=#{btgyy}
</if>
btgyy
</set>
where id =#{taskId}

Loading…
Cancel
Save