| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Api(tags = {"相关协议接口"}) |
| | |
| | | @ApiOperation(value = "修改相关附件",response = Agreement.class) |
| | | @PostMapping(value = "/update") |
| | | @Authorization |
| | | public ResultData update(@RequestBody Agreement agreement,@CurrentUser SysUser sysUse){ |
| | | public ResultData update(@RequestBody Agreement agreement,@CurrentUser SysUser sysUse) |
| | | { |
| | | agreement.setUpdateTime(LocalDateTime.now()); |
| | | agreement.setUpdateUserId(sysUse.getUserId().toString()); |
| | | return agreementService.update(agreement); |
| | | } |
| | |
| | | @ApiModelProperty(name = "ClassifyAdministrationEntityList", value = "下级分类") |
| | | private List<ClassifyAdministration> ClassifyAdministrationEntityList; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(name = "transactNum", value = "办理事项数量") |
| | | private String transactNum; |
| | | |
| | | |
| | | } |
| | |
| | | <sql id="selectAgreement"> |
| | | select id,agreement, |
| | | (select user_name from automessage_sys_user where user_id=a.update_user_id)updateUserName, |
| | | update_user_id,create_time, |
| | | update_user_id, |
| | | create_time, |
| | | update_time, |
| | | (select user_name from automessage_sys_user where user_id=a.create_user_id)createUserName, |
| | | create_user_id,agreement_content FROM automessage_agreement a |
| | | create_user_id,agreement_content |
| | | FROM automessage_agreement a |
| | | </sql> |
| | | |
| | | <select id="selectConfigList" resultMap="AgreementResult"> |
| | |
| | | parent_id, |
| | | (select ca.classify_name from automessage_classify_administration as ca where ca.id= automessage_classify_administration.parent_id) as parentName, |
| | | classify_name, |
| | | classify_icon |
| | | classify_icon, |
| | | (IF(classify_grade = '2',(SELECT count(id) FROM automessage_transaction_event WHERE automessage_transaction_event.classify_id=automessage_classify_administration.id), |
| | | (SELECT count(id) FROM automessage_transaction_event WHERE automessage_transaction_event.classify_id in (SELECT id FROM automessage_classify_administration |
| | | WHERE automessage_classify_administration.parent_id=automessage_transaction_event.classify_id)))) as transactNum |
| | | FROM |
| | | automessage_classify_administration |
| | | </sql> |
| | |
| | | <select id="selectListByDepartmentId" resultMap="SysUserResult"> |
| | | <include refid="selectSysUserVo"/> |
| | | <where> |
| | | user_type=2 and status=0 |
| | | <if test="list!=null"> |
| | | and department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''"> |
| | | and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%')) |
| | | </if> |
| | | user_type=2 and status=0 |
| | | <if test="list!=null"> |
| | | and department_id in |
| | | <foreach collection="list" item="id" index="index" open="(" close=")" separator=","> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="classifyIdFront!=null and classifyIdFront!='' and classifyIdAfter!=null and classifyIdAfter!=''"> |
| | | and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%')) |
| | | </if> |
| | | |
| | | </where> |
| | | order by transaction_num |