| | |
| | | @ApiOperation(value = "新增", notes = "传入information") |
| | | public R save(@Valid @RequestBody Information information) { |
| | | Dept dept = new Dept(); |
| | | String departmentid = information.getDepartmentid(); |
| | | Long l = Long.parseLong(departmentid); |
| | | //String departmentid = information.getDepartmentid(); |
| | | //Long l = Long.parseLong(departmentid); |
| | | //自招保安公司 |
| | | if (information.getStats().equals("0")) { |
| | | Long i = 1420222768149966850L; |
| | |
| | | dept.setAncestors("0,1420222961377357825"); |
| | | dept.setDeptCategory(1); |
| | | } |
| | | dept.setId(l); |
| | | //dept.setId(l); |
| | | if (iDeptService.submit(dept)) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | |
| | | * 保安员统计 |
| | | */ |
| | | @PostMapping("/selectLi") |
| | | public R selectLi(String jurisdiction, String deptid) { |
| | | List<Map<Object, Object>> list = informationService.selectLi(jurisdiction, deptid); |
| | | public R selectLi(String jurisdiction, String deptid,Integer current,Integer size) { |
| | | List<Map<Object, Object>> list = informationService.selectLi(jurisdiction, deptid,current,size); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | * 业务统计情况 |
| | | */ |
| | | @PostMapping("/selectYw") |
| | | public R selectYw(String jurisdiction, String deptid) { |
| | | List<Map<Object, Object>> list = informationService.selectYw(jurisdiction, deptid); |
| | | public R selectYw(String jurisdiction, String deptid,Integer current,Integer size) { |
| | | List<Map<Object, Object>> list = informationService.selectYw(jurisdiction, deptid,current,size); |
| | | return R.data(list); |
| | | } |
| | | |
| | |
| | | Map<String, String> queryYearPz(String year,String jurisdiction,String deptid); |
| | | Map<String, String> queryYearAn(String year,String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountB(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectLi(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectLi(String jurisdiction,String deptid,Integer current,Integer size); |
| | | List<Map<Object,Object>> queryCountZc(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountCz(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountSb(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountKh(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> queryCountPq(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectYw(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectYw(String jurisdiction,String deptid,Integer current,Integer size); |
| | | List<Map<Object,Object>> selectUIn(String deptid,String name,String hold,String photo,String examinationtype,String dispatch,String soil); |
| | | List<Map<Object,Object>> selectJur(); |
| | | int selectExtypeUser(); |
| | |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and u.dept_id =#{deptid} |
| | | </if> |
| | | <if test="type!=null and type=='1'"> |
| | | and to_days(u.update_time) = to_days(now()); |
| | | <if test="type!=null and type=='1'.toString()"> |
| | | and to_days(u.update_time) = to_days(now()) |
| | | </if> |
| | | <if test="type!=null and type=='2'"> |
| | | <if test="type!=null and type=='2'.toString()"> |
| | | and DATE_FORMAT(u.update_time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' ) |
| | | </if> |
| | | GROUP BY d.dept_name,u.real_name, |
| | |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and u.departmentid =#{deptid} |
| | | </if> |
| | | <if test="type!=null and type=='1'"> |
| | | and to_days(u.time) = to_days(now()); |
| | | <if test="type!=null and type=='1'.toString()"> |
| | | and to_days(u.time) = to_days(now()) |
| | | </if> |
| | | <if test="type!=null and type=='2'"> |
| | | <if test="type!=null and type=='2'.toString()"> |
| | | and DATE_FORMAT(u.time, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' ) |
| | | </if> |
| | | GROUP BY d.dept_name, |
| | |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and A.dept_id =#{deptid} |
| | | </if> |
| | | limit #{current},#{size}; |
| | | </select> |
| | | |
| | | <select id="seCountI" resultType="java.util.HashMap"> |
| | |
| | | <if test="deptid!=null and deptid!=''"> |
| | | and A.departmentid=#{deptid} |
| | | </if> |
| | | limit #{current},#{size}; |
| | | </select> |
| | | |
| | | <!--保安人员详情--> |
| | |
| | | Map selectWPcount(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectIn(String jurisdiction); |
| | | void deleteDept(String ids); |
| | | List<Map<Object,Object>> selectLi(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectLi(String jurisdiction,String deptid,Integer current,Integer size); |
| | | List<Map<Object,Object>> seCountI(String jurisdiction,String deptid); |
| | | String seCountUm(String jurisdiction,String deptid); |
| | | String seCountUg(String jurisdiction,String deptid); |
| | | Map<String, String> queryYearPz(String year,String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectTb(String jurisdiction,String enterpriseName,Integer current,Integer size); |
| | | List<Map<Object,Object>> selectJj(String jurisdiction,String enterpriseName,Integer current,Integer size); |
| | | List<Map<Object,Object>> selectYw(String jurisdiction,String deptid); |
| | | List<Map<Object,Object>> selectYw(String jurisdiction,String deptid,Integer current,Integer size); |
| | | List<Map<Object,Object>> selectUIn(String deptid,String name,String hold,String photo,String examinationtype,String dispatch,String soil); |
| | | List<Map<Object,Object>> selectDis(String jurisdiction,String deptid,String fid,Integer current,Integer size); |
| | | List<Map<Object,Object>> selectFw(); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectLi(String jurisdiction, String deptid) { |
| | | return baseMapper.selectLi(jurisdiction, deptid); |
| | | public List<Map<Object, Object>> selectLi(String jurisdiction, String deptid,Integer current,Integer size) { |
| | | return baseMapper.selectLi(jurisdiction, deptid,current,size); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<Map<Object, Object>> selectYw(String jurisdiction, String deptid) { |
| | | return baseMapper.selectYw(jurisdiction, deptid); |
| | | public List<Map<Object, Object>> selectYw(String jurisdiction, String deptid,Integer current,Integer size) { |
| | | return baseMapper.selectYw(jurisdiction, deptid,current,size); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.cache.ParamCache; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.DigestUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.service.IInformationService; |
| | | import org.springblade.modules.permit.entity.Permit; |
| | | import org.springblade.modules.permit.service.IPermitService; |
| | | import org.springblade.modules.permit.vo.PermitVO; |
| | | import org.springblade.modules.punish.entity.Punish; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | |
| | | import static org.springblade.common.constant.CommonConstant.DEFAULT_PARAM_PASSWORD; |
| | | import static org.springblade.core.cache.constant.CacheConstant.SYS_CACHE; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * 控制器 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-12 |
| | |
| | | public class PermitController extends BladeController { |
| | | |
| | | private final IPermitService permitService; |
| | | |
| | | private final IDeptService iDeptService; |
| | | private final IInformationService informationService; |
| | | private final IUserService userService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入permit") |
| | | public R update(@Valid @RequestBody Permit permit) { |
| | | //审核通过 |
| | | if (permit.getType().equals("0")) { |
| | | //新增组织机构和单位信息 |
| | | Information information =new Information(); |
| | | information.setCreditcode(permit.getCreditcode()); |
| | | information.setEnterprisename(permit.getEnterprisename()); |
| | | information.setRepresentative(permit.getRepresentative()); |
| | | information.setEstablishtime(permit.getEstablishtime()); |
| | | information.setRegisteredcapital(permit.getRegisteredcapital()); |
| | | information.setOrganizationcode(permit.getOrganizationcode()); |
| | | information.setRegistrationnumber(permit.getRegistrationnumber()); |
| | | information.setEnterprises(permit.getEnterprises()); |
| | | information.setAddress(permit.getAddress()); |
| | | information.setBusiness(permit.getBusiness()); |
| | | information.setRegion(permit.getRegion()); |
| | | information.setRegistration(permit.getRegistration()); |
| | | information.setIndustry(permit.getIndustry()); |
| | | information.setRepresentativecell(permit.getRepresentativecell()); |
| | | information.setContacts(permit.getContacts()); |
| | | information.setContactscell(permit.getContactscell()); |
| | | Dept dept = new Dept(); |
| | | Long i = 1413470343230877697L; |
| | | dept.setParentId(i); |
| | | dept.setTenantId("000000"); |
| | | dept.setDeptName(information.getEnterprisename()); |
| | | dept.setAncestors("0,1413470343230877697"); |
| | | dept.setDeptCategory(1); |
| | | if (iDeptService.submit(dept)) { |
| | | CacheUtil.clear(SYS_CACHE); |
| | | // 返回懒加载树更新节点所需字段 |
| | | Kv kv = Kv.create().set("id", String.valueOf(dept.getId())).set("tenantId", dept.getTenantId()) |
| | | .set("deptCategoryName", DictCache.getValue(DictEnum.ORG_CATEGORY, dept.getDeptCategory())); |
| | | String id = kv.get("id").toString(); |
| | | information.setDepartmentid(id); |
| | | } |
| | | informationService.save(information); |
| | | //注册用户 |
| | | User user = new User(); |
| | | user.setAccount(permit.getEnterprisename()); |
| | | String initPassword = ParamCache.getValue(DEFAULT_PARAM_PASSWORD); |
| | | user.setPassword(initPassword); |
| | | userService.saveOrUpdate(user); |
| | | } |
| | | return R.status(permitService.updateById(permit)); |
| | | } |
| | | |