27 files modified
1 files added
| | |
| | | import java.util.Set; |
| | | |
| | | public class arg { |
| | | public static String url = "http://192.168.0.109:80"; |
| | | public static String url = "http://47.49.21.216:80"; |
| | | |
| | | public static String test01(String path, Object obj) throws Exception { |
| | | CloseableHttpClient httpClient = HttpClients.createDefault(); |
| | |
| | | apply.setApplyTime(new Date()); |
| | | } |
| | | boolean status = applyService.saveOrUpdate(apply); |
| | | if (status){ |
| | | //内网新增 |
| | | // arg.test01(arg.url+"/apply/save",apply); |
| | | return R.data(200,"报名成功"); |
| | | } |
| | | //内网修改 |
| | | if(null!=apply.getId()){ |
| | | //修改 |
| | | arg.test01(arg.url+"/apply/update",apply); |
| | | } |
| | | // if (status){ |
| | | // //内网新增 |
| | | //// arg.test01(arg.url+"/apply/save",apply); |
| | | // return R.data(200,"报名成功"); |
| | | // } |
| | | // //内网修改 |
| | | // if(null!=apply.getId()){ |
| | | // //修改 |
| | | // arg.test01(arg.url+"/apply/update",apply); |
| | | // } |
| | | return R.data(202,"报名失败"); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/apply/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/apply/remove",ids); |
| | | return R.status(applyService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody ExamPayment examPayment) throws Exception { |
| | | arg.test01(arg.url+"/examPayment/submit",examPayment); |
| | | //arg.test01(arg.url+"/examPayment/submit",examPayment); |
| | | return R.status(examPaymentService.saveOrUpdate(examPayment)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/examPayment/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/examPayment/remove",ids); |
| | | return R.status(examPaymentService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | param.put(TokenConstant.NICK_NAME, user.getRealName()); |
| | | param.put(TokenConstant.ROLE_NAME, Func.join(userInfo.getRoles())); |
| | | param.put(TokenConstant.DETAIL, userInfo.getDetail()); |
| | | param.put("jurisdiction", user.getJurisdiction()); |
| | | |
| | | //拼装accessToken |
| | | try { |
| | |
| | | .set(TokenConstant.DEPT_ID, user.getDeptId()) |
| | | .set(TokenConstant.POST_ID, user.getPostId()) |
| | | .set(TokenConstant.ROLE_ID, user.getRoleId()) |
| | | .set("jurisdiction", user.getJurisdiction()) |
| | | .set(TokenConstant.OAUTH_ID, userInfo.getOauthId()) |
| | | .set(TokenConstant.ACCOUNT, user.getAccount()) |
| | | .set(TokenConstant.USER_NAME, user.getAccount()) |
| | |
| | | @ApiOperation(value = "新增或修改", notes = "传入notice") |
| | | public R submit(@RequestBody Notice notice) throws Exception { |
| | | //调用内网 |
| | | arg.test01(arg.url+"/blade-desk/notice/submit",notice); |
| | | //arg.test01(arg.url+"/blade-desk/notice/submit",notice); |
| | | return R.status(noticeService.saveOrUpdate(notice)); |
| | | } |
| | | |
| | |
| | | directive.setSendTime(new Date()); |
| | | status = directiveService.save(directive); |
| | | //内网新增 |
| | | arg.test01(arg.url+"/directive/saveDirectiveAndFile",directive); |
| | | //arg.test01(arg.url+"/directive/saveDirectiveAndFile",directive); |
| | | if (status){ |
| | | //新增图片 |
| | | if (null!=directive.getUrl() && directive.getUrl()!=""){ |
| | |
| | | boolean update = directiveService.updateById(directive); |
| | | boolean status = false; |
| | | //内网新增 |
| | | arg.test01(arg.url+"/directive/updateDirectiveAndFile",directive); |
| | | //arg.test01(arg.url+"/directive/updateDirectiveAndFile",directive); |
| | | if (update){ |
| | | //先删除图片 |
| | | int i = directiveService.deleleByDirectiveId(directive.getId()); |
| | |
| | | } |
| | | } |
| | | //内网删除 |
| | | arg.sendPostRemoveByIds(arg.url+"/directive/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/directive/remove",ids); |
| | | return R.status(directiveService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | //查询派遣单位的信息,设置行政区 |
| | | dispatcher.setJurisdiction(dispatcherUnitService.getById(dispatcher.getDispatcherUnitId()).getJurisdiction().toString()); |
| | | } |
| | | arg.test01(arg.url+"/dispatcher/save",dispatcher); |
| | | //arg.test01(arg.url+"/dispatcher/save",dispatcher); |
| | | } |
| | | else { |
| | | if (null != dispatcher.getUserIds() && dispatcher.getUserIds() != "") { |
| | |
| | | //查询派遣单位的信息,设置行政区 |
| | | dispatcher.setJurisdiction(dispatcherUnitService.getById(dispatcher.getDispatcherUnitId()).getJurisdiction().toString()); |
| | | } |
| | | arg.test01(arg.url+"/dispatcher/update",dispatcher); |
| | | //arg.test01(arg.url+"/dispatcher/update",dispatcher); |
| | | } |
| | | return R.status(dispatcherService.saveOrUpdate(dispatcher)); |
| | | } |
| | |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | //内网删除 |
| | | arg.sendPostRemoveByIds(arg.url+"/dispatcher/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/dispatcher/remove",ids); |
| | | return R.status(dispatcherService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) throws Exception { |
| | | //内网删除 |
| | | arg.sendPostRemoveByIds(arg.url+"/dispatcherUnit/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/dispatcherUnit/remove",ids); |
| | | return R.status(dispatcherUnitService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody Car car) throws Exception { |
| | | if (car.getId()==null){ |
| | | /*if (car.getId()==null){ |
| | | arg arg = new arg(); |
| | | arg.test01(arg.url+"/car/save",car); |
| | | } |
| | | }*/ |
| | | return R.status(carService.saveOrUpdate(car)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/car/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/car/remove",ids); |
| | | return R.status(carService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody Equipage equipage) throws Exception { |
| | | if (equipage.getId()==null){ |
| | | arg arg = new arg(); |
| | | arg.test01(arg.url+"/equipage/save",equipage); |
| | | } |
| | | // if (equipage.getId()==null){ |
| | | // arg arg = new arg(); |
| | | // arg.test01(arg.url+"/equipage/save",equipage); |
| | | // } |
| | | return R.status(equipageService.saveOrUpdate(equipage)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/equipage/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/equipage/remove",ids); |
| | | return R.status(equipageService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/submit") |
| | | public R submit(@RequestBody Gun gun) throws Exception { |
| | | if (gun.getId()==null){ |
| | | arg arg = new arg(); |
| | | arg.test01(arg.url+"/gun/save",gun); |
| | | } |
| | | // if (gun.getId()==null){ |
| | | // arg arg = new arg(); |
| | | // arg.test01(arg.url+"/gun/save",gun); |
| | | // } |
| | | return R.status(gunService.saveOrUpdate(gun)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/gun/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/gun/remove",ids); |
| | | return R.status(gunService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | * 车辆型号 |
| | | */ |
| | | private String mode; |
| | | private String jurisdiction; |
| | | |
| | | } |
| | |
| | | * 品牌,厂商 |
| | | */ |
| | | private String brand; |
| | | private String jurisdiction; |
| | | |
| | | /** |
| | | * 生产时间 |
| | |
| | | */ |
| | | @TableField("gun_mode") |
| | | private String gunMode; |
| | | private String jurisdiction; |
| | | |
| | | /** |
| | | * 发证日期 |
| | |
| | | } |
| | | } |
| | | //内网修改 |
| | | arg.test01(arg.url+"/examScore/update",examScore); |
| | | //arg.test01(arg.url+"/examScore/update",examScore); |
| | | //本地修改 |
| | | return R.status(examScoreService.updateById(examScore)); |
| | | } |
| | |
| | | int i = baseMapper.insert(examScore); |
| | | //内网新增 |
| | | try { |
| | | arg.test01(arg.url+"/examScore/save",examScore); |
| | | //arg.test01(arg.url+"/examScore/save",examScore); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.information.controller; |
| | | |
| | | import com.alibaba.fastjson.serializer.SerializerFeature; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import com.alibaba.fastjson.JSON; |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.common.utils.arg; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.OutputStreamWriter; |
| | | import java.io.Writer; |
| | | import java.lang.reflect.Field; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入information") |
| | | public R<IPage<InformationVO>> page(InformationVO information, Query query) { |
| | | IPage<InformationVO> pages = informationService.selectInformationPage(Condition.getPage(query), information); |
| | | public R<IPage<Information>> page(Information information, Query query) { |
| | | IPage<Information> pages = informationService.selectInformationPage(Condition.getPage(query), information); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | String id = kv.get("id").toString(); |
| | | information.setDepartmentid(id); |
| | | } |
| | | String json=JSON.toJSONString(information); |
| | | com.util.OutJson.createJsonFile(json,"d:/anbao/information/","informationSave"); |
| | | //arg.test01(arg.url + "/information/save", information); |
| | | return R.status(informationService.save(information)); |
| | | } |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入information") |
| | | public R update(@Valid @RequestBody Information information) throws Exception { |
| | | arg.test01(arg.url + "/information/update", information); |
| | | //arg.test01(arg.url + "/information/update", information); |
| | | return R.status(informationService.updateById(information)); |
| | | } |
| | | |
| | |
| | | informationService.deleteIn(strArray[i]); |
| | | informationService.deleteSh(strArray[i]); |
| | | informationService.deleteMe(strArray[i]); |
| | | arg.sendPostRemoveByIds(arg.url + "/information/remove", strArray[i]); |
| | | //arg.sendPostRemoveByIds(arg.url + "/information/remove", strArray[i]); |
| | | |
| | | } |
| | | for (int j = 0; j < strArrays.length; j++) { |
| | | //机构删除 |
| | | informationService.deleteDept(strArrays[j]); |
| | | arg.sendPostRemoveByIds(arg.url + "/information/deleteDept", strArrays[j]); |
| | | //arg.sendPostRemoveByIds(arg.url + "/information/deleteDept", strArrays[j]); |
| | | } |
| | | |
| | | return R.success("删除成功"); |
| | |
| | | return R.data(list); |
| | | } |
| | | |
| | | public static String getJSONStringFromJavaBean(Class<? extends Object> clazz) { |
| | | |
| | | Field[] fields = clazz.getDeclaredFields(); |
| | | |
| | | StringBuffer stb = new StringBuffer("{"); |
| | | |
| | | for (int i = 0; i < fields.length; i++) { |
| | | |
| | | try { |
| | | |
| | | Field field = fields[i]; |
| | | |
| | | field.setAccessible(true); |
| | | |
| | | String name = field.getName(); |
| | | |
| | | stb.append("\"").append(name).append("\"").append(":\"\"").append(","); |
| | | |
| | | } catch (Exception e) { |
| | | |
| | | e.printStackTrace(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | int i = stb.lastIndexOf(","); |
| | | |
| | | return stb.substring(0, i) + "}"; |
| | | |
| | | public static void main(String[] args) { |
| | | Information information = new Information(); |
| | | information.setAddress("2"); |
| | | information.setDepartmentid("123"); |
| | | String json=JSON.toJSONString(information);//关键 |
| | | com.util.OutJson.createJsonFile(json,"d:/anbao/information/","informationSave"); |
| | | System.out.println("生成文件完成!"); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.util; |
| | | |
| | | import java.io.File; |
| | | import java.io.FileOutputStream; |
| | | import java.io.OutputStreamWriter; |
| | | import java.io.Writer; |
| | | |
| | | public class OutJson { |
| | | /** |
| | | * 生成.json格式文件 |
| | | */ |
| | | public static boolean createJsonFile(String jsonString, String filePath, String fileName) { |
| | | // 标记文件生成是否成功 |
| | | boolean flag = true; |
| | | |
| | | // 拼接文件完整路径 |
| | | String fullPath = filePath + File.separator + fileName + ".json"; |
| | | |
| | | // 生成json格式文件 |
| | | try { |
| | | // 保证创建一个新文件 |
| | | File file = new File(fullPath); |
| | | if (!file.getParentFile().exists()) { // 如果父目录不存在,创建父目录 |
| | | file.getParentFile().mkdirs(); |
| | | } |
| | | if (file.exists()) { // 如果已存在,删除旧文件 |
| | | file.delete(); |
| | | } |
| | | file.createNewFile(); |
| | | |
| | | // 格式化json字符串 |
| | | jsonString = OutJson.formatJson(jsonString); |
| | | |
| | | // 将格式化后的字符串写入文件 |
| | | Writer write = new OutputStreamWriter(new FileOutputStream(file), "UTF-8"); |
| | | write.write(jsonString); |
| | | write.flush(); |
| | | write.close(); |
| | | } catch (Exception e) { |
| | | flag = false; |
| | | e.printStackTrace(); |
| | | } |
| | | |
| | | // 返回是否成功的标记 |
| | | return flag; |
| | | } |
| | | /** |
| | | * 单位缩进字符串。 |
| | | */ |
| | | private static String SPACE = " "; |
| | | |
| | | /** |
| | | * 返回格式化JSON字符串。 |
| | | * |
| | | * @param json 未格式化的JSON字符串。 |
| | | * @return 格式化的JSON字符串。 |
| | | */ |
| | | public static String formatJson(String json) { |
| | | StringBuffer result = new StringBuffer(); |
| | | |
| | | int length = json.length(); |
| | | int number = 0; |
| | | char key = 0; |
| | | |
| | | // 遍历输入字符串。 |
| | | for (int i = 0; i < length; i++) { |
| | | // 1、获取当前字符。 |
| | | key = json.charAt(i); |
| | | |
| | | // 2、如果当前字符是前方括号、前花括号做如下处理: |
| | | if ((key == '[') || (key == '{')) { |
| | | // (1)如果前面还有字符,并且字符为“:”,打印:换行和缩进字符字符串。 |
| | | if ((i - 1 > 0) && (json.charAt(i - 1) == ':')) { |
| | | result.append('\n'); |
| | | result.append(indent(number)); |
| | | } |
| | | |
| | | // (2)打印:当前字符。 |
| | | result.append(key); |
| | | |
| | | // (3)前方括号、前花括号,的后面必须换行。打印:换行。 |
| | | result.append('\n'); |
| | | |
| | | // (4)每出现一次前方括号、前花括号;缩进次数增加一次。打印:新行缩进。 |
| | | number++; |
| | | result.append(indent(number)); |
| | | |
| | | // (5)进行下一次循环。 |
| | | continue; |
| | | } |
| | | |
| | | // 3、如果当前字符是后方括号、后花括号做如下处理: |
| | | if ((key == ']') || (key == '}')) { |
| | | // (1)后方括号、后花括号,的前面必须换行。打印:换行。 |
| | | result.append('\n'); |
| | | |
| | | // (2)每出现一次后方括号、后花括号;缩进次数减少一次。打印:缩进。 |
| | | number--; |
| | | result.append(indent(number)); |
| | | |
| | | // (3)打印:当前字符。 |
| | | result.append(key); |
| | | |
| | | // (4)如果当前字符后面还有字符,并且字符不为“,”,打印:换行。 |
| | | if (((i + 1) < length) && (json.charAt(i + 1) != ',')) { |
| | | result.append('\n'); |
| | | } |
| | | |
| | | // (5)继续下一次循环。 |
| | | continue; |
| | | } |
| | | |
| | | // 4、如果当前字符是逗号。逗号后面换行,并缩进,不改变缩进次数。 |
| | | if ((key == ',')) { |
| | | result.append(key); |
| | | result.append('\n'); |
| | | result.append(indent(number)); |
| | | continue; |
| | | } |
| | | |
| | | // 5、打印:当前字符。 |
| | | result.append(key); |
| | | } |
| | | |
| | | return result.toString(); |
| | | } |
| | | |
| | | /** |
| | | * 返回指定次数的缩进字符串。每一次缩进三个空格,即SPACE。 |
| | | * |
| | | * @param number 缩进次数。 |
| | | * @return 指定缩进次数的字符串。 |
| | | */ |
| | | private static String indent(int number) { |
| | | StringBuffer result = new StringBuffer(); |
| | | for (int i = 0; i < number; i++) { |
| | | result.append(SPACE); |
| | | } |
| | | return result.toString(); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.information.vo.InformationVO; |
| | | |
| | |
| | | * @param information |
| | | * @return |
| | | */ |
| | | List<InformationVO> selectInformationPage(IPage page, InformationVO information); |
| | | List<Information> selectInformationPage(IPage page, @Param("information")Information information); |
| | | void deleteIn(String creditcode); |
| | | void deleteSh(String creditcode); |
| | | void deleteMe(String creditcode); |
| | |
| | | and representative like concat(concat('%', #{information.representative}),'%') |
| | | </if> |
| | | <if test="information.stats!=null and information.stats!=''"> |
| | | and stats=#{stats} |
| | | and stats=#{information.stats} |
| | | </if> |
| | | <if test="information.jurisdiction!=null and information.jurisdiction!=''"> |
| | | and jurisdiction=#{jurisdiction} |
| | | <if test="information.jurisdiction!=null and information.jurisdiction!='' and information.jurisdiction!='1123598813738675201'"> |
| | | and jurisdiction=#{information.jurisdiction} |
| | | </if> |
| | | <if test="information.departmentid!=null and information.departmentid!=''"> |
| | | and departmentid=#{departmentid} |
| | | and departmentid=#{information.departmentid} |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | * @param information |
| | | * @return |
| | | */ |
| | | IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information); |
| | | IPage<Information> selectInformationPage(IPage<Information> page, Information information); |
| | | void deleteIn(String creditCode); |
| | | void deleteSh(String creditCode); |
| | | void deleteMe(String creditCode); |
| | |
| | | public class InformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements IInformationService { |
| | | |
| | | @Override |
| | | public IPage<InformationVO> selectInformationPage(IPage<InformationVO> page, InformationVO information) { |
| | | public IPage<Information> selectInformationPage(IPage<Information> page, Information information) { |
| | | return page.setRecords(baseMapper.selectInformationPage(page, information)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入member") |
| | | public R save(@Valid @RequestBody Member member) throws Exception { |
| | | arg.test01(arg.url+"/member/save",member); |
| | | //arg.test01(arg.url+"/member/save",member); |
| | | return R.status(memberService.save(member)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入member") |
| | | public R update(@Valid @RequestBody Member member) throws Exception { |
| | | arg.test01(arg.url+"/member/update",member); |
| | | //arg.test01(arg.url+"/member/update",member); |
| | | return R.status(memberService.updateById(member)); |
| | | } |
| | | |
| | |
| | | @PostMapping("put-file-app") |
| | | public R putFileApp(@RequestParam MultipartFile file) throws IOException, ServerException, InsufficientDataException, InternalException, InvalidResponseException, InvalidKeyException, NoSuchAlgorithmException, XmlParserException, ErrorResponseException { |
| | | //填写你文件上传的地址以及相应信息 |
| | | String url = "http://192.168.0.109:9000"; |
| | | String access = "minioadmin"; |
| | | String secret = "minioadmin"; |
| | | String url = "http://223.82.109.183:2081"; |
| | | String access = "zhbaadmin"; |
| | | String secret = "zhbapassword"; |
| | | String bucket = "zhba"; |
| | | MinioClient minioClient = |
| | | MinioClient.builder() |
| | |
| | | .headers(headers) |
| | | .build()); |
| | | in.close(); |
| | | String urls = "http://192.168.0.109:9000/zhba/" + newName; |
| | | String urls = "http://223.82.109.183:2081/zhba/" + newName; |
| | | return R.data(urls); |
| | | } |
| | | |
| | |
| | | attach.setDeptid(deptid); |
| | | attach.setType(type); |
| | | attachService.save(attach); |
| | | arg.test01(arg.url+"/blade-resource/attach/save",attach); |
| | | //arg.test01(arg.url+"/blade-resource/attach/save",attach); |
| | | return attach.getId(); |
| | | } |
| | | |
| | |
| | | @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); |
| | | //arg arg = new arg(); |
| | | //arg.test01(arg.url+"/shareholder/save",shareholder); |
| | | return R.status(shareholderService.save(shareholder)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入shareholder") |
| | | public R update(@Valid @RequestBody Shareholder shareholder) throws Exception { |
| | | arg.test01(arg.url+"/shareholder/update",shareholder); |
| | | //arg.test01(arg.url+"/shareholder/update",shareholder); |
| | | return R.status(shareholderService.updateById(shareholder)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperation(value = "新增", notes = "传入trainExam") |
| | | public R save(@RequestBody TrainExam trainExam) throws Exception { |
| | | arg.test01(arg.url+"/trainExam/save",trainExam); |
| | | //arg.test01(arg.url+"/trainExam/save",trainExam); |
| | | return R.status(trainExamService.save(trainExam)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody TrainExam trainExam) throws Exception { |
| | | arg.test01(arg.url+"/trainExam/update",trainExam); |
| | | //arg.test01(arg.url+"/trainExam/update",trainExam); |
| | | return R.status(trainExamService.updateById(trainExam)); |
| | | } |
| | | |
| | |
| | | public R updateAudit(@RequestBody TrainExam trainExam) throws Exception { |
| | | trainExam.setAuditTime(new Date()); |
| | | //内网数据同步 |
| | | arg.test01(arg.url+"/trainExam/update-audit",trainExam); |
| | | //arg.test01(arg.url+"/trainExam/update-audit",trainExam); |
| | | //审核通过,插入一条考试信息 |
| | | if (trainExam.getAuditStatus()==1){ |
| | | //查询考试申请 |
| | |
| | | trainExam.setCreateTime(new Date()); |
| | | trainExam.setAuditStatus(3); |
| | | } |
| | | arg.test01(arg.url+"/trainExam/submit",trainExam); |
| | | //arg.test01(arg.url+"/trainExam/submit",trainExam); |
| | | return R.status(trainExamService.saveOrUpdate(trainExam)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/trainExam/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/trainExam/remove",ids); |
| | | return R.status(trainExamService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/update") |
| | | public R update(@RequestBody TrainingRegistration trainingRegistration) throws Exception { |
| | | arg.test01(arg.url+"/trainingRegistration/update",trainingRegistration); |
| | | //arg.test01(arg.url+"/trainingRegistration/update",trainingRegistration); |
| | | return R.status(trainingRegistrationService.updateById(trainingRegistration)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/trainingRegistration/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/trainingRegistration/remove",ids); |
| | | return R.status(trainingRegistrationService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | |
| | | workReport.setReportTime(new Date()); |
| | | workReport.setReplyDeptIds(getReplyDeptIds(workReport.getReceivedIds())); |
| | | } |
| | | arg.test01(arg.url+"/workReport/submit",workReport); |
| | | //arg.test01(arg.url+"/workReport/submit",workReport); |
| | | return R.status(workReportService.saveOrUpdate(workReport)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @PostMapping("/remove") |
| | | public R remove(@ApiParam(value = "主键集合") @RequestParam String ids) { |
| | | arg.sendPostRemoveByIds(arg.url+"/workReport/remove",ids); |
| | | //arg.sendPostRemoveByIds(arg.url+"/workReport/remove",ids); |
| | | return R.status(workReportService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |