| | |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.domain.BaseOnlyvalue; |
| | | import com.ruoyi.project.domain.ServiceDonatebaseinfo; |
| | | import com.ruoyi.project.service.IBaseOnlyvalueService; |
| | | import com.ruoyi.web.controller.common.OnlyValueCommon; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceExternalperson serviceExternalperson) { |
| | | //校验人员类型、身份证 |
| | | String usertype = serviceExternalperson.getUsertype(); |
| | | |
| | | if (usertype == null || usertype.isEmpty()) |
| | | { |
| | | return AjaxResult.error("新增人员需要确定人员类型!"); |
| | | } |
| | | if (!"org".equals(usertype)){ |
| | | String idcardno = serviceExternalperson.getIdcardno(); |
| | | List<ServiceExternalperson> existpsersons = serviceExternalpersonService.getInfoByIDCardNo(idcardno); |
| | | if (existpsersons.size() > 0) { |
| | | return AjaxResult.error("新增人员身份证" + idcardno + "已存在,人员信息不能重复添加!"); |
| | | } |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(serviceExternalperson.getUserno())) { |
| | | String zj = onlyValueCommon.addOnlyValue("zj"); |
| | | String formattedNumber = String.format("%05d", zj); |
| | |
| | | public AjaxResult getInfoByUserNo(@PathVariable("userno") String userno) { |
| | | return AjaxResult.success(serviceExternalpersonService.getInfoByUserNo(userno)); |
| | | } |
| | | |
| | | @GetMapping(value = "/getInfoByIDCardNo/{idcardno}") |
| | | public AjaxResult getInfoByIDCardNo(@PathVariable("idcardno") String idcardno) { |
| | | return AjaxResult.success(serviceExternalpersonService.getInfoByIDCardNo(idcardno)); |
| | | } |
| | | } |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceReimbursement serviceReimbursement) { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | |
| | | // serviceReimbursement.setCreateBy(user.getUserName()); |
| | | // serviceReimbursement.setUsername(user.getNickName()); |
| | | serviceReimbursement.setCreateBy(user.getUserName()); |
| | | serviceReimbursement.setUsername(user.getNickName()); |
| | | startPage(); |
| | | List<ServiceReimbursement> list = serviceReimbursementService.queryList(serviceReimbursement); |
| | | return getDataTable(list); |
| | |
| | | List<ServiceExternalperson> getAllpeople(String usertype); |
| | | |
| | | ServiceExternalperson getInfoByUserNo(String userno); |
| | | |
| | | List<ServiceExternalperson> getInfoByIDCardNo(String idcardno); |
| | | } |
| | |
| | | |
| | | |
| | | ServiceExternalperson getInfoByUserNo(String userno); |
| | | |
| | | List<ServiceExternalperson> getInfoByIDCardNo(String idcardno); |
| | | } |
| | |
| | | if (StringUtils.isNotBlank(serviceExternalperson.getUsertype())) { |
| | | wrappers.eq(ServiceExternalperson::getUsertype, serviceExternalperson.getUsertype()); |
| | | } |
| | | if (StringUtils.isNotBlank(serviceExternalperson.getUnitname())) { |
| | | wrappers.like(ServiceExternalperson::getUnitname, serviceExternalperson.getUnitname()); |
| | | } |
| | | return this.list(wrappers); |
| | | } |
| | | |
| | |
| | | return serviceExternalpersonMapper.getInfoByUserNo(userno); |
| | | } |
| | | |
| | | @Override |
| | | public List<ServiceExternalperson> getInfoByIDCardNo(String idcardno) { |
| | | return serviceExternalpersonMapper.getInfoByIDCardNo(idcardno); |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectServiceExternalpersonVo"> |
| | | select ID, |
| | | UserNo, |
| | | unit_tax_no, |
| | | UserName, |
| | | UserStatus, |
| | | IDCardNo, |
| | | UserType, |
| | | PersonnelUnitNo, |
| | | Sex, |
| | | Telephone, |
| | | Address, |
| | | UnitNo, |
| | | UnitName, |
| | | Title, |
| | | DepositBank, |
| | | BranchBankName, |
| | | BankCardNo, |
| | | del_flag, |
| | | create_by, |
| | | create_time, |
| | | update_by, |
| | | update_time, |
| | | PYM, |
| | | WBM |
| | | select * |
| | | from service_externalperson |
| | | </sql> |
| | | |
| | |
| | | resultMap="ServiceExternalpersonResult"> |
| | | <include refid="selectServiceExternalpersonVo"/> |
| | | <where> |
| | | service_externalperson.del_flag = 0 |
| | | <if test="userno != null and userno != ''">and UserNo = #{userno}</if> |
| | | <if test="username != null and username != ''">and UserName like concat('%', #{username}, '%')</if> |
| | | <if test="usertype != null and usertype != ''">and UserType = #{usertype}</if> |
| | |
| | | <if test="branchbankname != null and branchbankname != ''">and BranchBankName = #{branchbankname}</if> |
| | | <if test="bankcardno != null and bankcardno != ''">and BankCardNo = #{bankcardno}</if> |
| | | <if test="unitTaxNo != null and unitTaxNo != ''">and unit_tax_no = #{unitTaxNo}</if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getAllpeople" resultType="com.ruoyi.project.domain.ServiceExternalperson"> |
| | | <include refid="selectServiceExternalpersonVo"/> |
| | | where UserType = #{usertype} |
| | | where service_externalperson.del_flag = 0 and UserType = #{usertype} |
| | | </select> |
| | | <select id="getInfoByUserNo" resultType="com.ruoyi.project.domain.ServiceExternalperson"> |
| | | <include refid="selectServiceExternalpersonVo"/> |
| | | where UserNo = #{userno} |
| | | where del_flag = 0 and UserNo = #{userno} |
| | | </select> |
| | | |
| | | |
| | | <select id="getInfoByIDCardNo" resultType="com.ruoyi.project.domain.ServiceExternalperson"> |
| | | <include refid="selectServiceExternalpersonVo"/> |
| | | where del_flag = 0 and idcardno = #{idcardno} |
| | | </select> |
| | | </mapper> |