新增履职优化
This commit is contained in:
parent
57d5ad97f8
commit
e9571c97f0
|
|
@ -20,8 +20,7 @@ public class AddPerformRecordDto {
|
|||
@ApiModelProperty(value = "用户id",required = true)
|
||||
private String sysUserId;
|
||||
|
||||
@NotNull(message = "工作摘要不能为空")
|
||||
@ApiModelProperty(value = "工作摘要",required = true)
|
||||
@ApiModelProperty(value = "工作摘要")
|
||||
private String worktitle;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,4 +70,8 @@ public interface ListDetailMapper {
|
|||
/*查询所有*/
|
||||
List<ListDetail> findAll();
|
||||
|
||||
/*修改岗位id*/
|
||||
Integer changeListPerformId(@Param("listDetailId") String listDetailId,
|
||||
@Param("performId") String performId);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ public class ListDetail implements Serializable {
|
|||
@ApiModelProperty("清单id")
|
||||
private String listfactorid;
|
||||
|
||||
@ApiModelProperty("岗位id")
|
||||
private String listperformid;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private String sysUserId;
|
||||
|
||||
|
|
@ -89,6 +92,14 @@ public class ListDetail implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getListperformid() {
|
||||
return listperformid;
|
||||
}
|
||||
|
||||
public void setListperformid(String listperformid) {
|
||||
this.listperformid = listperformid;
|
||||
}
|
||||
|
||||
public List<ListFactor> getFactors() {
|
||||
return factors;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<resultMap id="BaseResultMap" type="com.rzyc.model.user.ListDetail">
|
||||
<id column="ListDetailId" jdbcType="VARCHAR" property="listdetailid" />
|
||||
<result column="ListFactorId" jdbcType="VARCHAR" property="listfactorid" />
|
||||
<result column="ListPerformId" jdbcType="VARCHAR" property="listperformid" />
|
||||
<result column="WorkTitle" jdbcType="VARCHAR" property="worktitle" />
|
||||
<result column="StartTime" jdbcType="TIMESTAMP" property="starttime" />
|
||||
<result column="EndTime" jdbcType="TIMESTAMP" property="endtime" />
|
||||
|
|
@ -81,7 +82,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
ListDetailId, ListFactorId, WorkTitle, StartTime, EndTime, OTCType, OTCId, IsFinish,
|
||||
ListDetailId, ListFactorId, ListPerformId,WorkTitle, StartTime, EndTime, OTCType, OTCId, IsFinish,
|
||||
FinishTime, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
|
|
@ -144,7 +145,7 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.rzyc.model.user.ListDetailWithBLOBs">
|
||||
insert into ListDetail (ListDetailId, ListFactorId, SysUserId,WorkTitle,
|
||||
insert into ListDetail (ListDetailId, ListFactorId, ListPerformId,SysUserId,WorkTitle,
|
||||
StartTime, EndTime, OTCType,task_id,
|
||||
OTCId, IsFinish, del_state,FinishTime,
|
||||
CreatedOn, CreatedBy, ModifiedOn,
|
||||
|
|
@ -152,6 +153,7 @@
|
|||
)
|
||||
values (#{listdetailid,jdbcType=VARCHAR},
|
||||
#{listfactorid,jdbcType=VARCHAR},
|
||||
#{listperformid,jdbcType=VARCHAR},
|
||||
#{sysUserId,jdbcType=VARCHAR},
|
||||
#{worktitle,jdbcType=VARCHAR},
|
||||
#{starttime,jdbcType=TIMESTAMP}, #{endtime,jdbcType=TIMESTAMP},
|
||||
|
|
@ -502,6 +504,15 @@
|
|||
|
||||
<!--履职记录-->
|
||||
<select id="performRecord" resultMap="ResultMapWithBLOBs">
|
||||
SELECT ld.* from ListDetail ld
|
||||
WHERE (ld.`WorkTitle` LIKE #{condition} OR ld.`WorkCnt` LIKE #{condition})
|
||||
AND ld.`ListPerformId` = #{performId}
|
||||
AND ld.del_state = 1
|
||||
ORDER BY ld.`ModifiedOn` DESC
|
||||
</select>
|
||||
|
||||
<!--履职记录-->
|
||||
<select id="performRecordV1" resultMap="ResultMapWithBLOBs">
|
||||
SELECT ld.*,ot.Subject taskName
|
||||
FROM ListDetail ld
|
||||
LEFT JOIN ListFactor lt ON ld.`ListFactorId` = lt.ListFactorId
|
||||
|
|
@ -539,4 +550,9 @@
|
|||
<select id="findAll" resultMap="BaseResultMap">
|
||||
SELECT * FROM `listdetail` ld
|
||||
</select>
|
||||
|
||||
<!--修改岗位id-->
|
||||
<update id="changeListPerformId">
|
||||
UPDATE listdetail SET ListPerformId = #{performId} WHERE ListDetailId = #{listDetailId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
@Profile({"dev","test"})
|
||||
@Profile({"dev","test","yun"})
|
||||
public class Swagger2Config {
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1177,6 +1177,12 @@ public class DataController extends com.rzyc.controller.BaseController {
|
|||
relation.setModifyTime(new Date());
|
||||
relation.setModifyBy("导入");
|
||||
listRelationMapper.insert(relation);
|
||||
|
||||
SysUser sysUser = sysUserMapper.selectByPrimaryKey(listDetail.getSysUserId());
|
||||
if(null != sysUser){
|
||||
listDetailMapper.changeListPerformId(listDetail.getListdetailid(),sysUser.getSystitle());
|
||||
}
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1271,13 +1271,21 @@ public class PcPersonalController extends com.rzyc.controller.BaseController {
|
|||
listDetail.setEndtime(DateUtils.parseString2Date(addPerformRecordDto.getEndTime(),"yyyy-MM-dd"));
|
||||
listDetail.setFinishtime(listDetail.getEndtime());
|
||||
|
||||
String chinaName = getChinaName();
|
||||
String userId = getUserId();
|
||||
String chinaName = userId;
|
||||
System.out.println("chinaName -> "+chinaName);
|
||||
listDetail.setCreatedby(chinaName);
|
||||
listDetail.setModifiedby(chinaName);
|
||||
listDetail.setTaskId(addPerformRecordDto.getTaskId());
|
||||
listDetail.setIsfinish(IsFinish.YES.getFinish());
|
||||
listDetail.setDelState(DelState.NOT_DEL.getState());
|
||||
|
||||
//获取岗位id
|
||||
SysUser sysUser = getUser(userId);
|
||||
if(null != sysUser){
|
||||
listDetail.setListperformid(sysUser.getSystitle());
|
||||
}
|
||||
|
||||
listDetailMapper.insert(listDetail);
|
||||
|
||||
//清单id 多个逗号隔开
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user