2024年1月19日V01.00.51
							parent
							
								
									a401af0608
								
							
						
					
					
						commit
						a88e165a08
					
				| 
						 | 
				
			
			@ -0,0 +1,74 @@
 | 
			
		|||
package com.zcloud.controller.bus;
 | 
			
		||||
 | 
			
		||||
import com.alibaba.fastjson.JSONObject;
 | 
			
		||||
import com.zcloud.controller.base.BaseController;
 | 
			
		||||
import com.zcloud.entity.Page;
 | 
			
		||||
import com.zcloud.entity.PageData;
 | 
			
		||||
import com.zcloud.service.bus.ClassInfoService;
 | 
			
		||||
import com.zcloud.util.HttpClientService;
 | 
			
		||||
import com.zcloud.util.Tools;
 | 
			
		||||
import com.zcloud.util.Warden;
 | 
			
		||||
import org.apache.commons.lang3.StringUtils;
 | 
			
		||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Value;
 | 
			
		||||
import org.springframework.stereotype.Controller;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestParam;
 | 
			
		||||
import org.springframework.web.bind.annotation.ResponseBody;
 | 
			
		||||
import org.springframework.web.multipart.MultipartFile;
 | 
			
		||||
 | 
			
		||||
import javax.servlet.http.HttpServletResponse;
 | 
			
		||||
import java.util.HashMap;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
import java.util.stream.Collectors;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 说明:开课信息
 | 
			
		||||
 * 作者:luoxiaobao
 | 
			
		||||
 * 时间:2023-09-27
 | 
			
		||||
 * 官网:www.zcloudchina.com
 | 
			
		||||
 */
 | 
			
		||||
@Controller
 | 
			
		||||
@RequestMapping("/classMessage")
 | 
			
		||||
public class ClassMessageController extends BaseController {
 | 
			
		||||
 | 
			
		||||
    @Value("${preventionxgf.api.url}")
 | 
			
		||||
    private String xgfUrl;
 | 
			
		||||
 | 
			
		||||
    private static int index = -1;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @Autowired
 | 
			
		||||
    private ClassInfoService classInfoService;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    @RequestMapping(value = "/getUserinfoList")
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    public Object getUserinfoList() throws Exception {
 | 
			
		||||
        Map<String, Object> map = new HashMap<>();
 | 
			
		||||
        PageData condition = new PageData();
 | 
			
		||||
        PageData request = this.getPageData();
 | 
			
		||||
        condition.put("CLASS_MESSAGE_ID", request.getString("CLASS_MESSAGE_ID"));
 | 
			
		||||
        condition.put("CLASS_INFO_ID", request.getString("CLASS_INFO_ID"));
 | 
			
		||||
        condition.put("CER_TYPE", "7498057c4c1f4a11b9a960e66ea04a7a");
 | 
			
		||||
        List<PageData> list = classInfoService.findinfoByCondition(condition);
 | 
			
		||||
        map.put("list", list);
 | 
			
		||||
        map.put("result", "success");
 | 
			
		||||
        return map;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @RequestMapping(value = "/getClassinfo")
 | 
			
		||||
    @ResponseBody
 | 
			
		||||
    public Object getClassinfo() throws Exception {
 | 
			
		||||
        Map<String, Object> map = new HashMap<>();
 | 
			
		||||
        PageData condition = new PageData();
 | 
			
		||||
        PageData request = this.getPageData();
 | 
			
		||||
        condition.put("TRAINUSERS_ID", request.getString("TRAINUSERS_ID"));
 | 
			
		||||
        PageData entity = classInfoService.getClassinfo(condition);
 | 
			
		||||
        map.put("pd", entity);
 | 
			
		||||
        map.put("result", "success");
 | 
			
		||||
        return map;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,34 @@
 | 
			
		|||
package com.zcloud.mapper.dsno2.bus;
 | 
			
		||||
 | 
			
		||||
import com.zcloud.entity.Page;
 | 
			
		||||
import com.zcloud.entity.PageData;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 说明:班级学员表
 | 
			
		||||
 * 作者:luoxiaobao
 | 
			
		||||
 * 时间:2023-09-27
 | 
			
		||||
 * 官网:www.zcloudchina.com
 | 
			
		||||
 */
 | 
			
		||||
public interface ClassInfoMapper {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	/**通过id获取数据
 | 
			
		||||
	 * @param pd
 | 
			
		||||
	 * @throws Exception
 | 
			
		||||
	 */
 | 
			
		||||
 | 
			
		||||
	PageData getClassinfo(PageData pd);
 | 
			
		||||
 | 
			
		||||
	/**批量删除
 | 
			
		||||
	 * @param ArrayDATA_IDS
 | 
			
		||||
	 * @throws Exception
 | 
			
		||||
	 */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	List<PageData> findinfoByCondition(PageData pd);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,27 @@
 | 
			
		|||
package com.zcloud.service.bus;
 | 
			
		||||
 | 
			
		||||
import com.zcloud.entity.Page;
 | 
			
		||||
import com.zcloud.entity.PageData;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 说明:班级学员表
 | 
			
		||||
 * 作者:luoxiaobao
 | 
			
		||||
 * 时间:2023-09-27
 | 
			
		||||
 * 官网:www.zcloudchina.com
 | 
			
		||||
 */
 | 
			
		||||
public interface ClassInfoService {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	public PageData getClassinfo(PageData pd)throws Exception;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	List<PageData> findinfoByCondition(PageData condition) throws Exception;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,43 @@
 | 
			
		|||
package com.zcloud.service.bus.impl;
 | 
			
		||||
 | 
			
		||||
import com.zcloud.entity.Page;
 | 
			
		||||
import com.zcloud.entity.PageData;
 | 
			
		||||
import com.zcloud.mapper.dsno2.bus.ClassInfoMapper;
 | 
			
		||||
import com.zcloud.service.bus.ClassInfoService;
 | 
			
		||||
import com.zcloud.util.Warden;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.stereotype.Service;
 | 
			
		||||
import org.springframework.transaction.annotation.Transactional;
 | 
			
		||||
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 说明:班级学员表
 | 
			
		||||
 * 作者:luoxiaobao
 | 
			
		||||
 * 时间:2023-09-27
 | 
			
		||||
 * 官网:www.zcloudchina.com
 | 
			
		||||
 */
 | 
			
		||||
@Service
 | 
			
		||||
@Transactional //开启事物
 | 
			
		||||
public class ClassInfoServiceImpl implements ClassInfoService {
 | 
			
		||||
 | 
			
		||||
	@Autowired
 | 
			
		||||
	private ClassInfoMapper classInfoMapper;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	public PageData getClassinfo(PageData pd)throws Exception{
 | 
			
		||||
		return classInfoMapper.getClassinfo(pd);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	public List<PageData> findinfoByCondition(PageData condition) throws Exception {
 | 
			
		||||
		return classInfoMapper.findinfoByCondition(condition);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -34,9 +34,7 @@ import net.coobird.thumbnailator.Thumbnails;
 | 
			
		|||
@Component
 | 
			
		||||
public class HiddenExcelImgToSessionView extends AbstractXlsView{
 | 
			
		||||
 | 
			
		||||
	@Value("${http.file.url}")
 | 
			
		||||
	private String fileUrl;
 | 
			
		||||
 | 
			
		||||
	private String fileUrl = "http://192.168.192.201:8991/file/";
 | 
			
		||||
	@Override
 | 
			
		||||
	protected void buildExcelDocument(Map<String, Object> model,
 | 
			
		||||
									  Workbook workbook, HttpServletRequest request,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -38,8 +38,8 @@ import com.zcloud.entity.PageData;
 | 
			
		|||
 */
 | 
			
		||||
public class HiddenExcelImgView extends AbstractXlsView{
 | 
			
		||||
 | 
			
		||||
	@Value("${http.file.url}")
 | 
			
		||||
	private String fileUrl;
 | 
			
		||||
 | 
			
		||||
	private String fileUrl = "http://192.168.192.201:8991/file/";
 | 
			
		||||
 | 
			
		||||
	@Override
 | 
			
		||||
	protected void buildExcelDocument(Map<String, Object> model,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -75,7 +75,7 @@ rocketmq.consumer.group2=edu-admin-edit
 | 
			
		|||
rocketmq.consumer.group1=edu-admin-add
 | 
			
		||||
#rocketmq.name-server=10.0.140.141:9876
 | 
			
		||||
#rocketmq.name-server=192.168.0.70:9876
 | 
			
		||||
rocketmq.name-server=192.168.0.31:9876
 | 
			
		||||
rocketmq.name-server=172.24.151.16:9876
 | 
			
		||||
rocketmq.producer.group=libmiddle
 | 
			
		||||
rocketmq.producer.send-message-timeout=3000
 | 
			
		||||
rocketmq.producer.compress-message-body-threshold=4096
 | 
			
		||||
| 
						 | 
				
			
			@ -90,6 +90,8 @@ mq.topic.eightWork=eightWork
 | 
			
		|||
mq.group.info=scheduled_tasks
 | 
			
		||||
mq.group.eightWork=scheduled_tasks_eightWork
 | 
			
		||||
 | 
			
		||||
http.file.url=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#数据同步topic
 | 
			
		||||
mq.gwj.data.topic=czks_qy_docking
 | 
			
		||||
| 
						 | 
				
			
			@ -98,3 +100,6 @@ mq.gwj.file.topic=czks_qy_dockingPicture
 | 
			
		|||
baseimgpath=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
 | 
			
		||||
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
 | 
			
		||||
 | 
			
		||||
corp.default.pic-path=https://qgqy.qhdsafety.com/
 | 
			
		||||
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -91,6 +91,7 @@ mq.group.eightWork=scheduled_tasks_eightWork
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
corp.default.pic-path=https://qgqy.qhdsafety.com/
 | 
			
		||||
 | 
			
		||||
corp.default.back-end-path=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
http.file.url=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -85,12 +85,14 @@ mq.group.info=scheduled_tasks
 | 
			
		|||
mq.group.eightWork=scheduled_tasks_eightWork
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
corp.default.pic-path=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
corp.default.pic-path=http://192.168.192.201:8991/file/
 | 
			
		||||
corp.default.back-end-path=https://skqhdg.porthebei.com:9004/file/
 | 
			
		||||
#数据同步topic
 | 
			
		||||
mq.gwj.data.topic=czks_docking
 | 
			
		||||
mq.gwj.file.topic=czks_dockingPicture
 | 
			
		||||
#港务局文件服务器前缀
 | 
			
		||||
baseimgpath=https://qgqy.qhdsafety.com/file/
 | 
			
		||||
baseimgpath=http://192.168.192.201:8991/file/
 | 
			
		||||
 | 
			
		||||
cfd.prevention.api.url=http://192.168.0.31:7021/qa-regulatory-cfd
 | 
			
		||||
 | 
			
		||||
http.file.url=http://192.168.192.201:8991/file/
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,9 +4,9 @@ server.port=8091
 | 
			
		|||
#??
 | 
			
		||||
#spring.profiles.active=local
 | 
			
		||||
#<23><><EFBFBD><EFBFBD>31ʱʹ<CAB1><CAB9>
 | 
			
		||||
spring.profiles.active=dev
 | 
			
		||||
#spring.profiles.active=dev
 | 
			
		||||
#??
 | 
			
		||||
#spring.profiles.active=master
 | 
			
		||||
spring.profiles.active=master
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,143 @@
 | 
			
		|||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
			
		||||
<mapper namespace="com.zcloud.mapper.dsno2.bus.ClassInfoMapper">
 | 
			
		||||
 | 
			
		||||
	<!--表名 -->
 | 
			
		||||
	<sql id="tableName">
 | 
			
		||||
		BUS_CLASS_INFO
 | 
			
		||||
	</sql>
 | 
			
		||||
 | 
			
		||||
	<!--数据字典表名 -->
 | 
			
		||||
	<sql id="dicTableName">
 | 
			
		||||
		SYS_DICTIONARIES
 | 
			
		||||
	</sql>
 | 
			
		||||
 | 
			
		||||
	<!-- 字段 -->
 | 
			
		||||
	<sql id="Field">
 | 
			
		||||
		f.CREATE_TIME,
 | 
			
		||||
		f.CREATOR,
 | 
			
		||||
		f.OPERATE_TIME,
 | 
			
		||||
		f.OPERATOR,
 | 
			
		||||
		f.ISDELETE,
 | 
			
		||||
		f.CORPINFO_ID,
 | 
			
		||||
		f.USER_ID,
 | 
			
		||||
		f.STATUS,
 | 
			
		||||
		f.CLASS_MESSAGE_ID,
 | 
			
		||||
		f.CLASS_INFO_ID,
 | 
			
		||||
		f.USERNAME,
 | 
			
		||||
		f.NAME,
 | 
			
		||||
		f.SEX,
 | 
			
		||||
		f.CARD_ID,
 | 
			
		||||
		f.RELEVANT_UNIT_NAME,
 | 
			
		||||
		f.DEPARTMENT_NAME,
 | 
			
		||||
		f.PHOTO,
 | 
			
		||||
		f.PHONE,
 | 
			
		||||
		f.PERSON_WORK_TYPE,
 | 
			
		||||
		f.CERTIFICATE,
 | 
			
		||||
		f.CLASS_NO,
 | 
			
		||||
		f.TRAINUSERS_ID
 | 
			
		||||
	</sql>
 | 
			
		||||
 | 
			
		||||
	<!-- 字段用于新增 -->
 | 
			
		||||
	<sql id="Field2">
 | 
			
		||||
		CREATE_TIME,
 | 
			
		||||
		CREATOR,
 | 
			
		||||
		OPERATE_TIME,
 | 
			
		||||
		OPERATOR,
 | 
			
		||||
		ISDELETE,
 | 
			
		||||
		CORPINFO_ID,
 | 
			
		||||
		USER_ID,
 | 
			
		||||
		STATUS,
 | 
			
		||||
		CLASS_MESSAGE_ID,
 | 
			
		||||
		CLASS_INFO_ID,
 | 
			
		||||
		USERNAME,
 | 
			
		||||
		NAME,
 | 
			
		||||
		SEX,
 | 
			
		||||
		CARD_ID,
 | 
			
		||||
		RELEVANT_UNIT_NAME,
 | 
			
		||||
		DEPARTMENT_NAME,
 | 
			
		||||
		PHOTO,
 | 
			
		||||
		PHONE,
 | 
			
		||||
		PERSON_WORK_TYPE,
 | 
			
		||||
		CERTIFICATE,
 | 
			
		||||
		CLASS_NO,
 | 
			
		||||
		TRAINUSERS_ID
 | 
			
		||||
	</sql>
 | 
			
		||||
 | 
			
		||||
	<!-- 字段值 -->
 | 
			
		||||
	<sql id="FieldValue">
 | 
			
		||||
		#{CREATE_TIME},
 | 
			
		||||
		#{CREATOR},
 | 
			
		||||
		#{OPERATE_TIME},
 | 
			
		||||
		#{OPERATOR},
 | 
			
		||||
		#{ISDELETE},
 | 
			
		||||
		#{CORPINFO_ID},
 | 
			
		||||
		#{USER_ID},
 | 
			
		||||
		#{STATUS},
 | 
			
		||||
		#{CLASS_MESSAGE_ID},
 | 
			
		||||
		#{CLASS_INFO_ID},
 | 
			
		||||
		#{USERNAME},
 | 
			
		||||
		#{NAME},
 | 
			
		||||
		#{SEX},
 | 
			
		||||
		#{CARD_ID},
 | 
			
		||||
		#{RELEVANT_UNIT_NAME},
 | 
			
		||||
		#{DEPARTMENT_NAME},
 | 
			
		||||
		#{PHOTO},
 | 
			
		||||
		#{PHONE},
 | 
			
		||||
		#{PERSON_WORK_TYPE},
 | 
			
		||||
		#{CERTIFICATE},
 | 
			
		||||
		#{CLASS_NO},
 | 
			
		||||
		#{TRAINUSERS_ID}
 | 
			
		||||
	</sql>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	<!-- 通过ID获取数据 -->
 | 
			
		||||
	<select id="getClassinfo" parameterType="pd" resultType="pd">
 | 
			
		||||
		select
 | 
			
		||||
		<include refid="Field"></include>
 | 
			
		||||
		from
 | 
			
		||||
		<include refid="tableName"></include> f
 | 
			
		||||
		where
 | 
			
		||||
		f.TRAINUSERS_ID = #{TRAINUSERS_ID} order by OPERATE_TIME limit 1
 | 
			
		||||
	</select>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	<select id="findinfoByCondition" resultType="com.zcloud.entity.PageData">
 | 
			
		||||
		select distinct
 | 
			
		||||
		a.CREATE_TIME,
 | 
			
		||||
		a.CREATOR,
 | 
			
		||||
		a.OPERATE_TIME,
 | 
			
		||||
		a.OPERATOR,
 | 
			
		||||
		a.ISDELETE,
 | 
			
		||||
		a.CORPINFO_ID,
 | 
			
		||||
		a.USER_ID,
 | 
			
		||||
		a.STATUS,
 | 
			
		||||
		a.CLASS_MESSAGE_ID,
 | 
			
		||||
		a.CLASS_INFO_ID,
 | 
			
		||||
		a.USERNAME,
 | 
			
		||||
		a.NAME,
 | 
			
		||||
		a.SEX,
 | 
			
		||||
		a.CARD_ID,
 | 
			
		||||
		a.RELEVANT_UNIT_NAME,
 | 
			
		||||
		a.DEPARTMENT_NAME,
 | 
			
		||||
		a.PHOTO,
 | 
			
		||||
		a.PHONE,
 | 
			
		||||
		a.PERSON_WORK_TYPE as JOBS_TYPE,
 | 
			
		||||
		a.CERTIFICATE,
 | 
			
		||||
		a.CLASS_NO,
 | 
			
		||||
		a.TRAINUSERS_ID,
 | 
			
		||||
		b.OPENING_TIME,
 | 
			
		||||
		b.VALIDITY_PERIOD_END
 | 
			
		||||
		from bus_class_info a
 | 
			
		||||
		left join bus_class_message b on a.CLASS_MESSAGE_ID = b.CLASS_MESSAGE_ID
 | 
			
		||||
		where a.ISDELETE = '0' and a.STATUS = '1'
 | 
			
		||||
		<if test="CLASS_MESSAGE_ID != null and CLASS_MESSAGE_ID != ''">
 | 
			
		||||
			and a.CLASS_MESSAGE_ID = #{CLASS_MESSAGE_ID}
 | 
			
		||||
		</if>
 | 
			
		||||
		<if test="CLASS_INFO_ID != null and CLASS_INFO_ID != ''">
 | 
			
		||||
			and a.CLASS_INFO_ID = #{CLASS_INFO_ID}
 | 
			
		||||
		</if>
 | 
			
		||||
	</select>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
</mapper>
 | 
			
		||||
		Loading…
	
		Reference in New Issue