13 files modified
1 files added
| | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | //String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | |
| | | /** |
| | | * sql connect |
| | | */ |
| | | String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | //String sql_connect_dev = "jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true"; |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | //String ftpHost_dev = "192.168.0.108"; |
| | | String ftpHost_dev = "192.168.0.108"; |
| | | |
| | | /** |
| | | * ftp服务器IP地址 |
| | | */ |
| | | String ftpHost_dev = "172.19.1.30"; |
| | | //String ftpHost_dev = "172.19.1.30"; |
| | | |
| | | /** |
| | | * ftp服务器端口 |
| | |
| | | /** |
| | | * ftp服务器用户名 |
| | | */ |
| | | String ftpUserName = "yly"; |
| | | //String ftpUserName = "anonymous"; |
| | | //String ftpUserName = "yly"; |
| | | String ftpUserName = "anonymous"; |
| | | |
| | | /** |
| | | * ftp服务器密码 |
| | | */ |
| | | String ftpPassword = "Yly@123"; |
| | | //String ftpPassword = ""; |
| | | //String ftpPassword = "Yly@123"; |
| | | String ftpPassword = ""; |
| | | |
| | | |
| | | /** |
| | | * ftp服务器路径 |
| | | */ |
| | | String ftpPath = "yly/anbao/"; |
| | | //String ftpPath = "anbao/"; |
| | | //String ftpPath = "yly/anbao/"; |
| | | String ftpPath = "anbao/"; |
| | | |
| | | /** |
| | | * 本地路径 |
| | | */ |
| | | String localPath = "/home/zhongsong/anbao/"; |
| | | //String localPath = "D:\\anbao\\"; |
| | | //String localPath = "/home/zhongsong/anbao/"; |
| | | String localPath = "D:\\anbao\\"; |
| | | |
| | | |
| | | //minio内网ip |
| | | String ip = "http://47.49.21.216:9000"; |
| | | //String 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\\"; |
| New file |
| | |
| | | package org.springblade.common.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 部门 |
| | | */ |
| | | @Data |
| | | public class DeptVo implements Serializable { |
| | | |
| | | private Long id; |
| | | private String deptName; |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | public static String TestJson(String fileName){ |
| | | //File file = new File("D:\\anbao\\"+fileName); |
| | | //File file = new File(FtpConstant.jsonUrl+fileName); |
| | | File file = new File(FtpConstant.jsonUrl +fileName); |
| | | StringBuilder localStrBulider = new StringBuilder(); |
| | | if(file.isFile() && file.exists()) { |
| | |
| | | permit.setStorage("1"); |
| | | permit.setPermitime(new Date()); |
| | | permitService.save(permit); |
| | | String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(permit.getEstablishtime()); |
| | | String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(permit.getPermitime()); |
| | | String s = "insert into sys_permit(id,creditCode,enterpriseName,representative,establishTime," + |
| | | String s = "insert into sys_permit(id,creditCode,enterpriseName,representative," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,jurisdiction,cardid)" + |
| | | "values(" + "'" + permit.getId() + "'" + "," + "'" + permit.getCreditcode() + "'" + "," + "'" + permit.getEnterprisename() + "'" + "," + "'" |
| | | + permit.getRepresentative() + "'" + "," + |
| | | "'" + formatStr + "'" + "," + "'" + permit.getRegisteredcapital() + "'" + "," + "'" |
| | | + permit.getRepresentative() + "'" + "," +"'" + permit.getRegisteredcapital() + "'" + "," + "'" |
| | | + permit.getOrganizationcode() + "'" + "," + "'" + permit.getRegistrationnumber() + "'" + "," + |
| | | "'" + permit.getIdentificationnumber() + "'" + "," + "'" + permit.getEnterprises() + "'" + "," + "'" + |
| | | permit.getAddress() + "'" + "," + "'" + permit.getBusiness() + "'" + "," + "'" + |
| | |
| | | record.setType("2"); |
| | | record.setPermitime(new Date()); |
| | | recordService.save(record); |
| | | String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getEstablishtime()); |
| | | String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime()); |
| | | String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime()); |
| | | String s = "insert into sys_record(id,creditCode,enterpriseName,representative,establishtime," + |
| | | "registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," + |
| | | "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction,cardid)" + |
| | | "values(" + "'" + record.getId() + "'" + "," + "'" + record.getCreditcode() + "'" + "," + "'" + record.getEnterprisename() + "'" + "," + "'"+ record.getRepresentative() + "'" + "," + |
| | | "'" + formatStr + "'" + "," + "'" + record.getRegisteredcapital() + "'" + "," + "'" |
| | | "values(" + "'" + record.getId() + "'" + "," + "'" + record.getCreditcode() + "'" + "," + "'" + record.getEnterprisename() + "'" + "," + "'"+ record.getRepresentative() + "'" + "," + "'" + record.getRegisteredcapital() + "'" + "," + "'" |
| | | + record.getOrganizationcode() + "'" + "," + "'" + record.getRegistrationnumber() + "'" + "," + |
| | | "'" + record.getIdentificationnumber() + "'" + "," + "'" + record.getEnterprises() + "'" + "," + "'" + |
| | | record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" + |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.MapKey; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.common.vo.DeptVo; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.node.TreeNodes; |
| | | import org.springblade.modules.system.vo.DeptVO; |
| | |
| | | */ |
| | | List<DeptVO> securityLazyTree(String jurisdiction, Long parentId); |
| | | List<DeptVO> selectInfo(); |
| | | |
| | | /** |
| | | * 查询所有的部门信息 |
| | | * @return |
| | | */ |
| | | List<DeptVo> selDeptList(); |
| | | /** |
| | | * 懒加载获取部门树形结构(包含用户数据) |
| | | * @return |
| | |
| | | and dept.id !=1420222961377357825 |
| | | and dept.parent_id!=1420222961377357825 |
| | | </select> |
| | | |
| | | <!--查询所有的部门信息--> |
| | | <select id="selDeptList" resultType="org.springblade.common.vo.DeptVo"> |
| | | select id ,dept_name deptName from blade_dept where is_deleted=0 |
| | | </select> |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="tree" resultMap="treeNodeResultMap"> |
| | | select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0 |
| | | select id, parent_id, role_name as title, id as "value", id as "key" from blade_role where is_deleted = 0 AND id!=1123598816738675201 |
| | | <if test="param1!=null"> |
| | | and tenant_id = #{param1} |
| | | </if> |
| | |
| | | package org.springblade.modules.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import org.springblade.common.vo.DeptVo; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | import org.springblade.modules.system.node.TreeNodes; |
| | | import org.springblade.modules.system.vo.DeptVO; |
| | |
| | | */ |
| | | List<DeptVO> securityLazyTree(String jurisdiction, Long parentId); |
| | | List<DeptVO> selectInfo(); |
| | | |
| | | List<DeptVo> selDeptList(); |
| | | /** |
| | | * 懒加载获取部门树形结构(包含用户数据) |
| | | * @return |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.vo.DeptVo; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | |
| | | public List<DeptVO> selectInfo() { |
| | | return ForestNodeMerger.merge(baseMapper.selectInfo()); |
| | | } |
| | | |
| | | @Override |
| | | public List<DeptVo> selDeptList() { |
| | | return baseMapper.selDeptList(); |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.vo.DeptVo; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DigestUtil; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.information.entity.Information; |
| | | import org.springblade.modules.system.entity.User; |
| | | import org.springblade.modules.system.service.IDeptService; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.zc.entity.Zc; |
| | | import org.springblade.modules.zc.service.IZcService; |
| | | import org.springblade.modules.zc.vo.ZcVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.annotations.ApiIgnore; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 控制器 |
| | |
| | | private final IZcService zcService; |
| | | |
| | | private IUserService iUserService; |
| | | |
| | | private final IDeptService deptFeignApi; |
| | | |
| | | /** |
| | | * 详情 |
| | |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入zc") |
| | | public R<IPage<ZcVO>> page(ZcVO zc, Query query) { |
| | | IPage<ZcVO> pages = zcService.selectZcPage(Condition.getPage(query), zc); |
| | | return R.data(pages); |
| | | //获取部门数据 |
| | | List<DeptVo> deptVos = deptFeignApi.selDeptList(); |
| | | IPage<ZcVO> page = zcService.selectZcPage(Condition.getPage(query), zc); |
| | | for (int j = 0; j < page.getRecords().size(); j++) { |
| | | if (page.getRecords().get(j).getDeptid() != null && !page.getRecords().get(j).getDeptid().equals("")){ |
| | | String[] split = page.getRecords().get(j).getDeptid().split(","); |
| | | List<String> list = Arrays.asList(split); |
| | | StringBuffer deptNameBuiffer = new StringBuffer(); |
| | | //数据匹配封装 |
| | | for (String deptId:list) { |
| | | for (DeptVo deptVo:deptVos) { |
| | | if (deptId.equals(deptVo.getId().toString())){ |
| | | deptNameBuiffer.append(deptVo.getDeptName()).append(","); |
| | | } |
| | | } |
| | | } |
| | | //封装部门名称数据 |
| | | page.getRecords().get(j).setDeptName(deptNameBuiffer.substring(0,deptNameBuiffer.length()-1)); |
| | | } |
| | | } |
| | | return R.data(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | if (type.equals("1")){ |
| | | User user = new User(); |
| | | user.setAccount(zc.getUsername()); |
| | | user.setTenantId("000000"); |
| | | user.setPassword(DigestUtil.encrypt(zc.getPassword())); |
| | | user.setRealName(zc.getSname()); |
| | | user.setCardid(zc.getCardid()); |
| | | user.setRoleId("1433232531179704321"); |
| | | user.setRoleId(zc.getParentId()); |
| | | user.setDeptId(zc.getDeptid()); |
| | | iUserService.saveOrUpdate(user); |
| | | } |
| | |
| | | @ApiModelProperty(value = "审核状态") |
| | | private String type; |
| | | private String deptid; |
| | | private String parentId; |
| | | |
| | | |
| | | } |
| | |
| | | <mapper namespace="org.springblade.modules.zc.mapper.ZcMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="zcResultMap" type="org.springblade.modules.zc.entity.Zc"> |
| | | <resultMap id="zcResultMap" type="org.springblade.modules.zc.vo.ZcVO"> |
| | | <id column="id" property="id"/> |
| | | <result column="username" property="username"/> |
| | | <result column="password" property="password"/> |
| | |
| | | <result column="zctime" property="zctime"/> |
| | | <result column="type" property="type"/> |
| | | <result column="deptid" property="deptid"/> |
| | | <result column="parentId" property="parentId"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | z.sname, |
| | | z.cardid, |
| | | z.type, |
| | | d.dept_name AS deptid |
| | | z.deptid |
| | | FROM |
| | | act_zc z |
| | | LEFT JOIN blade_dept d ON d.id = z.deptid where 1=1 |
| | | act_zc z where 1=1 |
| | | <if test="zc.type!=null and zc.type!=''"> |
| | | and z.type=#{zc.type} |
| | | </if> |
| | | <if test="zc.sname!=null and zc.sname!=''"> |
| | | and z.sname like concat(concat('%', #{zc.sname}),'%') |
| | | </if> |
| | | <if test="zc.username!=null and zc.username!=''"> |
| | | and z.username like concat(concat('%', #{zc.username}),'%') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | @ApiModel(value = "ZcVO对象", description = "ZcVO对象") |
| | | public class ZcVO extends Zc { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String deptName; |
| | | } |