QyzxController.java 32.8 KB
Newer Older
yuquan.zhu committed
1 2
package cn.timer.api.controller.qyzx;

翁国栋 committed
3
import java.text.SimpleDateFormat;
翁国栋 committed
4
import java.util.*;
邓实川 committed
5
import java.util.stream.Collectors;
yuquan.zhu committed
6 7 8 9
import java.util.stream.Stream;

import javax.servlet.http.HttpSession;

翁国栋 committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.timer.api.bean.jxgl.JxglBasicSetting;
import cn.timer.api.bean.kqmk.*;
import cn.timer.api.bean.qyxx.CmsContent;
import cn.timer.api.bean.xcgl.XcglAssoBszqsz;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.controller.jxgl.service.JxglService;
import cn.timer.api.controller.qyzx.service.RegisterHelper;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.dao.kqmk.KqglAssoLeaveRulesMapper;
翁国栋 committed
24
import cn.timer.api.dto.qyzx.*;
翁国栋 committed
25
import cn.timer.api.utils.Md5;
陶湘宇 committed
26
import cn.timer.api.utils.redis.RedisUtil;
翁国栋 committed
27 28
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
yuquan.zhu committed
29
import org.springframework.beans.factory.annotation.Autowired;
翁国栋 committed
30 31
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
翁国栋 committed
32
import org.springframework.web.bind.annotation.*;
邓实川 committed
33

yuquan.zhu committed
34 35 36
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
邓实川 committed
37 38
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
东州 翁 committed
39
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
yuquan.zhu committed
40 41 42

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil;
邓实川 committed
43
import cn.hutool.core.util.ObjectUtil;
tangzhaoqian committed
44 45
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
ilal committed
46
import cn.timer.api.bean.admin.AdminMenuTemplate;
ilal committed
47
import cn.timer.api.bean.qyzx.QyzxAdminColour;
ilal committed
48
import cn.timer.api.bean.qyzx.QyzxAdminMenu;
yuquan.zhu committed
49 50 51 52
import cn.timer.api.bean.qyzx.QyzxAttaFwjsb;
import cn.timer.api.bean.qyzx.QyzxEmpEntAsso;
import cn.timer.api.bean.qyzx.QyzxEmpLogin;
import cn.timer.api.bean.qyzx.QyzxEntInfoM;
53
import cn.timer.api.bean.qyzx.QyzxInvoiceUsual;
yuquan.zhu committed
54
import cn.timer.api.bean.qyzx.QyzxLogBuy;
tangzhaoqian committed
55
import cn.timer.api.bean.qyzx.QyzxOperLog;
yuquan.zhu committed
56
import cn.timer.api.bean.qyzx.QyzxPayServe;
57
import cn.timer.api.bean.qyzx.QyzxSuggestionFeeback;
yuquan.zhu committed
58 59 60 61 62
import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enums.CommonEnum;
63
import cn.timer.api.config.enums.SysRoleType;
ilal committed
64
import cn.timer.api.controller.kqgl.ClockInTool;
yuquan.zhu committed
65 66 67
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.qyzx.QyzxEntInfoMMapper;
68
import cn.timer.api.dao.qyzx.QyzxInvoiceUsualMapper;
yuquan.zhu committed
69
import cn.timer.api.dao.qyzx.QyzxLogBuyMapper;
tangzhaoqian committed
70
import cn.timer.api.dao.qyzx.QyzxOperLogMapper;
71
import cn.timer.api.dao.qyzx.QyzxPayServeMapper;
yuquan.zhu committed
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dto.login.QysDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@RestController
@Api(tags = "4.0企业中心")
@RequestMapping(value = "/qyzx", produces = { "application/json" })
public class QyzxController {
	@Autowired
	private HttpSession session;

	@Autowired
陶湘宇 committed
89 90 91
	private RedisUtil redisUtil;

	@Autowired
yuquan.zhu committed
92 93 94 95 96 97 98 99 100 101 102 103
	private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;

	@Autowired
	private QyzxEntInfoMMapper qyzxEntInfoMMapper;

	@Autowired
	private QyzxEmpLoginMapper qyzxEmpLoginMapper;

	@Autowired
	private QyzxLogBuyMapper qyzxLogBuyMapper;

	@Autowired
104
	private ZzglBmgwMMapper zzglBmgwMMapper;
105

106 107
	@Autowired
	private QyzxPayServeMapper qyzxPayServeMapper;
108

109
	@Autowired
110
	private QyzxInvoiceUsualMapper qyzxInvoiceUsualMapper;
111

翁国栋 committed
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
	@Value("${config-8timer.register-company-max-num}")
	public Integer max;
	@Value("${config-8timer.qyxx.title}")
	private String title;
	@Value("${config-8timer.qyxx.author}")
	private String author;
	@Value("${config-8timer.qyxx.cover}")
	private String cover;
	@Value("${config-8timer.qyxx.summary}")
	private String summary;
	@Value("${config-8timer.environmental-science}")
	public String environmental_science;

	@Autowired
	SpmkServiceImpl SpmkService;
	@Autowired
	private KqglAssoLeaveRulesMapper kqglassoleaverulesmapper;

	@Autowired
	JxglService jxglService;
yuquan.zhu committed
132 133
	/**
	 * 获取企业信息
翁国栋 committed
134
	 *
yuquan.zhu committed
135 136 137 138 139 140 141 142 143 144 145
	 * @param
	 * @return
	 */
	@GetMapping(value = "/ent")
	@ApiOperation(value = "获取企业信息", httpMethod = "GET", notes = "接口发布说明")
	public Result<QyzxEntInfoM> selectent(@CurrentUser UserBean userBean) {
		Integer orgCode = userBean.getOrgCode();
		QyzxEntInfoM qyzxEntInfoM = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				.eq(orgCode != null, QyzxEntInfoM::getId, orgCode).one();
		return ResultUtil.data(qyzxEntInfoM, "获取企业信息成功");
	}
146

147 148
	/**
	 * 添加/修改企业信息
翁国栋 committed
149
	 *
150 151 152 153 154
	 * @param
	 * @return
	 */
	@PostMapping(value = "/ent")
	@ApiOperation(value = "添加/修改企业信息", httpMethod = "POST", notes = "接口发布说明")
tangzhaoqian committed
155
	@Log(title = "修改-企业信息", businessType = BusinessType.UPDATE)
156 157
	public Result<QyzxEntInfoM> addent(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) {
		qyzxEntInfoM.setId(userBean.getOrgCode());
邓实川 committed
158

159 160
		QyzxEntInfoM q = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				.eq(QyzxEntInfoM::getId, userBean.getOrgCode()).one();
邓实川 committed
161

162 163
		qyzxEntInfoM.setRegisterTime(q.getRegisterTime());
		qyzxEntInfoM.insertOrUpdate();
164

165 166
		return ResultUtil.data(qyzxEntInfoM, "添加/修改企业");
	}
yuquan.zhu committed
167 168 169

	/**
	 * 企业认证-申请
翁国栋 committed
170
	 *
yuquan.zhu committed
171 172 173 174 175
	 * @param qyzxEntAuth
	 * @return
	 */
	@PostMapping(value = "/entauth")
	@ApiOperation(value = "企业认证", httpMethod = "POST", notes = "接口发布说明")
tangzhaoqian committed
176
	@Log(title = "企业认证", businessType = BusinessType.INSERT)
177
	public Result<QyzxEntInfoM> entauth(@CurrentUser UserBean userBean, @RequestBody QyzxEntInfoM qyzxEntInfoM) {
yuquan.zhu committed
178
		// 设置审核状态
179 180 181
		qyzxEntInfoM.setAttestStatus(CommonEnum.AUTH_TYPE_UNDEREVIEW.getType());
		qyzxEntInfoM.setId(userBean.getOrgCode());
		qyzxEntInfoM.updateById();
yuquan.zhu committed
182
		// }
183
		return ResultUtil.data(qyzxEntInfoM, "申请企业认证中");
yuquan.zhu committed
184 185 186
	}

	/**
187
	 * 运营管理 企业认证-审核-通过/不通过(weng)
翁国栋 committed
188
	 *
189 190 191
	 * @param qyzxEntAuth
	 * @return
	 */
192 193
	@PostMapping(value = "/entauthpass")
	@ApiOperation(value = "企业认证-审核-通过", httpMethod = "POST", notes = "接口发布说明")
194 195 196 197 198 199 200 201
	public Result<String> entauthpass(@RequestBody EntauthDto entauthDto) {// 2未通过,3通过
		String msg = "企业未认证";
		Integer type = entauthDto.getAuthType();
		if (type == CommonEnum.AUTH_TYPE_SUCCESS.getType()) {
			msg = "企业认证成功";
		}
		if (type == CommonEnum.AUTH_TYPE_FAILURE.getType()) {
			msg = "企业认证失败";
202
		}
203 204 205 206
		boolean b = new LambdaUpdateChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				.eq(QyzxEntInfoM::getId, entauthDto.getOrgCode()).set(QyzxEntInfoM::getAttestStatus, type).update();
		if (b) {
			return ResultUtil.data(msg);
207
		}
208
		return ResultUtil.data("企业认证流程有误");
209
	}
210

211
	/**
212
	 * 新增/编辑常用企业开票资料
翁国栋 committed
213
	 *
214 215 216
	 * @param QyzxInvoiceUsual
	 * @return
	 */
217 218
	@PostMapping(value = "/invoiceusual")
	@ApiOperation(value = "新增/编辑常用企业开票资料", httpMethod = "POST", notes = "接口发布说明")
219 220
	public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean,
			@RequestBody QyzxInvoiceUsual qyzxInvoiceUsual) {
221 222 223 224 225 226 227 228
		qyzxInvoiceUsual.setOrgCode(userBean.getOrgCode());
		qyzxInvoiceUsual.setModifyUser(userBean.getEmpNum());
		boolean tof = qyzxInvoiceUsual.insertOrUpdate();
		if (tof) {
			return ResultUtil.data(qyzxInvoiceUsual, "常用企业开票资料已修改");
		}
		return ResultUtil.error("开票资料修改无效");
	}
229

230
	/**
231
	 * 显示常用的企业开票资料
翁国栋 committed
232
	 *
233 234 235
	 * @param QyzxInvoiceUsual
	 * @return
	 */
236 237 238
	@GetMapping(value = "/invoiceusual")
	@ApiOperation(value = "显示常用的企业开票资料", httpMethod = "GET", notes = "接口发布说明")
	public Result<QyzxInvoiceUsual> invoiceusual(@CurrentUser UserBean userBean) {
邓实川 committed
239 240
		QyzxInvoiceUsual one = qyzxInvoiceUsualMapper.selectOne(
				new QueryWrapper<QyzxInvoiceUsual>().lambda().eq(QyzxInvoiceUsual::getOrgCode, userBean.getOrgCode()));
241 242 243 244 245 246 247
		if (one != null) {
			if (one.getShippingArea() == null) {
				one.setShippingArea("");
			}
			if (one.getShippingAddress() == null) {
				one.setShippingAddress("");
			}
248
		}
249
		return ResultUtil.data(one, "显示常用的企业开票资料");
250
	}
251 252 253

	/**
	 * 显示企业的超级管理员
翁国栋 committed
254
	 *
255 256 257 258 259 260 261 262 263 264 265 266 267
	 * @param qyzxEntAuth
	 * @return
	 */
	@GetMapping(value = "/smanagerphone")
	@ApiOperation(value = "显示超管头像和电话号码", httpMethod = "GET", notes = "接口发布说明")
	public Result<QyzxEmpLogin> smanagerphone(@CurrentUser UserBean userBean) {
		QyzxEmpEntAsso smanagerid = new LambdaQueryChainWrapper<QyzxEmpEntAsso>(qyzxEmpEntAssoMapper)
				.select(QyzxEmpEntAsso::getEmpNum).eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
				.eq(QyzxEmpEntAsso::getStatus, 0).one();
		QyzxEmpLogin smanagerphone = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
				.select(QyzxEmpLogin::getPhone, QyzxEmpLogin::getHeadUrl)
				.eq(QyzxEmpLogin::getId, smanagerid.getEmpNum()).one();
		return ResultUtil.data(smanagerphone, "企业超管头像和电话号码");
yuquan.zhu committed
268 269
	}

270 271 272 273
	/*	*//**
			 * 获取企业的到期时间和版本号
			 *//*
				 * @GetMapping(value = "/endtimeversion")
翁国栋 committed
274
				 *
275 276 277 278 279 280 281 282 283
				 * @ApiOperation(value = "获取企业的到期时间和版本号", httpMethod = "GET", notes = "接口发布说明")
				 * public Result<QyzxEntInfoM> endtimeversion(@CurrentUser UserBean userBean) {
				 * QyzxEntInfoM qyzxEntInfoM = new
				 * LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				 * .select(QyzxEntInfoM::getEndTime,QyzxEntInfoM::getLevel).eq(QyzxEntInfoM::
				 * getId, userBean.getOrgCode()).one(); return ResultUtil.data(qyzxEntInfoM,
				 * "获取企业的到期时间和版本号成功"); }
				 */

yuquan.zhu committed
284
	/**
mobh committed
285
	 * 当前用户企业列表
翁国栋 committed
286
	 *
yuquan.zhu committed
287 288 289 290
	 * @param
	 * @return
	 */
	@GetMapping(value = "/entlist")
mobh committed
291
	@ApiOperation(value = "当前用户企业列表", httpMethod = "GET", notes = "接口发布说明")
yuquan.zhu committed
292
	public Result<List<QyzxEntInfoM>> entlist1(@CurrentUser UserBean userBean) {
邓实川 committed
293

294
		List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(new QueryWrapper<QyzxEmpEntAsso>().lambda()
邓实川 committed
295
				.select(QyzxEmpEntAsso::getOrgCode).eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
yuquan.zhu committed
296 297 298 299 300 301
		List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				.in(CollUtil.isNotEmpty(orgCodes), QyzxEntInfoM::getId, orgCodes).list();
		return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功");
	}

	/**
mobh committed
302 303 304 305 306 307 308 309 310 311 312 313 314 315
	 * 所有企业列表
	 *
	 * @param
	 * @return
	 */
	@GetMapping(value = "/entlistAll")
	@ApiOperation(value = "所有企业列表", httpMethod = "GET", notes = "接口发布说明")
	public Result<List<QyzxEntInfoM>> entlistAll(@CurrentUser UserBean userBean) {
		List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				.list();
		return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功");
	}

	/**
yuquan.zhu committed
316
	 * 切换企业
翁国栋 committed
317
	 *
yuquan.zhu committed
318 319 320 321
	 * @param org_num
	 * @return
	 */
	@GetMapping(value = "/changeent/{orgCode}")
322
	@ApiOperation(value = "切换企业", httpMethod = "GET", notes = "接口发布说明")
yuquan.zhu committed
323 324 325
	public Result<List<String>> changeent(@CurrentUser UserBean userBean, @PathVariable Integer orgCode) {
		// 查询该员工加入的企业id列表
		QyzxEmpLogin emp = userBean.getQyzxEmpLogin();
326
		Stream<QysDto> s = emp.getQys().stream().filter(o -> orgCode.equals(o.getId()));
yuquan.zhu committed
327 328 329
		// 判断 切换目标企业id 是否包含在 企业id列表 内
		if (s != null) {
			List<String> menus = new ArrayList<>();
330 331 332 333
			QysDto ctrl = s.findFirst().orElse(null);
			if (ctrl == null) {
				return ResultUtil.data(menus, "你不是该企业的用户!");
			}
邓实川 committed
334

335 336
			if (SysRoleType.U_TYPE_ADMIN.getType().equals(ctrl.getUserType())
					|| SysRoleType.U_TYPE_C_ADMIN.getType().equals(ctrl.getUserType())) {
yuquan.zhu committed
337 338 339
			} else {
				// 获取权限
				ArrayList<Integer> list = new ArrayList<Integer>();
东州 翁 committed
340 341
//				List<ZzglBmgwM> zzglBmgwMs = new LambdaQueryChainWrapper<ZzglBmgwM>(zzglBmgwMMapper)
//						.eq(ZzglBmgwM::getOrgCode, ctrl.getId()).list();
邓实川 committed
342 343 344 345

				List<ZzglBmgwM> zzglBmgwMs = zzglBmgwMMapper
						.selectList(new QueryWrapper<ZzglBmgwM>().lambda().eq(ZzglBmgwM::getOrgCode, ctrl.getId()));

yuquan.zhu committed
346 347 348 349 350 351 352
				// 传入的部门岗位是登录者的岗位id.获取的list中只有一个元素,不必要
				ZzglBmgwM.getupDepts(list, ctrl.getBmgwId(), zzglBmgwMs);
				if (list != null && list.size() > 0) {
					LambdaQueryWrapper<ZzglAuth> wp = new LambdaQueryWrapper<>();
					wp.select(ZzglAuth::getMenuId).eq(ZzglAuth::getOrgCode, ctrl.getId())
							.and(i -> i.in(ZzglAuth::getBmgwId, list.toArray()));
					List<ZzglAuth> zas = ZzglAuth.builder().build().selectList(wp);
353 354
					if (zas != null && zas.size() != 0)
						zas.stream().forEach(o -> menus.add(o.getMenuId()));
yuquan.zhu committed
355 356 357
				}
			}
			emp.setOrgId(orgCode);
陶湘宇 committed
358 359
			//session.setAttribute("ui", emp);
			redisUtil.setAttribute(session.getId(),"ui", emp);
yuquan.zhu committed
360 361 362 363 364 365 366
			qyzxEmpLoginMapper.updateById(emp);
			return ResultUtil.data(menus, "切换企业成功");
		} else {
			return ResultUtil.error();
		}
	}

东州 翁 committed
367
	/**
邓实川 committed
368
	 * 意见反馈
东州 翁 committed
369
	 */
370
	@PostMapping(value = "/feedback")
东州 翁 committed
371
	@ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
邓实川 committed
372 373 374 375 376 377 378 379 380 381 382
	public Result<String> feedback(@CurrentUser UserBean userBean,
			@RequestBody QyzxSuggestionFeeback qyzxSuggestionFeeback) {

		if (!ObjectUtil.isAllNotEmpty(qyzxSuggestionFeeback.getOpinionText(), qyzxSuggestionFeeback.getUrl(),
				qyzxSuggestionFeeback.getPersonalContact()))
			return ResultUtil.error("请完善意见信息!");

		qyzxSuggestionFeeback.setCreateTime(new Date());
		qyzxSuggestionFeeback.setEmpNum(userBean.getEmpNum());
		qyzxSuggestionFeeback.setOrgCode(userBean.getOrgCode());
		if (qyzxSuggestionFeeback.insert()) {
东州 翁 committed
383
			return ResultUtil.data("意见反馈成功!");
384
		}
东州 翁 committed
385
		return ResultUtil.data("意见反馈失败!");
yuquan.zhu committed
386
	}
387

yuquan.zhu committed
388
	/**
389
	 * 查看服务列表
yuquan.zhu committed
390
	 */
391
	@GetMapping(value = "/servelist")
392 393 394 395 396 397 398
	@ApiOperation(value = "查看服务列表", httpMethod = "GET", notes = "接口发布说明")
	public Result<List<QyzxPayServe>> servelist() {
		List<QyzxPayServe> list = new LambdaQueryChainWrapper<QyzxPayServe>(qyzxPayServeMapper)
				.select(QyzxPayServe::getName, QyzxPayServe::getNum, QyzxPayServe::getSpecialPrice,
						QyzxPayServe::getOriginalPrice, QyzxPayServe::getSort, QyzxPayServe::getUnit,
						QyzxPayServe::getRemark)
				.orderByAsc(QyzxPayServe::getId).list();
399
		return ResultUtil.data(list, "查看服务列表成功");
yuquan.zhu committed
400
	}
401

yuquan.zhu committed
402 403
	/**
	 * 购买服务(添加服务计算,添加购买记录)
翁国栋 committed
404
	 *
yuquan.zhu committed
405 406 407
	 * @param
	 * @return
	 */
408 409 410
	@PostMapping(value = "/buyserve")
	@ApiOperation(value = "购买服务(添加服务计算,添加购买记录)", httpMethod = "POST", notes = "接口发布说明")
	public Result<QyzxLogBuy> buyserve(@CurrentUser UserBean userBean, @RequestBody QyzxLogBuy qyzxLogBuy) {
yuquan.zhu committed
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427
		Integer payServeId = qyzxLogBuy.getPayServeId();// 套餐的付费服务的id
		Integer num = qyzxLogBuy.getNum();// 套餐的购买次数
		QyzxPayServe qyzxPayServe = QyzxPayServe.builder().id(payServeId).build().selectById();
		Integer code = qyzxPayServe.getCode();// 获取套餐的付费服务代码

		Double o = qyzxPayServe.getOriginalPrice();
		Double s = qyzxPayServe.getSpecialPrice();
		Double price = (s != null && s > 0d ? s : o);
		Double money = NumberUtil.round(NumberUtil.mul(price, num), 4).doubleValue();
		log.info("money:" + money);
		Date date = new Date();
		log.info("date:" + date);
		// 添加购买记录表
		QyzxLogBuy.builder().empNum(userBean.getEmpNum()).payServeId(payServeId).money(money).num(num).createTime(date)
				.build().insertOrUpdate();
		// 添加或修改服务计算表
		Integer number = qyzxPayServe.getNum();
428 429
		LambdaQueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<QyzxAttaFwjsb>().lambda();
		queryWrapper.eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()).eq(QyzxAttaFwjsb::getCode, code);
yuquan.zhu committed
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446
		Integer result = QyzxAttaFwjsb.builder().build().selectCount(queryWrapper);
		if (result != null && result > 0) {
			QyzxAttaFwjsb fwjb = QyzxAttaFwjsb.builder().build().selectOne(queryWrapper);
			// 续费
			QyzxAttaFwjsb.builder().id(fwjb.getId()).empNum(userBean.getEmpNum()).code(code)
					.hasNum(fwjb.getHasNum() + num * number).createTime(date).build().insertOrUpdate();
		} else {
			// 新增
			QyzxAttaFwjsb.builder().empNum(userBean.getEmpNum()).code(code).hasNum(num * number).createTime(date)
					.build().insertOrUpdate();
		}
		return ResultUtil.data(qyzxLogBuy, "添加/修改发票资料成功");
	}

	// 使用系统购买服务
	/**
	 * 获取服务计算
翁国栋 committed
447
	 *
yuquan.zhu committed
448 449 450 451 452 453
	 * @param
	 * @return
	 */
	@GetMapping(value = "/fwjs")
	@ApiOperation(value = "查看服务计算", httpMethod = "GET", notes = "接口发布说明")
	public Result<List<QyzxAttaFwjsb>> fwjs(@CurrentUser UserBean userBean) {
邓实川 committed
454 455
		List<QyzxAttaFwjsb> qyzxAttaFpgl = QyzxAttaFwjsb.builder().build().selectList(
				new QueryWrapper<QyzxAttaFwjsb>().lambda().eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()));
yuquan.zhu committed
456 457 458 459 460
		return ResultUtil.data(qyzxAttaFpgl, "获取服务计算成功");
	}

	/**
	 * 获取购买记录
翁国栋 committed
461
	 *
yuquan.zhu committed
462 463 464 465 466 467 468
	 * @param
	 * @return
	 */
	@GetMapping(value = "/gmjl")
	@ApiOperation(value = "获取购买记录", httpMethod = "GET", notes = "接口发布说明")
	public Result<List<QyzxLogBuy>> selectgmjl(@CurrentUser UserBean userBean) {
		List<QyzxLogBuy> qyzxLogBuy = QyzxLogBuy.builder().build()
469
				.selectList(new QueryWrapper<QyzxLogBuy>().lambda().eq(QyzxLogBuy::getEmpNum, userBean.getEmpNum()));
yuquan.zhu committed
470 471 472 473 474
		return ResultUtil.data(qyzxLogBuy, "获取购买记录成功");
	}

	/**
	 * 查询购买记录
翁国栋 committed
475
	 *
yuquan.zhu committed
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
	 * @param
	 * @return
	 */
	@PostMapping(value = "/gmjlquery")
	@ApiOperation(value = "查询购买记录", httpMethod = "POST", notes = "接口发布说明")
	public Result<Object> querygmjl(@CurrentUser UserBean userBean, @RequestBody AttaFpglQueryDto attaFpglQueryDto) {

		Integer empNum = userBean.getEmpNum();
		attaFpglQueryDto.setEmpNum(empNum);

		IPage<LogBuyDto> page = new Page<LogBuyDto>(
				attaFpglQueryDto.getCurrentPage() == null ? 1 : attaFpglQueryDto.getCurrentPage(),
				attaFpglQueryDto.getTotalPage() == null ? 10 : attaFpglQueryDto.getTotalPage());

		List<LogBuyDto> logBuyDto = qyzxLogBuyMapper.selectByName(page, attaFpglQueryDto);

		return ResultUtil.data(page, logBuyDto, "查询成功");
	}

	/**
496
	 * 账号管理 获取账号
翁国栋 committed
497
	 *
yuquan.zhu committed
498 499 500 501 502
	 * @param
	 * @return
	 */
	@GetMapping(value = "/adminlist/{page}/{limit}")
	@ApiOperation(value = "获取账号", httpMethod = "GET", notes = "接口发布说明")
503 504 505 506
	public Result<Object> adminlist(@CurrentUser UserBean userBean, @PathVariable("page") Integer page,
			@PathVariable("limit") Integer limit) {
		IPage<AdminListDto> page1 = new Page<AdminListDto>(page, limit);
		return ResultUtil.data(page1, qyzxEmpEntAssoMapper.adminlist(page1, userBean.getOrgCode()), "获取账号");
yuquan.zhu committed
507
	}
邓实川 committed
508

tangzhaoqian committed
509 510
	@Autowired
	private QyzxOperLogMapper qyzxOperLogMapper;
邓实川 committed
511

tangzhaoqian committed
512 513
	/**
	 * 查询-操作日志
翁国栋 committed
514
	 *
tangzhaoqian committed
515 516 517 518 519
	 * @param
	 * @return
	 */
	@PostMapping(value = "/select_oper_log")
	@ApiOperation(value = "查询-操作日志", httpMethod = "POST", notes = "查询-操作日志")
邓实川 committed
520 521
	public Result<Object> selectOperLog(@CurrentUser UserBean userBean,
			@RequestBody QyzxOperLogQuaryDto qyzxOperLogQuaryDto) {
tangzhaoqian committed
522 523
		IPage<QyzxOperLog> page = new Page<QyzxOperLog>(
				qyzxOperLogQuaryDto.getCurrentPage() == null ? 1 : qyzxOperLogQuaryDto.getCurrentPage(),
邓实川 committed
524 525
				qyzxOperLogQuaryDto.getTotalPage() == null ? 10 : qyzxOperLogQuaryDto.getTotalPage());

tangzhaoqian committed
526
		qyzxOperLogQuaryDto.setOrgCode(userBean.getOrgCode());
邓实川 committed
527 528 529
//		IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery(page, qyzxOperLogQuaryDto);

		if (qyzxOperLogQuaryDto.getEmpNums() == null) {
530 531 532 533 534 535 536 537 538 539 540

			List<Integer> roles = new ArrayList<Integer>();
			roles.add(SysRoleType.U_TYPE_ADMIN.getType());
			roles.add(SysRoleType.U_TYPE_C_ADMIN.getType());

			List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build()
					.selectList(new LambdaQueryWrapper<QyzxEmpEntAsso>()
							.eq(QyzxEmpEntAsso::getOrgCode, userBean.getOrgCode())
							.in(QyzxEmpEntAsso::getUserType, roles).select(QyzxEmpEntAsso::getEmpNum));

			List<Integer> empNums = list.stream().map(QyzxEmpEntAsso::getEmpNum).collect(Collectors.toList());
邓实川 committed
541 542 543
			qyzxOperLogQuaryDto.setEmpNums(empNums);
		}
		IPage<QyzxOperLog> pages = qyzxOperLogMapper.selectPageByQuery2(page, qyzxOperLogQuaryDto);
tangzhaoqian committed
544
		List<QyzxOperLog> listOl = pages.getRecords();
邓实川 committed
545

tangzhaoqian committed
546 547
		return ResultUtil.data(pages, listOl, "操作成功!");
	}
翁国栋 committed
548

ilal committed
549 550 551
	@PostMapping(value = "/menusequencedata")
	@ApiOperation(value = "菜单顺序数据", httpMethod = "POST", notes = "")
	public Result<Object> menusequencedata(@CurrentUser UserBean userBean) {
翁国栋 committed
552

ilal committed
553 554 555 556 557 558 559 560 561 562 563 564 565
		List<MenuStructureDto> mestrs = new ArrayList<MenuStructureDto>();
		List<QyzxAdminMenu> qyme = QyzxAdminMenu.builder().build().selectList(new QueryWrapper<QyzxAdminMenu>().lambda().eq(QyzxAdminMenu::getOrgCode, userBean.getOrgCode()).orderByAsc(QyzxAdminMenu::getSortNumber));
		String[] zdy = new String[qyme.size()];
		int i  = 0;
		for(QyzxAdminMenu me : qyme) {
			MenuStructureDto metr = MenuStructureDto.builder().build();
			metr.setMenuCode(me.getMenuCode());
			metr.setMenuName(me.getMenuName());
			metr.setSortNumber(me.getSortNumber());
			metr.setPath("");
			mestrs.add(metr);
			zdy[i] = me.getMenuCode();
			i++;
翁国栋 committed
566
		}
ilal committed
567 568 569
		//
		List<AdminMenuTemplate> adtes = AdminMenuTemplate.builder().build().selectList(new QueryWrapper<AdminMenuTemplate>().lambda().eq(AdminMenuTemplate::getEnable, 1).orderByAsc(AdminMenuTemplate::getSortNumber));
		for(AdminMenuTemplate adm : adtes) {
翁国栋 committed
570

ilal committed
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588
			if(!ClockInTool.useArrayUtils(ClockInTool.deleteArrayNull(zdy), adm.getMenuCode())) {
				if(adm.getDistribution() == 0 && userBean.getOrgCode() == 3) {
					MenuStructureDto metr = MenuStructureDto.builder().build();
					metr.setMenuCode(adm.getMenuCode());
					metr.setMenuName(adm.getMenuName());
					metr.setSortNumber(adm.getSortNumber());
					metr.setPath("");
					mestrs.add(metr);
				}else if(adm.getDistribution() == 1) {
					MenuStructureDto metr = MenuStructureDto.builder().build();
					metr.setMenuCode(adm.getMenuCode());
					metr.setMenuName(adm.getMenuName());
					metr.setSortNumber(adm.getSortNumber());
					metr.setPath("");
					mestrs.add(metr);
				}
			}
		}
翁国栋 committed
589

ilal committed
590 591
		return ResultUtil.data(mestrs, "成功");
	}
翁国栋 committed
592 593


ilal committed
594 595
	@PostMapping(value = "/menustructure")
	@ApiOperation(value = "菜单结构", httpMethod = "POST", notes = "")
ilal committed
596
	public Result<Object> menustructure(@CurrentUser UserBean userBean,@RequestBody List<QyzxAdminMenu> qymu) {
翁国栋 committed
597

ilal committed
598
		QyzxAdminMenu.builder().build().delete(new QueryWrapper<QyzxAdminMenu>().lambda().eq(QyzxAdminMenu::getOrgCode, userBean.getOrgCode()));
翁国栋 committed
599

ilal committed
600 601 602 603 604 605 606 607 608
		for(QyzxAdminMenu me : qymu) {
			QyzxAdminMenu meu = QyzxAdminMenu.builder().build();
			meu.setMenuCode(me.getMenuCode());
			meu.setMenuName(me.getMenuName());
			meu.setSortNumber(me.getSortNumber());
			meu.setOrgCode(userBean.getOrgCode());
			meu.setAddtime(new Date().getTime());
			meu.insert();
		}
翁国栋 committed
609 610


ilal committed
611
		return ResultUtil.data(qymu, "修改成功");
ilal committed
612
	}
翁国栋 committed
613

ilal committed
614 615 616
	@PostMapping(value = "/corporatecolor")
	@ApiOperation(value = "菜单自定义颜色", httpMethod = "POST", notes = "")
	public Result<Object> corporatecolor(@CurrentUser UserBean userBean) {
翁国栋 committed
617

ilal committed
618
		QyzxAdminColour cdys = QyzxAdminColour.builder().build().selectOne(new QueryWrapper<QyzxAdminColour>().lambda().eq(QyzxAdminColour::getOrgCode, userBean.getOrgCode()));
翁国栋 committed
619

mobh committed
620
		return ResultUtil.data(cdys, "查询成功");
ilal committed
621
	}
翁国栋 committed
622

ilal committed
623 624 625 626

	@PostMapping(value = "/customcolor")
	@ApiOperation(value = "菜单自定义颜色", httpMethod = "POST", notes = "")
	public Result<Object> customcolor(@CurrentUser UserBean userBean,@RequestBody QyzxAdminColour cdys) {
翁国栋 committed
627

ilal committed
628 629 630
		cdys.setOrgCode(userBean.getOrgCode());
		cdys.setAddtime(new Date().getTime());
		cdys.insertOrUpdate();
翁国栋 committed
631

mobh committed
632
		return ResultUtil.data(cdys, "保存成功");
ilal committed
633
	}
翁国栋 committed
634

邓实川 committed
635

636 637
	/**
	 * 删除-操作日志
翁国栋 committed
638
	 *
639 640 641 642 643
	 * @param
	 * @return
	 */
	@DeleteMapping(value = "/delete_oper_log")
	@ApiOperation(value = "删除-操作日志", httpMethod = "DELETE", notes = "查询-操作日志")
邓实川 committed
644 645
	public Result<Object> deleteOperLog(@CurrentUser UserBean userBean, @RequestBody Integer[] ids) {

646 647
		ArrayList<Integer> list = CollUtil.toList(ids);
		int delCount = qyzxOperLogMapper.deleteBatchIds(list);
邓实川 committed
648

649 650
		return ResultUtil.data(delCount, "操作成功!");
	}
yuquan.zhu committed
651

翁国栋 committed
652 653 654 655 656 657 658 659
	/**
	 * 运营后台---企业信息列表
	 * @param
	 * @param cdys
	 * @return
	 */
	@PostMapping(value = "/companyAdminList")
	@ApiOperation(value = "运营后台---企业信息列表", httpMethod = "POST", notes = "")
翁国栋 committed
660
	public Result<Object> companyAdminList(@RequestBody EntInfoDto entInfoDto) {
翁国栋 committed
661
		Map map = Maps.newHashMap();
翁国栋 committed
662 663
		List<EntInfoDto> list = Optional.ofNullable(qyzxEntInfoMMapper.companyAdminList(entInfoDto)).orElse(Lists.newArrayList());
		Integer count = qyzxEntInfoMMapper.companyAdminCount(entInfoDto);
翁国栋 committed
664 665 666 667 668 669 670 671 672 673 674 675 676 677
		map.put("list",list);
		map.put("count",count);
		return ResultUtil.data(map);
	}
	@GetMapping(value = "/selectentbyId")
	@ApiOperation(value = "运营后台---获取企业信息", httpMethod = "GET", notes = "接口发布说明")
	public Result<Object> selectentbyId(@RequestParam("id") String id) {
		QyzxEntInfoM qyzxEntInfoM = QyzxEntInfoM.builder().id(Integer.parseInt(id)).build().selectById();
		return ResultUtil.data(qyzxEntInfoM, "获取企业信息成功");
	}
	@PostMapping(value = "/aeCompamy")
	@ApiOperation(value = "运营后台---添加/修改企业信息", httpMethod = "POST", notes = "接口发布说明")
	@Log(title = "运营后台---添加/修改-企业信息", businessType = BusinessType.UPDATE)
	public Result<QyzxEntInfoM> aeCompamy(@RequestBody QyzxEntInfoM qyzxEntInfoM) {
翁国栋 committed
678

翁国栋 committed
679 680
		QyzxEntInfoM q = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
				.eq(QyzxEntInfoM::getId, qyzxEntInfoM.getId()).one();
翁国栋 committed
681 682 683
		boolean b1;
		if (q == null) {
			try {
翁国栋 committed
684 685 686 687 688
				QyzxEntInfoM gsif = QyzxEntInfoM.builder().build().selectOne(new QueryWrapper<QyzxEntInfoM>().lambda().eq(QyzxEntInfoM::getName, qyzxEntInfoM.getName()));
				if(gsif!=null){
					return ResultUtil.error("企业名称已存在");
				}
				qyzxEntInfoM.setRegisterTime(new Date());
翁国栋 committed
689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819
			QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
					.eq(!StrUtil.hasBlank(qyzxEntInfoM.getPhone()), QyzxEmpLogin::getPhone, qyzxEntInfoM.getPhone()).one();
			if (login != null) {
				Integer count = new LambdaQueryChainWrapper<QyzxEmpEntAsso>(qyzxEmpEntAssoMapper)
						.eq(QyzxEmpEntAsso::getEmpNum, login.getId())
						.eq(QyzxEmpEntAsso::getUserType, SysRoleType.U_TYPE_ADMIN.getType()).count();
				//将密码改为注册企业输入的密码 2021//11/11 wgd
				login.setPw(Md5.md5("123456"));
				if (count > max) {
					return ResultUtil.error("已注册过企业");
				}
			}
			b1 =qyzxEntInfoM.insert();
			Integer qyId = qyzxEntInfoM.getId();
			if (login == null) {
				// 员工信息
				QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(qyzxEntInfoM.getPhone()).pw(Md5.md5("123456"))
						.sts(CommonEnum.U_STS_ON.getType()).orgId(qyId).regTime(DateUtil.date()).build();
				boolean b2 = qyzxEmpLogin.insert();
				if (!b2) {
					TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
					return ResultUtil.error("注册企业失败2");
				}
				login = qyzxEmpLogin;
			} else {
				login.setOrgId(qyId);
				login.updateById();
			}
			// 员工信息
			boolean b4 = YgglMainEmp.builder().orgCode(qyId).empNum(login.getId()).rzTime(new Date()).name(qyzxEntInfoM.getLinkMan())
					.phone(qyzxEntInfoM.getPhone()).jobType(YgEnumInterface.YgJobType.QUANZHI.getType())
					.jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType()).build().insert();
			if (!b4) {
				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
				return ResultUtil.error("注册企业失败3");
			}
			QyzxEmpEntAsso qyzxEmpEntAsso = QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(qyzxEntInfoM.getId())
					.status(1).userType(SysRoleType.U_TYPE_ADMIN.getType()).build();
			boolean b3 = qyzxEmpEntAsso.insert();
			if (!b3) {
				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
				return ResultUtil.error("注册企业失败4");
			}

			SpmkService.createCustomApproval(qyzxEntInfoM.getId());
			//企业注册添加10条短信
			RegisterHelper.companyRegister(qyId,login.getId());
				// *****************************考勤假期初始化
				// 获取模板数据
//			List<KqglAssoLeaveRules> ruless = new LambdaQueryChainWrapper<KqglAssoLeaveRules>(kqglassoleaverulesmapper)
//					.eq(KqglAssoLeaveRules::getOrgCode, 0).list();
				List<KqglAssoLeaveRulesT> ruless = KqglAssoLeaveRulesT.builder().build().selectAll();
				// 查询当前公司是否已初始化
				KqglAssoLeaveRules rule = kqglassoleaverulesmapper.selectOne(new QueryWrapper<KqglAssoLeaveRules>().lambda()
						.eq(KqglAssoLeaveRules::getOrgCode, qyzxEntInfoM.getId()).eq(KqglAssoLeaveRules::getLeaveType, 1)
						.last("LIMIT 1"));
				if (rule == null) {
					List<KqglAssoLeaveRules> rullist = new ArrayList<KqglAssoLeaveRules>();

					for (KqglAssoLeaveRulesT rul : ruless) {
						KqglAssoLeaveRules vice = KqglAssoLeaveRules.builder().name(rul.getName()).company(rul.getCompany())
								.leaveType(rul.getLeaveType()).apply(rul.getApply()).createTime(new Date().getTime())
								.createUserid(999).orgCode(qyzxEntInfoM.getId()).isOpen(rul.getIsOpen())
								.leaveBalance(rul.getLeaveBalance()).rulesType(rul.getRulesType()).build();
						rullist.add(vice);
					}
					if (rullist.size() > 0) {
						kqglassoleaverulesmapper.insertleaverulesList(rullist);
					}
					Logoutput("操作成功!");
				} else {
					Logoutput("重复初始化数据!");
				}

				//建立初始化的加班规则
				KqglAssoOvertimeRulesM jbgzdef = KqglAssoOvertimeRulesM.builder().build().selectOne(new QueryWrapper<KqglAssoOvertimeRulesM>().lambda().eq(KqglAssoOvertimeRulesM::getOvertimeruledefault, 1));
				KqglAssoOvertimeRules Rules =  KqglAssoOvertimeRules.builder().build();
				Rules.setOrgCode(qyzxEntInfoM.getId());
				BeanUtil.copyProperties(jbgzdef, Rules , "orgCode");
				Rules.insert();

				//假期规则初始化
				String current_time = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
				List<KqglAssoLeaveRules> rul = KqglAssoLeaveRules.builder().build().selectList(new QueryWrapper<KqglAssoLeaveRules>().lambda().eq(KqglAssoLeaveRules::getOrgCode, qyId));
				for(KqglAssoLeaveRules r : rul) {
					if(r.getLeaveBalance() == 0) {
						KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(-1).modifyUserid(login.getId()).modifyTimer(current_time).orgCode(qyId).build().insert();
					}else {
						KqglAssoLeaveEmployeeBalance.builder().leaveRulesId(r.getId()).userid(login.getId()).balanceDays(0.0).modifyUserid(login.getId()).modifyTimer(current_time).orgCode(qyId).build().insert();
					}
				}

				//加班基础设置
				KqglAssoOvertimeBasics.builder().minimumUnit(3).modifyUserid(999).modifyTime(new Date().getTime()).orgCode(qyzxEntInfoM.getId()).build().insert();

				//报税周期设置
				XcglAssoBszqsz.builder().taxReturnCycle(2).qyid(qyzxEntInfoM.getId()).build().insert();

				// 绩效设置初始化
				JxglBasicSetting bS = jxglService.selectAT(qyId);
				if (bS == null) {
					boolean res = jxglService.initJxglBasicSetting(qyId);
					if (!res) {
						throw new CustomException("绩效设置异常");
					}
				}

				/********** 默认企业讯息添加 ***********/
				CmsContent cmsContent = CmsContent.builder().build();

				cmsContent.setTitle(title);
				cmsContent.setPublisherName(author);
				cmsContent.setAuthor(author);
				cmsContent.setModularid(1);
				cmsContent.setFmtpath(cover);
				cmsContent.setSummary(summary);
				cmsContent.setStatus(1);
				cmsContent.setOrganizationId(qyId);
				cmsContent.setReleasestate(0);
				cmsContent.setAddeddate(new Date().getTime());
				cmsContent.setReleasetime(String.valueOf(new Date().getTime()));
				cmsContent.insert();

				/********** 默认企业讯息添加 ***********/

				return ResultUtil.success("注册企业成功");
			} catch (Exception e) {
				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
				e.printStackTrace();
				return ResultUtil.error("注册异常");
			}
翁国栋 committed
820
		}
翁国栋 committed
821 822 823 824 825 826 827 828
		b1 =qyzxEntInfoM.updateById();
		if (!b1) {
			TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
			return ResultUtil.error("注册企业失败1");
		}



翁国栋 committed
829 830
		return ResultUtil.data(qyzxEntInfoM, "添加/修改企业");
	}
翁国栋 committed
831
	@GetMapping(value = "/getCompanySelect")
翁国栋 committed
832 833 834 835
	@ApiOperation(value = "运营后台---获取选择框下的企业信息", httpMethod = "POST", notes = "接口发布说明")
	public Result<Object> getCompanySelect() {
		return ResultUtil.data(qyzxEntInfoMMapper.getCompanyList(), "获取成功");
	}
翁国栋 committed
836 837 838 839 840 841 842 843 844 845
	public void Logoutput(String science) {

		if(!("pro").equals(environmental_science)) {

			System.out.println(science);
		}else {
			System.out.println("");
		}

	}
翁国栋 committed
846

yuquan.zhu committed
847
}