修改需求
This commit is contained in:
parent
303ca75743
commit
f9dbd1956d
@ -37,6 +37,6 @@ public interface ProjectMapper extends MyMapper<Project> {
|
|||||||
* @param status
|
* @param status
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public void updateProjectStatus(String id, String contractno, int status, String endTime);
|
public void updateProjectStatus(String setuptime,String id, String contractno, int status, String updatetime);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -194,7 +194,8 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
List<String> csrIds = StringUtils.isNotBlank(project.getCsrIds()) ? Arrays.asList(project.getCsrIds().split(",")) : new ArrayList<>();
|
List<String> csrIds = StringUtils.isNotBlank(project.getCsrIds()) ? Arrays.asList(project.getCsrIds().split(",")) : new ArrayList<>();
|
||||||
|
|
||||||
boolean allowModify = (project != null && project.getStatus() != null && project.getStatus() != 0); // 0为作废状态,不给修改
|
boolean allowModify = (project != null && project.getStatus() != null && project.getStatus() != 0); // 0为作废状态,不给修改
|
||||||
if(allowModify)allowModify = StringUtils.equals(user.getUsername(), project.getCreateUserId()) || fzrIds.contains(user.getUsername());
|
if (allowModify)
|
||||||
|
allowModify = StringUtils.equals(user.getUsername(), project.getCreateUserId()) || fzrIds.contains(user.getUsername());
|
||||||
project.setAllowModify(allowModify); // 是否有修改权限
|
project.setAllowModify(allowModify); // 是否有修改权限
|
||||||
|
|
||||||
List<Map<String, Object>> fzrMap = qywxUserMapper.getUserInfoByUserIds(fzrIds);
|
List<Map<String, Object>> fzrMap = qywxUserMapper.getUserInfoByUserIds(fzrIds);
|
||||||
@ -386,6 +387,7 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 发送新建项目通知
|
* 发送新建项目通知
|
||||||
|
*
|
||||||
* @param p 项目参数
|
* @param p 项目参数
|
||||||
* @param fzrNames 负责人姓名,多个用英文逗号分隔
|
* @param fzrNames 负责人姓名,多个用英文逗号分隔
|
||||||
* @param toUser 接收人的userId, 多个用|隔开
|
* @param toUser 接收人的userId, 多个用|隔开
|
||||||
@ -977,10 +979,16 @@ public class ProjectServiceImpl implements ProjectService {
|
|||||||
throw new ParameterException("合同号不能为空");
|
throw new ParameterException("合同号不能为空");
|
||||||
}
|
}
|
||||||
Date endTime = null;
|
Date endTime = null;
|
||||||
if (status.equals("3")){
|
String setuptime = null;
|
||||||
endTime = new Date();
|
String updatetime = null;
|
||||||
|
if (status.equals("1")) {
|
||||||
|
//如果任务已经结束,改成运行中,重置结束时间
|
||||||
|
setuptime = "1";
|
||||||
|
} else if (status.equals("3")) {
|
||||||
|
//任务结束,修改时间
|
||||||
|
updatetime = "1";
|
||||||
}
|
}
|
||||||
mapper.updateProjectStatus(id, contractno, Integer.parseInt(status),DateUtil.date2String(new Date(),DateUtil.PATTERN_STANDARD));
|
mapper.updateProjectStatus(setuptime, id, contractno, Integer.parseInt(status),updatetime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -147,7 +147,10 @@
|
|||||||
<if test="contractno != null and contractno != ''">
|
<if test="contractno != null and contractno != ''">
|
||||||
_contractno = #{contractno},
|
_contractno = #{contractno},
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime != null and endTime != ''">
|
<if test="setuptime != null and setuptime != ''">
|
||||||
|
_end_time = NULL,
|
||||||
|
</if>
|
||||||
|
<if test="updatetime != null and updatetime != ''">
|
||||||
_end_time = NOW(),
|
_end_time = NOW(),
|
||||||
</if>
|
</if>
|
||||||
_status = #{status} where id = #{id}
|
_status = #{status} where id = #{id}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user