24 changed files with 2614 additions and 45 deletions
@ -0,0 +1,107 @@ |
|||||
|
package com.ccsens.carbasics.api; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.dto.AccountDto; |
||||
|
import com.ccsens.carbasics.bean.po.AccountManage; |
||||
|
import com.ccsens.carbasics.bean.vo.AccountVo; |
||||
|
import com.ccsens.carbasics.bean.vo.StatisticsVo; |
||||
|
import com.ccsens.carbasics.service.IAccountManageService; |
||||
|
import com.ccsens.cloudutil.annotation.MustLogin; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.validation.annotation.Validated; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Api(tags = "账户管理相关") |
||||
|
@RestController |
||||
|
@RequestMapping("/account") |
||||
|
public class AccountManageController { |
||||
|
|
||||
|
@Resource |
||||
|
private IAccountManageService accountManageService; |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "提交申请", notes = "") |
||||
|
@RequestMapping(value = "/submitAccount", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse submitAccount(@ApiParam @Validated @RequestBody QueryDto<AccountDto.SubmitAccount> params) throws Exception{ |
||||
|
log.info("提交申请开始{}",params); |
||||
|
accountManageService.submitAccount(params.getParam(),params.getUserId()); |
||||
|
log.info("提交申请结束"); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "修改审核状态", notes = "") |
||||
|
@RequestMapping(value = "/updateAccountStatus", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse updateAccountStatus(@ApiParam @Validated @RequestBody QueryDto<AccountDto.UpdateAccountStatus> params) throws Exception{ |
||||
|
log.info("修改审核状态开始{}",params); |
||||
|
accountManageService.updateAccountStatus(params.getParam(),params.getUserId()); |
||||
|
log.info("修改审核状态结束"); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "查询医院列表", notes = "") |
||||
|
@RequestMapping(value = "/queryHospital", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<AccountVo.HospitalList> queryHospital(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ |
||||
|
log.info("查询医院列表开始{}",params); |
||||
|
List<AccountVo.HospitalList> hospitalListList = accountManageService.queryHospital(params.getUserId()); |
||||
|
log.info("查询医院列表结束:{}",hospitalListList); |
||||
|
return JsonResponse.newInstance().ok(hospitalListList); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "查询部门与职位", notes = "") |
||||
|
@RequestMapping(value = "/queryDepartment", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<AccountVo.DepartmentList> queryDepartment(@ApiParam @Validated @RequestBody QueryDto params) throws Exception{ |
||||
|
log.info("查询部门与职位开始{}",params); |
||||
|
List<AccountVo.DepartmentList> departmentList = accountManageService.queryDepartment(params.getUserId()); |
||||
|
log.info("查询部门与职位结束:{}",departmentList); |
||||
|
return JsonResponse.newInstance().ok(departmentList); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "查询医院下的申请", notes = "") |
||||
|
@RequestMapping(value = "/queryApplyOfHospital", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<List<AccountVo.ApplyOfHospital>> queryApplyOfHospital(@ApiParam @Validated @RequestBody QueryDto<AccountDto.QueryApplyOfHospital> params) throws Exception{ |
||||
|
log.info("查询医院下的申请开始{}",params); |
||||
|
List<AccountVo.ApplyOfHospital> departmentList = accountManageService.queryApplyOfHospital(params.getParam(),params.getUserId()); |
||||
|
log.info("查询医院下的申请结束:{}",departmentList); |
||||
|
return JsonResponse.newInstance().ok(departmentList); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "查询申请列表", notes = "") |
||||
|
@RequestMapping(value = "/queryApplyList", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<List<AccountVo.ApplyOfHospital>> queryApplyList(@ApiParam @Validated @RequestBody QueryDto<AccountDto.QueryApplyList> params) throws Exception{ |
||||
|
log.info("查询申请列表开始{}",params); |
||||
|
List<AccountVo.ApplyOfHospital> departmentList = accountManageService.queryApplyList(params.getParam(),params.getUserId()); |
||||
|
log.info("查询申请列表结束:{}",departmentList); |
||||
|
return JsonResponse.newInstance().ok(departmentList); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "查询我的申请列表", notes = "") |
||||
|
@RequestMapping(value = "/queryMyApply", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<List<AccountVo.ApplyOfHospital>> queryMyApply(@ApiParam @Validated @RequestBody QueryDto<AccountDto.QueryApplyList> params) throws Exception{ |
||||
|
log.info("查询我的申请列表开始{}",params); |
||||
|
List<AccountVo.ApplyOfHospital> departmentList = accountManageService.queryMyApply(params.getParam(),params.getUserId()); |
||||
|
log.info("查询我的申请列表结束:{}",departmentList); |
||||
|
return JsonResponse.newInstance().ok(departmentList); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,62 @@ |
|||||
|
package com.ccsens.carbasics.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotNull; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
public class AccountDto { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("提交账户-入参") |
||||
|
public static class SubmitAccount{ |
||||
|
@ApiModelProperty("医院名称") |
||||
|
private String hospitalName; |
||||
|
@ApiModelProperty("部门名称") |
||||
|
private String departmentName; |
||||
|
@ApiModelProperty("部门code") |
||||
|
private String departmentCode; |
||||
|
@ApiModelProperty("职位名称") |
||||
|
private String positionName; |
||||
|
@ApiModelProperty("职位code") |
||||
|
private String positionCode; |
||||
|
@ApiModelProperty("提交人姓名") |
||||
|
private String submitter; |
||||
|
@ApiModelProperty("提交人手机号") |
||||
|
private String submitterPhone; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改提交账户状态-入参") |
||||
|
public static class UpdateAccountStatus { |
||||
|
@ApiModelProperty("账户id") |
||||
|
private Long accountManageId; |
||||
|
@ApiModelProperty("审核状态(1-通过,2-拒绝)") |
||||
|
private Byte status; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("查询医院下的申请-入参") |
||||
|
public static class QueryApplyOfHospital { |
||||
|
@NotNull |
||||
|
@ApiModelProperty("项目id") |
||||
|
private Long projectId; |
||||
|
@ApiModelProperty("审核状态(0-未审核,1-审核通过,2-审核拒绝)") |
||||
|
private Byte auditStatus; |
||||
|
@ApiModelProperty("申请人姓名") |
||||
|
private String name; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("查询申请列表-入参") |
||||
|
public static class QueryApplyList { |
||||
|
@ApiModelProperty("审核状态(0-未审核,1-审核通过,2-审核拒绝)") |
||||
|
private Byte auditStatus; |
||||
|
@ApiModelProperty("申请人姓名") |
||||
|
private String name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,172 @@ |
|||||
|
package com.ccsens.carbasics.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class AccountManage implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private String hospitalName; |
||||
|
|
||||
|
private String departmentName; |
||||
|
|
||||
|
private String departmentCode; |
||||
|
|
||||
|
private String positionName; |
||||
|
|
||||
|
private String positionCode; |
||||
|
|
||||
|
private String submitter; |
||||
|
|
||||
|
private String submitterPhone; |
||||
|
|
||||
|
private Long submitterUserId; |
||||
|
|
||||
|
private Long aduitUserId; |
||||
|
|
||||
|
private Byte auditStatus; |
||||
|
|
||||
|
private Date createdAt; |
||||
|
|
||||
|
private Date updatedAt; |
||||
|
|
||||
|
private Byte recStatus; |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getHospitalName() { |
||||
|
return hospitalName; |
||||
|
} |
||||
|
|
||||
|
public void setHospitalName(String hospitalName) { |
||||
|
this.hospitalName = hospitalName == null ? null : hospitalName.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getDepartmentName() { |
||||
|
return departmentName; |
||||
|
} |
||||
|
|
||||
|
public void setDepartmentName(String departmentName) { |
||||
|
this.departmentName = departmentName == null ? null : departmentName.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getDepartmentCode() { |
||||
|
return departmentCode; |
||||
|
} |
||||
|
|
||||
|
public void setDepartmentCode(String departmentCode) { |
||||
|
this.departmentCode = departmentCode == null ? null : departmentCode.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getPositionName() { |
||||
|
return positionName; |
||||
|
} |
||||
|
|
||||
|
public void setPositionName(String positionName) { |
||||
|
this.positionName = positionName == null ? null : positionName.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getPositionCode() { |
||||
|
return positionCode; |
||||
|
} |
||||
|
|
||||
|
public void setPositionCode(String positionCode) { |
||||
|
this.positionCode = positionCode == null ? null : positionCode.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getSubmitter() { |
||||
|
return submitter; |
||||
|
} |
||||
|
|
||||
|
public void setSubmitter(String submitter) { |
||||
|
this.submitter = submitter == null ? null : submitter.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getSubmitterPhone() { |
||||
|
return submitterPhone; |
||||
|
} |
||||
|
|
||||
|
public void setSubmitterPhone(String submitterPhone) { |
||||
|
this.submitterPhone = submitterPhone == null ? null : submitterPhone.trim(); |
||||
|
} |
||||
|
|
||||
|
public Long getSubmitterUserId() { |
||||
|
return submitterUserId; |
||||
|
} |
||||
|
|
||||
|
public void setSubmitterUserId(Long submitterUserId) { |
||||
|
this.submitterUserId = submitterUserId; |
||||
|
} |
||||
|
|
||||
|
public Long getAduitUserId() { |
||||
|
return aduitUserId; |
||||
|
} |
||||
|
|
||||
|
public void setAduitUserId(Long aduitUserId) { |
||||
|
this.aduitUserId = aduitUserId; |
||||
|
} |
||||
|
|
||||
|
public Byte getAuditStatus() { |
||||
|
return auditStatus; |
||||
|
} |
||||
|
|
||||
|
public void setAuditStatus(Byte auditStatus) { |
||||
|
this.auditStatus = auditStatus; |
||||
|
} |
||||
|
|
||||
|
public Date getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
public void setCreatedAt(Date createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
public void setUpdatedAt(Date updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
public Byte getRecStatus() { |
||||
|
return recStatus; |
||||
|
} |
||||
|
|
||||
|
public void setRecStatus(Byte recStatus) { |
||||
|
this.recStatus = recStatus; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", hospitalName=").append(hospitalName); |
||||
|
sb.append(", departmentName=").append(departmentName); |
||||
|
sb.append(", departmentCode=").append(departmentCode); |
||||
|
sb.append(", positionName=").append(positionName); |
||||
|
sb.append(", positionCode=").append(positionCode); |
||||
|
sb.append(", submitter=").append(submitter); |
||||
|
sb.append(", submitterPhone=").append(submitterPhone); |
||||
|
sb.append(", submitterUserId=").append(submitterUserId); |
||||
|
sb.append(", aduitUserId=").append(aduitUserId); |
||||
|
sb.append(", auditStatus=").append(auditStatus); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,61 @@ |
|||||
|
package com.ccsens.carbasics.bean.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
public class AccountVo { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("医院列表") |
||||
|
public static class HospitalList { |
||||
|
@ApiModelProperty("医院名称") |
||||
|
private String name; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("部门与职位") |
||||
|
public static class DepartmentList { |
||||
|
@ApiModelProperty("部门名称") |
||||
|
private String departmentName; |
||||
|
@ApiModelProperty("部门code") |
||||
|
private String departmentCode; |
||||
|
@ApiModelProperty("部门下的职位") |
||||
|
private List<Position> positions; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("职位") |
||||
|
public static class Position { |
||||
|
@ApiModelProperty("职位名称") |
||||
|
private String positionName; |
||||
|
@ApiModelProperty("职位code") |
||||
|
private String positionCode; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("查询医院下的申请-返参") |
||||
|
public static class ApplyOfHospital { |
||||
|
@ApiModelProperty("申请人名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("电话号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("医院名称") |
||||
|
private String hospitalName; |
||||
|
@ApiModelProperty("部门名称") |
||||
|
private String department; |
||||
|
@ApiModelProperty("职务名称") |
||||
|
private String position; |
||||
|
@ApiModelProperty("部门code") |
||||
|
private String departmentCode; |
||||
|
@ApiModelProperty("职位code") |
||||
|
private String positionCode; |
||||
|
@ApiModelProperty("审核状态(0-未审核,1-审核通过,2-审核拒绝)") |
||||
|
private Byte auditStatus; |
||||
|
} |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.ccsens.carbasics.persist.dao; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.vo.AccountVo; |
||||
|
import com.ccsens.carbasics.persist.mapper.AccountManageMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @author AUSU |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface AccountManageDao extends AccountManageMapper { |
||||
|
/** |
||||
|
* 根据医院名称查询申请列表 |
||||
|
* @param hospitalName 医院名称 |
||||
|
* @param auditStatus 审核状态 |
||||
|
* @param name 申请姓名 |
||||
|
* @param userId 申请人userId |
||||
|
* @return 申请列表 |
||||
|
*/ |
||||
|
List<AccountVo.ApplyOfHospital> queryApply(@Param("hospitalName") String hospitalName,@Param("status")Byte auditStatus,@Param("name")String name,@Param("userId")Long userId); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.carbasics.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.po.AccountManage; |
||||
|
import com.ccsens.carbasics.bean.po.AccountManageExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface AccountManageMapper { |
||||
|
long countByExample(AccountManageExample example); |
||||
|
|
||||
|
int deleteByExample(AccountManageExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(AccountManage record); |
||||
|
|
||||
|
int insertSelective(AccountManage record); |
||||
|
|
||||
|
List<AccountManage> selectByExample(AccountManageExample example); |
||||
|
|
||||
|
AccountManage selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") AccountManage record, @Param("example") AccountManageExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") AccountManage record, @Param("example") AccountManageExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(AccountManage record); |
||||
|
|
||||
|
int updateByPrimaryKey(AccountManage record); |
||||
|
} |
@ -0,0 +1,176 @@ |
|||||
|
package com.ccsens.carbasics.service; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import com.alibaba.fastjson.JSONArray; |
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.ccsens.carbasics.bean.dto.AccountDto; |
||||
|
import com.ccsens.carbasics.bean.po.AccountManage; |
||||
|
import com.ccsens.carbasics.bean.po.AccountManageExample; |
||||
|
import com.ccsens.carbasics.bean.po.Organization; |
||||
|
import com.ccsens.carbasics.bean.vo.AccountVo; |
||||
|
import com.ccsens.carbasics.persist.dao.AccountManageDao; |
||||
|
import com.ccsens.carbasics.persist.dao.OrganizationDao; |
||||
|
import com.ccsens.carbasics.persist.dao.OrganizationPositionDao; |
||||
|
import com.ccsens.carbasics.persist.dao.OrganizationProjectDao; |
||||
|
import com.ccsens.carbasics.util.Constant; |
||||
|
import com.ccsens.carbasics.util.DefaultCodeError; |
||||
|
import com.ccsens.common.bean.po.ConstantExample; |
||||
|
import com.ccsens.common.persist.mapper.ConstantMapper; |
||||
|
import com.ccsens.util.RedisUtil; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Propagation; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
||||
|
public class AccountManageService implements IAccountManageService { |
||||
|
|
||||
|
@Resource |
||||
|
private AccountManageDao accountManageDao; |
||||
|
@Resource |
||||
|
private QuestionnaireService questionnaireService; |
||||
|
@Resource |
||||
|
private OrganizationPositionDao positionDao; |
||||
|
@Resource |
||||
|
private RedisUtil redisUtil; |
||||
|
@Resource |
||||
|
private ConstantMapper constantMapper; |
||||
|
@Resource |
||||
|
private OrganizationProjectDao organizationProjectDao; |
||||
|
@Resource |
||||
|
private OrganizationDao organizationDao; |
||||
|
@Resource |
||||
|
private Snowflake snowflake; |
||||
|
@Override |
||||
|
public void submitAccount(AccountDto.SubmitAccount param, Long userId) { |
||||
|
AccountManage accountManage = new AccountManage(); |
||||
|
BeanUtil.copyProperties(param,accountManage); |
||||
|
accountManage.setId(snowflake.nextId()); |
||||
|
accountManage.setSubmitterUserId(userId); |
||||
|
accountManage.setAuditStatus((byte) 0); |
||||
|
accountManageDao.insertSelective(accountManage); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void updateAccountStatus(AccountDto.UpdateAccountStatus param, Long userId) { |
||||
|
AccountManage accountManage = new AccountManage(); |
||||
|
accountManage.setId(param.getAccountManageId()); |
||||
|
if (2 == param.getStatus()) { |
||||
|
accountManage.setAuditStatus(param.getStatus()); |
||||
|
accountManage.setAduitUserId(userId); |
||||
|
accountManageDao.updateByPrimaryKeySelective(accountManage); |
||||
|
} |
||||
|
accountManage.setAuditStatus(param.getStatus()); |
||||
|
accountManage.setAduitUserId(userId); |
||||
|
accountManageDao.updateByPrimaryKeySelective(accountManage); |
||||
|
|
||||
|
//创建项目
|
||||
|
AccountManage accountManageInfo = accountManageDao.selectByPrimaryKey(param.getAccountManageId()); |
||||
|
//查询职位id
|
||||
|
Long positionId = positionDao.queryByName(accountManageInfo.getPositionName()); |
||||
|
questionnaireService.createHospitalAndProject(accountManageInfo.getSubmitterPhone(),accountManageInfo.getSubmitterUserId(),"", |
||||
|
accountManage.getHospitalName(),accountManage.getDepartmentName(),accountManage.getSubmitter(),positionId,accountManage.getDepartmentCode()); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public List<AccountVo.HospitalList> queryHospital(Long userId) { |
||||
|
List<AccountVo.HospitalList> hospitalListList = new ArrayList<>(); |
||||
|
List<Object> objects = redisUtil.lGet(Constant.HOSPITAL_LIST_KEY, 0, -1); |
||||
|
log.info("redis获取到的医院信息{}",objects); |
||||
|
if (CollectionUtil.isNotEmpty(objects)) { |
||||
|
for (Object object : objects) { |
||||
|
String hospital = (String) object; |
||||
|
String[] split = hospital.split(","); |
||||
|
for (String hospitalName : split) { |
||||
|
AccountVo.HospitalList hospitalList = new AccountVo.HospitalList(); |
||||
|
hospitalList.setName(hospitalName); |
||||
|
hospitalListList.add(hospitalList); |
||||
|
} |
||||
|
} |
||||
|
return hospitalListList; |
||||
|
} |
||||
|
//查询常量
|
||||
|
ConstantExample constantExample = new ConstantExample(); |
||||
|
constantExample.createCriteria().andBusinessTypeEqualTo((byte) 2) |
||||
|
.andTKeyEqualTo(Constant.HOSPITAL_LIST_KEY); |
||||
|
List<com.ccsens.common.bean.po.Constant> constantList = constantMapper.selectByExample(constantExample); |
||||
|
if (CollectionUtil.isNotEmpty(constantList)) { |
||||
|
String value = constantList.get(0).gettValue(); |
||||
|
String[] hospitalList = value.split(","); |
||||
|
for (String hospitalName : hospitalList) { |
||||
|
AccountVo.HospitalList hospital = new AccountVo.HospitalList(); |
||||
|
hospital.setName(hospitalName); |
||||
|
hospitalListList.add(hospital); |
||||
|
redisUtil.lSet(Constant.HOSPITAL_LIST_KEY,hospitalName); |
||||
|
} |
||||
|
} |
||||
|
return hospitalListList; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public List<AccountVo.DepartmentList> queryDepartment(Long userId) { |
||||
|
List<AccountVo.DepartmentList> departmentList = new ArrayList<>(); |
||||
|
List<Object> objects = redisUtil.lGet(Constant.DEPARTMENT_POSITION_KEY, 0, -1); |
||||
|
log.info("redis获取到的职位信息{}",objects); |
||||
|
if (CollectionUtil.isNotEmpty(objects)) { |
||||
|
for (Object object : objects) { |
||||
|
AccountVo.DepartmentList departmentListRedis = (AccountVo.DepartmentList) object; |
||||
|
departmentList.add(departmentListRedis); |
||||
|
} |
||||
|
return departmentList; |
||||
|
} |
||||
|
//查询常量
|
||||
|
ConstantExample constantExample = new ConstantExample(); |
||||
|
constantExample.createCriteria().andBusinessTypeEqualTo((byte) 2) |
||||
|
.andTKeyEqualTo(Constant.DEPARTMENT_POSITION_KEY); |
||||
|
List<com.ccsens.common.bean.po.Constant> constantList = constantMapper.selectByExample(constantExample); |
||||
|
if (CollectionUtil.isNotEmpty(constantList)) { |
||||
|
JSONArray jsonArray = JSONObject.parseArray(constantList.get(0).gettValue()); |
||||
|
List<AccountVo.DepartmentList> departmentLists = jsonArray.toJavaList(AccountVo.DepartmentList.class); |
||||
|
for (AccountVo.DepartmentList list : departmentLists) { |
||||
|
redisUtil.lSet(Constant.DEPARTMENT_POSITION_KEY,list); |
||||
|
} |
||||
|
} |
||||
|
return departmentList; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public List<AccountVo.ApplyOfHospital> queryApplyOfHospital(AccountDto.QueryApplyOfHospital param, Long userId) { |
||||
|
Long hospitalId = organizationProjectDao.queryByProjectId(param.getProjectId()); |
||||
|
if (ObjectUtil.isNull(hospitalId)) { |
||||
|
throw new BaseException(DefaultCodeError.PROJECT_ERROR); |
||||
|
} |
||||
|
Organization organization = organizationDao.selectByPrimaryKey(hospitalId); |
||||
|
return accountManageDao.queryApply(organization.getName(),param.getAuditStatus(),param.getName(),null); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public List<AccountVo.ApplyOfHospital> queryApplyList(AccountDto.QueryApplyList param, Long userId) { |
||||
|
return accountManageDao.queryApply("",param.getAuditStatus(),param.getName(),null); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public List<AccountVo.ApplyOfHospital> queryMyApply(AccountDto.QueryApplyList param, Long userId) { |
||||
|
return accountManageDao.queryApply("",null,"",userId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.ccsens.carbasics.service; |
||||
|
|
||||
|
import com.ccsens.carbasics.bean.dto.AccountDto; |
||||
|
import com.ccsens.carbasics.bean.vo.AccountVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface IAccountManageService { |
||||
|
|
||||
|
/** |
||||
|
* 提交账户 |
||||
|
* @param param 入参 |
||||
|
* @param userId 用户id |
||||
|
*/ |
||||
|
void submitAccount(AccountDto.SubmitAccount param, Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 修改账户状态 |
||||
|
* @param param 入参 |
||||
|
* @param userId 用户id |
||||
|
*/ |
||||
|
void updateAccountStatus(AccountDto.UpdateAccountStatus param, Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询医院列表 |
||||
|
* @param userId 用户id |
||||
|
* @return 医院列表 |
||||
|
*/ |
||||
|
List<AccountVo.HospitalList> queryHospital(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询部门列表及职位 |
||||
|
* @param userId 用户id |
||||
|
* @return 部门列表及职位 |
||||
|
*/ |
||||
|
List<AccountVo.DepartmentList> queryDepartment(Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询医院下的申请 |
||||
|
* @param param 项目id |
||||
|
* @param userId 用户id |
||||
|
* @return 医院下的申请列表 |
||||
|
*/ |
||||
|
List<AccountVo.ApplyOfHospital> queryApplyOfHospital(AccountDto.QueryApplyOfHospital param, Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询申请列表(后台管理) |
||||
|
* @param param 参数 |
||||
|
* @param userId 用户id |
||||
|
* @return 申请列表 |
||||
|
*/ |
||||
|
List<AccountVo.ApplyOfHospital> queryApplyList(AccountDto.QueryApplyList param, Long userId); |
||||
|
|
||||
|
/** |
||||
|
* 查询我的申请列表 |
||||
|
* @param param 入参 |
||||
|
* @param userId 用户id |
||||
|
* @return 我的申请列表 |
||||
|
*/ |
||||
|
List<AccountVo.ApplyOfHospital> queryMyApply(AccountDto.QueryApplyList param, Long userId); |
||||
|
} |
@ -1,4 +1,4 @@ |
|||||
spring: |
spring: |
||||
profiles: |
profiles: |
||||
active: prod |
active: test |
||||
include: common, util-prod |
include: common, util-test |
||||
|
@ -0,0 +1,34 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.carbasics.persist.dao.AccountManageDao"> |
||||
|
|
||||
|
|
||||
|
<select id="queryApply" resultType="com.ccsens.carbasics.bean.vo.AccountVo$ApplyOfHospital"> |
||||
|
SELECT |
||||
|
submitter AS NAME, |
||||
|
submitter_phone AS phone, |
||||
|
hospital_name, |
||||
|
department_name AS department, |
||||
|
department_code, |
||||
|
position_name AS position, |
||||
|
position_code, |
||||
|
audit_status |
||||
|
FROM |
||||
|
t_qcp_account_manage |
||||
|
WHERE |
||||
|
rec_status = 0 |
||||
|
<if test="hospitalName != null and hospitalName != ''"> |
||||
|
AND hospital_name = #{hospitalName} |
||||
|
</if> |
||||
|
<if test="name != null and name != ''"> |
||||
|
AND submitter = #{name} |
||||
|
</if> |
||||
|
<if test="status != null"> |
||||
|
AND audit_status = #{status} |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
AND submitter_user_id = #{userId} |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,354 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.ccsens.carbasics.persist.mapper.AccountManageMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.carbasics.bean.po.AccountManage"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="hospital_name" jdbcType="VARCHAR" property="hospitalName" /> |
||||
|
<result column="department_name" jdbcType="VARCHAR" property="departmentName" /> |
||||
|
<result column="department_code" jdbcType="VARCHAR" property="departmentCode" /> |
||||
|
<result column="position_name" jdbcType="VARCHAR" property="positionName" /> |
||||
|
<result column="position_code" jdbcType="VARCHAR" property="positionCode" /> |
||||
|
<result column="submitter" jdbcType="VARCHAR" property="submitter" /> |
||||
|
<result column="submitter_phone" jdbcType="VARCHAR" property="submitterPhone" /> |
||||
|
<result column="submitter_user_id" jdbcType="BIGINT" property="submitterUserId" /> |
||||
|
<result column="aduit_user_id" jdbcType="BIGINT" property="aduitUserId" /> |
||||
|
<result column="audit_status" jdbcType="TINYINT" property="auditStatus" /> |
||||
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
||||
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
||||
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, hospital_name, department_name, department_code, position_name, position_code, |
||||
|
submitter, submitter_phone, submitter_user_id, aduit_user_id, audit_status, created_at, |
||||
|
updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.carbasics.bean.po.AccountManageExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_qcp_account_manage |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_qcp_account_manage |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_qcp_account_manage |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.carbasics.bean.po.AccountManageExample"> |
||||
|
delete from t_qcp_account_manage |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.carbasics.bean.po.AccountManage"> |
||||
|
insert into t_qcp_account_manage (id, hospital_name, department_name, |
||||
|
department_code, position_name, position_code, |
||||
|
submitter, submitter_phone, submitter_user_id, |
||||
|
aduit_user_id, audit_status, created_at, |
||||
|
updated_at, rec_status) |
||||
|
values (#{id,jdbcType=BIGINT}, #{hospitalName,jdbcType=VARCHAR}, #{departmentName,jdbcType=VARCHAR}, |
||||
|
#{departmentCode,jdbcType=VARCHAR}, #{positionName,jdbcType=VARCHAR}, #{positionCode,jdbcType=VARCHAR}, |
||||
|
#{submitter,jdbcType=VARCHAR}, #{submitterPhone,jdbcType=VARCHAR}, #{submitterUserId,jdbcType=BIGINT}, |
||||
|
#{aduitUserId,jdbcType=BIGINT}, #{auditStatus,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.carbasics.bean.po.AccountManage"> |
||||
|
insert into t_qcp_account_manage |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="hospitalName != null"> |
||||
|
hospital_name, |
||||
|
</if> |
||||
|
<if test="departmentName != null"> |
||||
|
department_name, |
||||
|
</if> |
||||
|
<if test="departmentCode != null"> |
||||
|
department_code, |
||||
|
</if> |
||||
|
<if test="positionName != null"> |
||||
|
position_name, |
||||
|
</if> |
||||
|
<if test="positionCode != null"> |
||||
|
position_code, |
||||
|
</if> |
||||
|
<if test="submitter != null"> |
||||
|
submitter, |
||||
|
</if> |
||||
|
<if test="submitterPhone != null"> |
||||
|
submitter_phone, |
||||
|
</if> |
||||
|
<if test="submitterUserId != null"> |
||||
|
submitter_user_id, |
||||
|
</if> |
||||
|
<if test="aduitUserId != null"> |
||||
|
aduit_user_id, |
||||
|
</if> |
||||
|
<if test="auditStatus != null"> |
||||
|
audit_status, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
#{id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="hospitalName != null"> |
||||
|
#{hospitalName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="departmentName != null"> |
||||
|
#{departmentName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="departmentCode != null"> |
||||
|
#{departmentCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="positionName != null"> |
||||
|
#{positionName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="positionCode != null"> |
||||
|
#{positionCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="submitter != null"> |
||||
|
#{submitter,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="submitterPhone != null"> |
||||
|
#{submitterPhone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="submitterUserId != null"> |
||||
|
#{submitterUserId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="aduitUserId != null"> |
||||
|
#{aduitUserId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="auditStatus != null"> |
||||
|
#{auditStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
#{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.ccsens.carbasics.bean.po.AccountManageExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_qcp_account_manage |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_qcp_account_manage |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.hospitalName != null"> |
||||
|
hospital_name = #{record.hospitalName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.departmentName != null"> |
||||
|
department_name = #{record.departmentName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.departmentCode != null"> |
||||
|
department_code = #{record.departmentCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.positionName != null"> |
||||
|
position_name = #{record.positionName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.positionCode != null"> |
||||
|
position_code = #{record.positionCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.submitter != null"> |
||||
|
submitter = #{record.submitter,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.submitterPhone != null"> |
||||
|
submitter_phone = #{record.submitterPhone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.submitterUserId != null"> |
||||
|
submitter_user_id = #{record.submitterUserId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.aduitUserId != null"> |
||||
|
aduit_user_id = #{record.aduitUserId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.auditStatus != null"> |
||||
|
audit_status = #{record.auditStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.recStatus != null"> |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_qcp_account_manage |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
hospital_name = #{record.hospitalName,jdbcType=VARCHAR}, |
||||
|
department_name = #{record.departmentName,jdbcType=VARCHAR}, |
||||
|
department_code = #{record.departmentCode,jdbcType=VARCHAR}, |
||||
|
position_name = #{record.positionName,jdbcType=VARCHAR}, |
||||
|
position_code = #{record.positionCode,jdbcType=VARCHAR}, |
||||
|
submitter = #{record.submitter,jdbcType=VARCHAR}, |
||||
|
submitter_phone = #{record.submitterPhone,jdbcType=VARCHAR}, |
||||
|
submitter_user_id = #{record.submitterUserId,jdbcType=BIGINT}, |
||||
|
aduit_user_id = #{record.aduitUserId,jdbcType=BIGINT}, |
||||
|
audit_status = #{record.auditStatus,jdbcType=TINYINT}, |
||||
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.carbasics.bean.po.AccountManage"> |
||||
|
update t_qcp_account_manage |
||||
|
<set> |
||||
|
<if test="hospitalName != null"> |
||||
|
hospital_name = #{hospitalName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="departmentName != null"> |
||||
|
department_name = #{departmentName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="departmentCode != null"> |
||||
|
department_code = #{departmentCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="positionName != null"> |
||||
|
position_name = #{positionName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="positionCode != null"> |
||||
|
position_code = #{positionCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="submitter != null"> |
||||
|
submitter = #{submitter,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="submitterPhone != null"> |
||||
|
submitter_phone = #{submitterPhone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="submitterUserId != null"> |
||||
|
submitter_user_id = #{submitterUserId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="aduitUserId != null"> |
||||
|
aduit_user_id = #{aduitUserId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="auditStatus != null"> |
||||
|
audit_status = #{auditStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="recStatus != null"> |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.carbasics.bean.po.AccountManage"> |
||||
|
update t_qcp_account_manage |
||||
|
set hospital_name = #{hospitalName,jdbcType=VARCHAR}, |
||||
|
department_name = #{departmentName,jdbcType=VARCHAR}, |
||||
|
department_code = #{departmentCode,jdbcType=VARCHAR}, |
||||
|
position_name = #{positionName,jdbcType=VARCHAR}, |
||||
|
position_code = #{positionCode,jdbcType=VARCHAR}, |
||||
|
submitter = #{submitter,jdbcType=VARCHAR}, |
||||
|
submitter_phone = #{submitterPhone,jdbcType=VARCHAR}, |
||||
|
submitter_user_id = #{submitterUserId,jdbcType=BIGINT}, |
||||
|
aduit_user_id = #{aduitUserId,jdbcType=BIGINT}, |
||||
|
audit_status = #{auditStatus,jdbcType=TINYINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
Loading…
Reference in new issue