已修改7个文件
85 ■■■■■ 文件已修改
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonationwitnessController.java 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceExternalpersonMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceExternalpersonService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceExternalpersonServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-project/src/main/resources/mapper/project/ServiceExternalpersonMapper.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceDonationwitnessController.java
@@ -130,13 +130,20 @@
    @PostMapping("/add")
    @RepeatSubmit
    public AjaxResult add(@RequestBody ServiceDonationwitness serviceDonationwitness) {
        log.info("新增捐献见证id为:{},infoId为:{}", serviceDonationwitness.getId(), serviceDonationwitness.getInfoid());
        ServiceDonationwitness sd=new ServiceDonationwitness();
        log.info("新增捐献见证infoId为:{}", serviceDonationwitness.getInfoid());
        ServiceDonationwitness sd = new ServiceDonationwitness();
        sd.setInfoid(serviceDonationwitness.getInfoid());
        sd.setDel_flag(0);
        List<ServiceDonationwitness> serviceDonationwitnesses = serviceDonationwitnessService.selectServiceDonationwitnessList(sd);
        boolean save = serviceDonationwitnessService.save(serviceDonationwitness);
        log.info("新增捐献见证是否成功:{},id为:{},infoId为:{}", save, serviceDonationwitness.getId(), serviceDonationwitness.getInfoid());
        if (CollectionUtils.isEmpty(serviceDonationwitnesses)) {
            boolean save = serviceDonationwitnessService.save(serviceDonationwitness);
            log.info("新增捐献见证是否成功:{},id为:{},infoId为:{}", save, serviceDonationwitness.getId(), serviceDonationwitness.getInfoid());
        } else {
            log.info("新增捐献见证id为:{}", serviceDonationwitnesses.get(0).getId());
            serviceDonationwitness.setId(serviceDonationwitnesses.get(0).getId());
            serviceDonationwitnessService.updateById(serviceDonationwitness);
        }
        return AjaxResult.success(serviceDonationwitness);
    }
ruoyi-admin/src/main/java/com/ruoyi/web/controller/project/ServiceExternalpersonController.java
@@ -6,6 +6,7 @@
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;
@@ -88,6 +89,21 @@
    @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);
@@ -127,4 +143,9 @@
    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));
    }
}
ruoyi-project/src/main/java/com/ruoyi/project/mapper/ServiceExternalpersonMapper.java
@@ -28,4 +28,6 @@
    List<ServiceExternalperson> getAllpeople(String usertype);
    ServiceExternalperson getInfoByUserNo(String userno);
    List<ServiceExternalperson> getInfoByIDCardNo(String idcardno);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/IServiceExternalpersonService.java
@@ -26,4 +26,6 @@
    ServiceExternalperson getInfoByUserNo(String userno);
    List<ServiceExternalperson> getInfoByIDCardNo(String idcardno);
}
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceExternalpersonServiceImpl.java
@@ -51,6 +51,9 @@
        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);
    }
@@ -81,4 +84,8 @@
        return serviceExternalpersonMapper.getInfoByUserNo(userno);
    }
    @Override
    public List<ServiceExternalperson> getInfoByIDCardNo(String idcardno) {
        return serviceExternalpersonMapper.getInfoByIDCardNo(idcardno);
    }
}
ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
@@ -136,7 +136,7 @@
        if (serviceReimbursement.getCreateTime() != null) {
            wrappers.eq(ServiceReimbursement::getCreateTime, serviceReimbursement.getCreateTime());
        }
        if (StringUtils.isNotBlank(serviceReimbursement.getUsername())) {
        if (!serviceReimbursement.getUsername().equals("shenji")) {
            wrappers.like(ServiceReimbursement::getUsername, serviceReimbursement.getUsername());
        }
        if (StringUtils.isNotBlank(serviceReimbursement.getTravelers())) {
ruoyi-project/src/main/resources/mapper/project/ServiceExternalpersonMapper.xml
@@ -32,30 +32,7 @@
    </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>
@@ -63,6 +40,7 @@
            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>
@@ -76,18 +54,20 @@
            <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>