| | |
| | | |
| | | |
| | | //minio内网ip |
| | | String ip = "http://47.49.21.216:9000"; |
| | | //tring ip = "http://223.82.109.183:2081"; |
| | | //String ip = "http://47.49.21.216:9000"; |
| | | String ip = "http://223.82.109.183:2081"; |
| | | |
| | | //String jsonUrl = "/home/zhongsong/anbao/"; |
| | | String jsonUrl = "D:\\anbao\\"; |
| | |
| | | |
| | | //数据推送 |
| | | String s1 = |
| | | "insert into sys_equipage(id,name,number,specifications,mode,dept_id,brand,date_for_production,jurisdiction,user_id,num) " + |
| | | "insert into sys_equipage(id,name,number,specifications,mode,dept_id,brand,date_for_production,jurisdiction,person_in_charge,num) " + |
| | | "values(" + "'" + equipage.getId() + "'" + "," + |
| | | "'" + equipage.getName() + "'" + "," + |
| | | "'" + equipage.getNumber() + "'" + "," + |
| | |
| | | "'" + equipage.getBrand() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd").format(equipage.getDateForProduction()) + "'" + "," + |
| | | "'" + equipage.getJurisdiction() + "'" + "," + |
| | | "'" + equipage.getUserId() + "'" + "," + |
| | | "'" + equipage.getPersonInCharge() + "'" + "," + |
| | | "'" +equipage.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | }else { |
| | |
| | | ",brand = " + "'" + equipage.getBrand() + "'" + |
| | | ",date_for_production = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(equipage.getDateForProduction()) + "'" + |
| | | ",jurisdiction = " + "'" + equipage.getJurisdiction() + "'" + |
| | | ",user_id = " + "'" + equipage.getUserId() + "'" + |
| | | ",num = " + "'" + equipage.getNum() + "'" + |
| | | ",person_in_charge = " + "'" + equipage.getPersonInCharge() + "'" + |
| | | " " +"where id = " + "'" + equipage.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | } |
| | |
| | | information.setDepartmentid(id); |
| | | } |
| | | informationService.save(information); |
| | | String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(information.getEstablishtime()); |
| | | String formatStr = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()); |
| | | //Integer id = information.getId(); |
| | | String s = "insert into sys_information(id,creditCode,enterpriseName,representative,establishTime," + |
| | | "registeredCapital,organizationCode,registrationNumber, enterprises, address," + |
| | |
| | | @ApiOperation(value = "修改", notes = "传入information") |
| | | public R update(@Valid @RequestBody Information information) throws Exception { |
| | | informationService.updateById(information); |
| | | String businessLicense=null; |
| | | String licence=null; |
| | | String format=""; |
| | | if(information.getBusinessLicense()!=null && !"".equals(information.getBusinessLicense())){ |
| | | businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length()); |
| | | String businessLicense = null; |
| | | String businessLicenses = null; |
| | | String licence = null; |
| | | String licences = null; |
| | | String format = ""; |
| | | if (information.getBusinessLicense() != null && !"".equals(information.getBusinessLicense())) { |
| | | businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length()); |
| | | businessLicenses = FtpConstant.ip + businessLicense; |
| | | } else { |
| | | businessLicenses = ""; |
| | | } |
| | | if(information.getLicence()!=null && !"".equals(information.getLicence())){ |
| | | licence = information.getLicence().substring(26, information.getLicence().length()); |
| | | if (information.getLicence() != null && !"".equals(information.getLicence())) { |
| | | licence = information.getLicence().substring(26, information.getLicence().length()); |
| | | licences = FtpConstant.ip + licence; |
| | | } else { |
| | | licences = ""; |
| | | } |
| | | if (information.getEstablishtime()!=null && !"".equals(information.getEstablishtime())){ |
| | | format = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()); |
| | | if (information.getEstablishtime() != null && !"".equals(information.getEstablishtime())) { |
| | | format = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()); |
| | | } |
| | | //内网同步 |
| | | String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" + |
| | |
| | | ",representativecell = " + "'" + information.getRepresentativecell() + "'" + |
| | | ",contacts = " + "'" + information.getContacts() + "'" + |
| | | ",contactscell = " + "'" + information.getContactscell() + "'" + |
| | | ",business_License = " + "'" + FtpConstant.ip + businessLicense + "'" + |
| | | ",licence = " + "'" + FtpConstant.ip + licence + "'" + |
| | | ",business_License = " + "'" + businessLicenses + "'" + |
| | | ",licence = " + "'" + licences + "'" + |
| | | " " + "where id = " + "'" + information.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.success("修改成功"); |
| | |
| | | * 统计保安员资格异常的数量 |
| | | */ |
| | | @PostMapping("/selectExtype") |
| | | public R selectExtype(String deptid,String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectExtype(deptid,jurisdiction); |
| | | public R selectExtype(String deptid, String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectExtype(deptid, jurisdiction); |
| | | return R.data(lists); |
| | | } |
| | | |
| | |
| | | * 统计保安员持证的数量 |
| | | */ |
| | | @PostMapping("/selectHold") |
| | | public R selectHold(String deptid,String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectHold(deptid,jurisdiction); |
| | | public R selectHold(String deptid, String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectHold(deptid, jurisdiction); |
| | | return R.data(lists); |
| | | } |
| | | |
| | |
| | | * 保安派遣数量统计 |
| | | */ |
| | | @PostMapping("/selectDisp") |
| | | public R selectDisp(String deptid,String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectDisp(deptid,jurisdiction); |
| | | public R selectDisp(String deptid, String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectDisp(deptid, jurisdiction); |
| | | return R.data(lists); |
| | | } |
| | | |
| | |
| | | * 社保统计 |
| | | */ |
| | | @PostMapping("/selectSoil") |
| | | public R selectSoil(String deptid,String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectSoil(deptid,jurisdiction); |
| | | public R selectSoil(String deptid, String jurisdiction) { |
| | | List<Map<Object, Object>> lists = informationService.selectSoil(deptid, jurisdiction); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | for (int i = 0; i < lists.size(); i++) { |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | |
| | | List list = informationService.queryYearKh(year, jurisdiction, deptid); |
| | | return list; |
| | | } |
| | | |
| | | //升序 |
| | | public static Map<String, String> sortMapBykeyAsc(Map<String, String> oriMap) { |
| | | Map<String, String> sortedMap = new LinkedHashMap<String, String>(); |
| | |
| | | * 成立日期 |
| | | */ |
| | | @ApiModelProperty(value = "成立日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @TableField("establishTime") |
| | | private Date establishtime; |
| | | /** |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.equipage.excel.EquipageExcel; |
| | | import org.springblade.modules.member.entity.Member; |
| | | import org.springblade.modules.member.excel.memberExcel; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入member") |
| | | public R save(@Valid @RequestBody Member member) throws Exception { |
| | | //arg.test01(arg.url+"/member/save",member); |
| | | return R.status(memberService.save(member)); |
| | | boolean save = memberService.save(member); |
| | | String s1 = |
| | | "insert into sys_member(id,name,post,cardid,cell,creditCode) " + |
| | | "values(" + "'" + member.getId() + "'" + "," + |
| | | "'" + member.getName() + "'" + "," + |
| | | "'" + member.getPost() + "'" + "," + |
| | | "'" + member.getCardid() + "'" + "," + |
| | | "'" + member.getCell() + "'"+"," + |
| | | "'" + member.getCreditcode() + "'"+")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.status(save); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入member") |
| | | public R update(@Valid @RequestBody Member member) throws Exception { |
| | | //arg.test01(arg.url+"/member/update",member); |
| | | return R.status(memberService.updateById(member)); |
| | | boolean b = memberService.updateById(member); |
| | | String s1 = "update sys_member set name = " + "'" + member.getName() + "'" + |
| | | ",post = " + "'" + member.getPost() + "'" + |
| | | ",cardid = " + "'" + member.getCardid() + "'" + |
| | | ",cell = " + "'" + member.getCell() + "'" + |
| | | ",cardid = " + "'" + member.getCardid() + "'" + |
| | | ",creditCode = " + "'" + member.getCreditcode() + "'" + |
| | | " " + "where id = " + "'" + member.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | | /** |
| | |
| | | "insert into blade_attach(id,tenant_id,link,domain,name,original_name,extension,attach_size,create_user,deptid," + |
| | | "create_time,update_user,update_time,status,is_deleted,type,cardid"; |
| | | if (noticeId != null) { |
| | | s1 += ",notice_id"; |
| | | s1 += ",notice_id"+")" +"values(" + "'" + attach.getId() + "'" + "," + |
| | | "'" + attach.getTenantId() + "'" + "," + |
| | | "'" + imgurl + "'" + "," + |
| | | "'" + ip + "'" + "," + |
| | | "'" + split[2] + "'" + "," + |
| | | "'" + attach.getOriginalName() + "'" + "," + |
| | | "'" + attach.getExtension() + "'" + "," + |
| | | "'" + attach.getAttachSize() + "'" + "," + |
| | | "'" + attach.getCreateUser() + "'" + "," + |
| | | "'" + attach.getDeptid() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," + |
| | | "'" + attach.getUpdateUser() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + "'" + "," + |
| | | "'" + attach.getStatus() + "'" + "," + |
| | | "'" + attach.getIsDeleted() + "'" + "," + |
| | | "'" + attach.getType() + "'" + "," + |
| | | "'" + cardid + "'"; |
| | | } else { |
| | | s1 += ") " + |
| | | "values(" + "'" + attach.getId() + "'" + "," + |
| | |
| | | "'" + cardid + "'"; |
| | | } |
| | | if (noticeId != null) { |
| | | s1 += "'" + noticeId + "'" + ")"; |
| | | s1 += ","+"'" + noticeId + "'" + ")"; |
| | | } else { |
| | | s1 += ")"; |
| | | } |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.information.excel.InforExcel; |
| | | import org.springblade.modules.information.excel.InforImporter; |
| | | import org.springblade.modules.member.excel.memberExcel; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入shareholder") |
| | | public R save(@Valid @RequestBody Shareholder shareholder) throws Exception { |
| | | //arg arg = new arg(); |
| | | //arg.test01(arg.url+"/shareholder/save",shareholder); |
| | | return R.status(shareholderService.save(shareholder)); |
| | | boolean save = shareholderService.save(shareholder); |
| | | String s1 = |
| | | "insert into sys_shareholder(id,shareholder,shareholdingratio,capital,capitalTime,cardid,cell,creditCode) " + |
| | | "values(" + "'" + shareholder.getId() + "'" + "," + |
| | | "'" + shareholder.getShareholder() + "'" + "," + |
| | | "'" + shareholder.getShareholdingratio() + "'" + "," + |
| | | "'" + shareholder.getCapital() + "'" + "," + |
| | | "'" + new SimpleDateFormat("yyyy-MM-dd").format(shareholder.getCapitaltime()) + "'"+"," + |
| | | "'" + shareholder.getCardid() + "'"+"," + |
| | | "'" + shareholder.getCell() + "'"+"," + |
| | | "'" + shareholder.getCreditcode() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.status(save); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入shareholder") |
| | | public R update(@Valid @RequestBody Shareholder shareholder) throws Exception { |
| | | //arg.test01(arg.url+"/shareholder/update",shareholder); |
| | | return R.status(shareholderService.updateById(shareholder)); |
| | | boolean b = shareholderService.updateById(shareholder); |
| | | //内网同步 |
| | | String s1 = "update sys_shareholder set shareholder = " + "'" + shareholder.getShareholder() + "'" + |
| | | ",shareholdingratio = " + "'" + shareholder.getShareholdingratio() + "'" + |
| | | ",capital = " + "'" + shareholder.getCapital() + "'" + |
| | | ",capitalTime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(shareholder.getCapitaltime()) + "'" + |
| | | ",cardid = " + "'" + shareholder.getCardid() + "'" + |
| | | ",cell = " + "'" + shareholder.getCell() + "'" + |
| | | ",creditCode = " + "'" + shareholder.getCreditcode() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.status(b); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | |
| | | * 出资时间 |
| | | */ |
| | | @ApiModelProperty(value = "出资时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | @TableField("capitalTime") |
| | | private Date capitaltime; |
| | | /** |
| | |
| | | if (user.getRtime() == null) { |
| | | rtime = null; |
| | | } else { |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime()); |
| | | rtime = new SimpleDateFormat("yyyy-MM-dd").format(user.getRtime()); |
| | | } |
| | | |
| | | String s1 = |
| | |
| | | import org.springblade.core.tool.jackson.JsonUtil; |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.auth.enums.UserEnum; |
| | | import org.springblade.modules.dispatcher.service.IDispatcherService; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | |
| | | // if (userCount > 0 && Func.isEmpty(user.getId())) { |
| | | // throw new ServiceException(StringUtil.format("当前用户 [{}] 已存在!", user.getAccount())); |
| | | // } |
| | | return save(user) && submitUserDept(user); |
| | | boolean b = save(user) && submitUserDept(user); |
| | | String s = "insert into blade_user(id,tenant_id,account,password,real_name,email,phone,sex,role_id,dept_id,cardid,nativePlace,nation," + |
| | | "politicaloutlook,healstats,height,address,registered,rtime,securitynumber,hold,status,dispatch) " + |
| | | "values(" + "'" + user.getId() + "'" + "," + "'" + user.getTenantId() + "'" + "," + "'" + user.getAccount() + "'" + "," + |
| | | "'" + user.getPassword() + "'"+ "," + "'" + user.getRealName() + "'"+ "," + |
| | | "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" + |
| | | "," + "'" + user.getDeptId() + "'" + |
| | | "," + "'" + user.getCardid() + "'" + |
| | | "," + "'" + user.getNativeplace() + "'" + |
| | | "," + "'" + user.getNation() + "'" + |
| | | "," + "'" + user.getPoliticaloutlook() + "'" + |
| | | "," + "'" + user.getHealstats() + "'" |
| | | + "," + "'" + user.getHeight() + "'" + |
| | | "," + "'" + user.getAddress() + "'" + |
| | | "," + "'" + user.getRegistered() + "'" + "," + |
| | | "'" + user.getRtime() + "'" + "," + "'" + user.getSecuritynumber() + "'" + |
| | | "," + "'" + user.getHold() + "'" + |
| | | "," + "'" + user.getStatus() + "'" + |
| | | "," + "'" + user.getDispatch() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s); |
| | | return b; |
| | | } |
| | | |
| | | @Override |
| | |
| | | user.setTenantId("000000"); |
| | | //默认在职 |
| | | user.setStatus(1); |
| | | user.setDispatch("1"); |
| | | //判断是否持证 |
| | | if (null != userExcel.getHold() && userExcel.getHold() != "") { |
| | | if (userExcel.getHold().equals("是")) { |