Commit 0c61c730 authored by 卜远杰's avatar 卜远杰

三期患者信息

parent 2b2a6143
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>aidea-modules</artifactId>
<groupId>com.cftech</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>authentication-module-web</artifactId>
<packaging>war</packaging>
<name>authentication-module-web Maven Webapp</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>authentication-module</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>authentication-module-web</finalName>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>aidea-modules</artifactId>
<groupId>com.cftech</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>authentication-module</artifactId>
<dependencies>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>sys-module</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package com.cftech.authentication.dao;
import com.cftech.authentication.model.Authentication;
import com.cftech.core.generic.GenericDao;
/**
* 身份验证Mapper
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
public interface AuthenticationMapper extends GenericDao<Authentication> {
}
\ No newline at end of file
<?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.cftech.authentication.dao.AuthenticationMapper">
<resultMap id="resultMap" type="com.cftech.authentication.model.Authentication">
<id column="id" property="id"/>
<result column="id_card" property="idCard"/>
<result column="name" property="name"/>
<result column="accounts_id" property="accountsId"/>
<result column="del_flag" property="delFlag"/>
<result column="status" property="status"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
<result column="description" property="description"/>
<result column="create_by" property="createBy"/>
<result column="update_by" property="updateBy"/>
</resultMap>
<sql id="sqlWhere">
<if test="conds!=null">
<trim prefix="WHERE" prefixOverrides="AND|OR">
<foreach collection="conds.conds" index="index" item="cond">
${cond.linkType}
<if test="cond.condType == 'EQUAL'">${cond.param} = #{cond.value}</if>
<if test="cond.condType == 'NOTEQUAL'">${cond.param} &lt;&gt; #{cond.value}</if>
<if test="cond.condType == 'GREATEQUAL'">${cond.param} &gt;= #{cond.value}</if>
<if test="cond.condType == 'GREATTHAN'">${cond.param} &gt; #{cond.value}</if>
<if test="cond.condType == 'LESSEQUAL'">${cond.param} &lt;= #{cond.value}</if>
<if test="cond.condType == 'LESSTHAN'">${cond.param} &lt; #{cond.value}</if>
<if test="cond.condType == 'BETWEEN'">${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if test="cond.condType == 'ISNULL'">${cond.param} IS NULL</if>
<if test="cond.condType == 'NOTNULL'">${cond.param} IS NOT NULL</if>
<if test="cond.condType == 'LIKE'">${cond.param} LIKE #{cond.value}</if>
<if test="cond.condType == 'IN'">${cond.param} IN
<foreach item="item" index="index" collection="cond.value" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql id="sqlColumns">
id,
id_card,
name,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
<insert id="save" parameterType="com.cftech.authentication.model.Authentication" useGeneratedKeys="true"
keyProperty="id">
insert into t_aidea_authentication
(
<include refid="sqlColumns"/>
)
values
(
#{id, jdbcType=BIGINT},
#{idCard, jdbcType=VARCHAR},
#{name, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
</insert>
<select id="fetchById" parameterType="java.lang.Long" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_authentication t
WHERE t.id=#{id}
</select>
<select id="count" parameterType="java.util.Map" resultType="java.lang.Integer">
SELECT COUNT(1) FROM t_aidea_authentication
<include refid="sqlWhere"/>
</select>
<select id="fetchSearchByPage" parameterType="java.util.Map" resultMap="resultMap">
SELECT
<include refid="sqlColumns"/>
FROM t_aidea_authentication
<include refid="sqlWhere"/>
<if test="sort!=null">ORDER BY ${sort.param} ${sort.type}</if>
<if test="limit>0">limit #{offset},#{limit}</if>
</select>
<update id="update" parameterType="com.cftech.authentication.model.Authentication">
update t_aidea_authentication
<set>
<if test="id != null">
id = #{id, jdbcType=BIGINT},
</if>
<if test="idCard != null">
id_card = #{idCard, jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name, jdbcType=VARCHAR},
</if>
<if test="accountsId != null">
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if test="delFlag != null">
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if test="status != null">
status = #{status, jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if test="description != null">
description = #{description, jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if test="updateBy != null">
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update id="delete" parameterType="java.lang.Long">
update t_aidea_authentication set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
package com.cftech.authentication.model;
import com.cftech.core.poi.ExportConfig;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 身份验证
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
@Data
public class Authentication implements Serializable {
/* 主键id */
private Long id;
@ExportConfig(value = "姓名", width = 100)
private String name;
/* 省份证号码 */
@ExportConfig(value = "省份证号码", width = 100)
private String idCard;
/* 所属的账号 */
private Long accountsId;
/* 删除标识 */
private boolean delFlag;
/* 状态 */
private String status;
/* 更新时间 */
private Date updateTime;
/* 备注 */
@ExportConfig(value = "描述")
private String description;
/* 创建时间 */
@ExportConfig(value = "创建时间",width = 150,showLevel = 1)
private Date createTime;
/* 创建人 */
private Long createBy;
/* 更新人 */
private Long updateBy;
public Authentication() {
this.delFlag = false;
this.status = "0";
}
}
\ No newline at end of file
package com.cftech.authentication.service;
import com.cftech.authentication.model.Authentication;
import com.cftech.core.generic.GenericService;
/**
* 身份验证Service
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
public interface AuthenticationService extends GenericService<Authentication> {
}
package com.cftech.authentication.service.impl;
import com.cftech.authentication.model.Authentication;
import com.cftech.authentication.dao.AuthenticationMapper;
import com.cftech.authentication.service.AuthenticationService;
import com.cftech.core.generic.GenericDao;
import com.cftech.core.generic.GenericServiceImpl;
import com.cftech.core.sql.Conds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
/**
* 身份验证ServiceImpl
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
@Service("authenticationService")
public class AuthenticationServiceImpl extends GenericServiceImpl<Authentication> implements AuthenticationService {
@Autowired
@Qualifier("authenticationMapper")
private AuthenticationMapper authenticationMapper;
@Override
public GenericDao<Authentication> getGenericMapper() {
return authenticationMapper;
}
}
\ No newline at end of file
package com.cftech.authentication.web;
import com.alibaba.fastjson.JSONObject;
import com.cftech.authentication.model.Authentication;
import com.cftech.authentication.service.AuthenticationService;
import com.cftech.core.poi.ExcelKit;
import com.cftech.core.scope.OrderType;
import com.cftech.core.sql.Conds;
import com.cftech.core.sql.Sort;
import com.cftech.core.util.Constants;
import com.cftech.sys.security.PermissionSign;
import com.cftech.sys.security.UserUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.IOException;
import java.util.List;
/**
* 身份验证Controller
* <p>
* 权限字符串说明:
* 查看:public static final String AUTHENTICATION_VIEW = "qy:authentication:view"
* 查看:public static final String AUTHENTICATION_EDIT = "qy:authentication:edit"
*
* @author Buyj
* @date: 2020-11-23 16:56
*/
@Slf4j
@Controller
@RequestMapping("/a/authentication")
public class AuthenticationController {
public static final String AUTHENTICATION_VIEW = "qy:authentication:view";
public static final String AUTHENTICATION_EDIT = "qy:authentication:edit";
@Autowired
private AuthenticationService authenticationService;
//列表页面
@RequiresPermissions(value = AUTHENTICATION_VIEW)
@RequestMapping("/list")
public String list(HttpServletRequest request, Model model) {
Long accountId = UserUtils.getmpaccounts(request);
model.addAttribute("accountId", accountId);
return "authentication/authenticationlist";
}
//编辑页面(新增、修改)
@RequiresPermissions(value = AUTHENTICATION_VIEW)
@RequestMapping("/form")
public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) {
Authentication authentication = authenticationService.fetchById(id);
model.addAttribute("data", authentication);
}
return "authentication/authenticationform";
}
//提交数据(新增、修改)
@RequiresPermissions(value = AUTHENTICATION_EDIT)
@RequestMapping("/formData")
@ResponseBody
public JSONObject formData(Authentication authentication, Model model, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
JSONObject rtnJson = new JSONObject();
try {
if (authentication != null && authentication.getId() != null) {
authentication.setUpdateBy(UserUtils.getUser().getId());
authenticationService.update(authentication);
rtnJson.put("errorNo", 0);
} else {
authentication.setAccountsId(accountsId);
authentication.setDelFlag(false);
authentication.setAccountsId(UserUtils.getmpaccounts(request));
authentication.setCreateBy(UserUtils.getUser().getId());
authentication.setUpdateBy(UserUtils.getUser().getId());
authenticationService.save(authentication);
rtnJson.put("errorNo", 2);
}
} catch (Exception e) {
rtnJson.put("errorNo", 1);
}
return rtnJson;
}
//获取列表数据
@RequiresPermissions(value = AUTHENTICATION_VIEW)
@RequestMapping(value = "/listData")
@ResponseBody
public JSONObject listData(int iDisplayStart, int iDisplayLength, Authentication authentication, HttpServletRequest request) {
Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountsId);
if (!StringUtils.isEmpty(authentication.getName())) {
conds.like("name", authentication.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC);
List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, iDisplayStart, iDisplayLength);
Integer counts = authenticationService.count(conds);
JSONObject rtnJson = new JSONObject();
rtnJson.put("iTotalRecords", counts);
rtnJson.put("iTotalDisplayRecords", counts);
rtnJson.put("aaData", list);
return rtnJson;
}
//删除数据
@RequiresPermissions(value = AUTHENTICATION_EDIT)
@RequestMapping("/delete")
@ResponseBody
public JSONObject delete(String id) {
JSONObject rtnJosn = new JSONObject();
try {
authenticationService.delete(id);
rtnJosn.put("errorNo", 0);
} catch (Exception e) {
rtnJosn.put("errorNo", 1);
}
return rtnJosn;
}
@RequestMapping("/exportExcel")
@RequiresPermissions(value = AUTHENTICATION_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
Long accountId = UserUtils.getmpaccounts(request);
Conds conds = new Conds();
conds.equal("del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountId);
if (!StringUtils.isEmpty(authentication.getName())) {
conds.like("name", authentication.getName());
}
Sort sort = new Sort("create_time", OrderType.DESC);
List<Authentication> list = authenticationService.fetchSearchByPage(conds, sort, 0, 0);
ExcelKit.$Export(Authentication.class, response).toExcel(list, "身份验证信息");
}
@RequestMapping("/templateExcel")
@RequiresPermissions(value = AUTHENTICATION_VIEW)
public void templateExcel(HttpServletRequest request, HttpServletResponse response) {
ExcelKit.$Export(Authentication.class, response).toExcel(null, "身份验证信息");
}
@RequestMapping("/importExcel")
@RequiresPermissions(value = AUTHENTICATION_EDIT)
@ResponseBody
public JSONObject importExcel(HttpServletRequest request, MultipartFile file, Model model) {
JSONObject retJson = new JSONObject();
Long accountId = UserUtils.getmpaccounts(request);
StringBuffer sb = new StringBuffer();
if (file == null) {
retJson.put("errorNo", "1");
retJson.put("errorMsg", "未选择导入文件");
return retJson;
}
// 构造临时路径来存储上传的文件
String uploadPath = System.getProperty("java.io.tmpdir");
File uploadDir = new File(uploadPath);
if (!uploadDir.exists()) {
uploadDir.mkdir();
}
String fileName = file.getOriginalFilename();
String filePath = uploadPath + File.separator + fileName;
File storeFile = new File(filePath);
try {
file.transferTo(storeFile);
ExcelKit.$Import().setEmptyCellValue("").readExcel(storeFile, rowData -> {
Authentication authentication = new Authentication();
authentication.setAccountsId(accountId);
if (!StringUtils.isEmpty(rowData.get(0))) {
authentication.setName(rowData.get(0));
}
if (!StringUtils.isEmpty(rowData.get(1))) {
if (rowData.get(1).length() == 15 || rowData.get(1).length() == 18){
authentication.setIdCard(rowData.get(1));
}else{
sb.append(rowData.get(0)+",");
return;
}
}
if (!StringUtils.isEmpty(rowData.get(2))) {
authentication.setDescription(rowData.get(2));
}
authenticationService.save(authentication);
});
} catch (IOException e) {
log.error(e.getMessage());
}
retJson.put("errorNo", "0");
if(sb.length() > 0){
retJson.put("errorMsg","部分导入失败,原因:未填写正确的身份证号码,导入失败名称:"+sb.toString());
}else{
retJson.put("errorMsg", "导入成功");
}
return retJson;
}
}
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/consultSheet/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/consultSheet/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
...@@ -132,7 +132,7 @@ ...@@ -132,7 +132,7 @@
<a href="javascript:void(0)" class="btn btn-primary search">搜索</a> <a href="javascript:void(0)" class="btn btn-primary search">搜索</a>
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button> <button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
#if($shiro.hasPermission("qy:consultSheet:edit")) #if($shiro.hasPermission("qy:consultSheet:edit"))
<a href="#springUrl('/a/consultSheet/exportExcel')" class="btn btn-primary">导出</a> <button type="submit" class="btn btn-primary">导出</button>
#end #end
</form> </form>
......
...@@ -32,5 +32,11 @@ ...@@ -32,5 +32,11 @@
<artifactId>shipping-address-module</artifactId> <artifactId>shipping-address-module</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>shipping-address-module</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>
\ No newline at end of file
...@@ -17,6 +17,9 @@ public class ConsultSheetVO { ...@@ -17,6 +17,9 @@ public class ConsultSheetVO {
@ExportConfig(value = "咨询单编码", width = 100, showLevel = 1) @ExportConfig(value = "咨询单编码", width = 100, showLevel = 1)
private String consultId; private String consultId;
@ExportConfig(value = "订单编号" , width = 100, showLevel = 1)
private String orderCode;
/* 用药人name */ /* 用药人name */
@ExportConfig(value = "用药人姓名", width = 100, showLevel = 1) @ExportConfig(value = "用药人姓名", width = 100, showLevel = 1)
private String userName; private String userName;
...@@ -53,5 +56,14 @@ public class ConsultSheetVO { ...@@ -53,5 +56,14 @@ public class ConsultSheetVO {
@ExportConfig(value = "客服姓名", width = 100, showLevel = 1) @ExportConfig(value = "客服姓名", width = 100, showLevel = 1)
private String customerName; private String customerName;
@ExportConfig(value = "拒绝原因" , width = 100 , showLevel = 1)
private String description;
@ExportConfig(value = "提交时间" , width = 100, showLevel = 1)
private String createTime;
@ExportConfig(value = "审核时间" , width = 100, showLevel = 1)
private String auditTime;
} }
...@@ -203,26 +203,47 @@ public class ConsultSheetController { ...@@ -203,26 +203,47 @@ public class ConsultSheetController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = CONSULTSHEET_VIEW) @RequiresPermissions(value = CONSULTSHEET_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response, ConsultSheet consultSheet) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("a.create_time", OrderType.ASC); Sort sort = new Sort("a.create_time", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("a.del_flag", 0); if (StringUtils.isNoneBlank(consultSheet.getConsultId())) {
conds.like("a.consult_id", "%" + consultSheet.getConsultId() + "%");
}
if (StringUtils.isNoneBlank(consultSheet.getStartCreateTime())) {
conds.greatEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getStartCreateTime());
}
if (StringUtils.isNoneBlank(consultSheet.getEndCreateTime())) {
conds.lessEqual("DATE_FORMAT(a.create_time, '%Y-%m-%d')", consultSheet.getEndCreateTime());
}
if (StringUtils.isNoneBlank(consultSheet.getStartAuditTime())) {
conds.greatEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getStartAuditTime());
}
if (StringUtils.isNoneBlank(consultSheet.getEndAuditTime())) {
conds.lessEqual("DATE_FORMAT(a.audit_time, '%Y-%m-%d')", consultSheet.getEndAuditTime());
}
conds.equal("a.del_flag", Constants.DEL_FLAG_0);
conds.equal("a.accounts_id", accountId);
List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, 0, 0); List<ConsultSheet> list = consultSheetService.fetchSearchByPage(conds, sort, 0, 0);
List<ConsultSheetVO> consultSheetVOS = new LinkedList<>(); List<ConsultSheetVO> consultSheetVOS = new LinkedList<>();
for (ConsultSheet consultSheet : list) { ConsultSheetVO consultSheetVO = null;
ConsultSheetVO consultSheetVO = new ConsultSheetVO(); for (ConsultSheet consultSheetObj : list) {
consultSheetVO.setConsultId(consultSheet.getConsultId()); consultSheetVO = new ConsultSheetVO();
consultSheetVO.setUserName(consultSheet.getUserName()); consultSheetVO.setOrderCode(consultSheetObj.getOrderCode());
consultSheetVO.setSex(consultSheet.getSex() == 1 ? "男" : "女"); consultSheetVO.setConsultId(consultSheetObj.getConsultId());
consultSheetVO.setPhone(consultSheet.getPhone()); consultSheetVO.setUserName(consultSheetObj.getUserName());
consultSheetVO.setPastRecords("0".equals(consultSheet.getPastRecords()) ? "否" : "是"); consultSheetVO.setSex(consultSheetObj.getSex() == 1 ? "男" : "女");
consultSheetVO.setIllness("0".equals(consultSheet.getIllness()) ? "否" : "是"); consultSheetVO.setPhone(consultSheetObj.getPhone());
consultSheetVO.setAllergy("0".equals(consultSheet.getAllergy()) ? "否" : "是"); consultSheetVO.setPastRecords("0".equals(consultSheetObj.getPastRecords()) ? "否" : "是");
consultSheetVO.setStatus("0".equals(consultSheet.getStatus()) ? "未审核" : "1".equals(consultSheet.getStatus()) ? "已通过" : "已拒绝"); consultSheetVO.setIllness("0".equals(consultSheetObj.getIllness()) ? "否" : "是");
consultSheetVO.setPharmaName(consultSheet.getPharmaName()); consultSheetVO.setAllergy("0".equals(consultSheetObj.getAllergy()) ? "否" : "是");
consultSheetVO.setCustomerName(consultSheet.getCustomerName()); consultSheetVO.setStatus("0".equals(consultSheetObj.getStatus()) ? "未审核" : "1".equals(consultSheetObj.getStatus()) ? "已通过" : "已拒绝");
consultSheetVO.setPharmaName(consultSheetObj.getPharmaName());
consultSheetVO.setCustomerName(consultSheetObj.getCustomerName());
consultSheetVO.setDescription(consultSheetObj.getDescription());
consultSheetVO.setCreateTime(DateUtils.formatDateTime(consultSheetObj.getCreateTime()));
consultSheetVO.setAuditTime(consultSheetObj.getAuditTime() == null? "" : consultSheetObj.getAuditTime());
consultSheetVOS.add(consultSheetVO); consultSheetVOS.add(consultSheetVO);
} }
ExcelKit.$Export(ConsultSheetVO.class, response).toExcel(consultSheetVOS, "咨询单信息"); ExcelKit.$Export(ConsultSheetVO.class, response).toExcel(consultSheetVOS, "咨询单信息");
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/order/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/order/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" <input type="text" class="form-control"
name="number" value="" placeholder="订单编号"> name="number" value="" placeholder="订单编号">
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
<button type="button" class="btn btn-info" onclick="clearSearch()">重置</button> <button type="button" class="btn btn-info" onclick="clearSearch()">重置</button>
#if($shiro.hasPermission("qy:order:edit")) #if($shiro.hasPermission("qy:order:edit"))
<!-- <a href="#springUrl('/a/order/form')" class="btn btn-primary">新增</a>--> <!-- <a href="#springUrl('/a/order/form')" class="btn btn-primary">新增</a>-->
<a href="#springUrl('/a/order/exportExcel')" class="btn btn-primary">导出</a> <button type="submit" class="btn btn-primary">导出</button>
#end #end
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>--> <!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
......
...@@ -12,28 +12,48 @@ import java.util.Date; ...@@ -12,28 +12,48 @@ import java.util.Date;
*/ */
@Data @Data
public class OrderVO { public class OrderVO {
/* 产品编码 */ @ExportConfig(value = "订单编码" , width = 100, showLevel = 1)
@ExportConfig(value = "商品编码", width = 100, showLevel = 1) private String number;
private String productNumber;
/* 产品名称 */ @ExportConfig(value = "咨询单编码", width = 100 , showLevel = 1)
private String consultCode;
@ExportConfig(value = "商品名称", width = 100, showLevel = 1) @ExportConfig(value = "商品名称", width = 100, showLevel = 1)
private String productName; private String productName;
/* 订单金额 */
@ExportConfig(value = "订单金额", width = 100, showLevel = 1) @ExportConfig(value = "订单金额", width = 100, showLevel = 1)
private Double orderAmount; private Double orderAmount;
/* 收货地址 */
@ExportConfig(value = "收货地址", width = 100, showLevel = 1) @ExportConfig(value = "付款金额" , width = 100, showLevel = 1)
private String address; private Double totalAmount;
@ExportConfig(value = "昵称" , width = 100, showLevel = 1)
private String nickName;
@ExportConfig(value = "openId" , width = 100,showLevel = 1)
private String openid;
@ExportConfig(value = "快递单号", width = 100, showLevel = 1) @ExportConfig(value = "快递单号", width = 100, showLevel = 1)
private String courierNumber; private String courierNumber;
@ExportConfig(value = "订单状态", width = 100, showLevel = 1)
private String payStatus;
private String productNumber;
private String address;
/* 交易号 支付宝/第三方平台 返回订单号 */ /* 交易号 支付宝/第三方平台 返回订单号 */
@ExportConfig(value = "支付交易号", width = 100, showLevel = 1) @ExportConfig(value = "支付交易号", width = 100, showLevel = 1)
private String tradeNo; private String tradeNo;
@ExportConfig(value = "是否开发票",width = 100,showLevel = 1)
private String confirm;
/* 创建时间 */ /* 创建时间 */
@ExportConfig(value = "创建时间", width = 100, showLevel = 1) @ExportConfig(value = "创建时间", width = 100, showLevel = 1)
private String createTime; private String createTime;
/* 订单状态 */
@ExportConfig(value = "订单状态", width = 100, showLevel = 1)
private String payStatus;
} }
...@@ -219,25 +219,81 @@ public class OrderController { ...@@ -219,25 +219,81 @@ public class OrderController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = ORDER_VIEW) @RequiresPermissions(value = ORDER_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response, Order order) {
Long accountId = UserUtils.getmpaccounts(request); Long accountId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("o.create_time", OrderType.ASC); Sort sort = new Sort("o.create_time", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("o.del_flag", 0); conds.equal("o.del_flag", 0);
conds.equal("o.accounts_id", accountId); conds.equal("o.accounts_id", accountId);
//咨询单编码
if (StringUtils.isNoneBlank(order.getConsultCode())) {
conds.like("cs.consult_id", order.getConsultCode());
}
//订单编码
if (StringUtils.isNoneBlank(order.getNumber())) {
conds.like("o.number", order.getNumber());
}
//产品名称
if (StringUtils.isNoneBlank(order.getProductNameTmp())) {
conds.like("t.product_name", order.getProductNameTmp());
}
//顺丰运单号
if (StringUtils.isNoneBlank(order.getCourierNumber())) {
conds.like("o.courier_number", order.getCourierNumber());
}
//订单开始金额
if (StringUtils.isNoneBlank(order.getStartOrderAmount())) {
conds.greatEqual("o.order_amount", order.getStartOrderAmount());
}
//订单结束金额
if (StringUtils.isNoneBlank(order.getEndOrderAmount())) {
conds.lessEqual("o.order_amount", order.getEndOrderAmount());
}
//最终开始金额
if (StringUtils.isNoneBlank(order.getStartPayAmount())) {
conds.greatEqual("o.total_amount", order.getStartPayAmount());
}
//最终结束金额
if (StringUtils.isNoneBlank(order.getEndPayAmount())) {
conds.lessEqual("o.total_amount", order.getEndPayAmount());
}
//订单状态
if (StringUtils.isNoneBlank(order.getStatus())) {
conds.equal("o.status", order.getStatus());
}
//是否开票
if (StringUtils.isNoneBlank(order.getIsBill()) && StringUtils.equals(order.getIsBill(), "1")) {//未开票
conds.isNull("o.confirm");
} else if (StringUtils.isNoneBlank(order.getIsBill()) && StringUtils.equals(order.getIsBill(), "0")) {//已开票
conds.notNull("o.confirm");
}
//订单开始时间
if (StringUtils.isNoneBlank(order.getOrderStartTime())) {
conds.greatEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderStartTime());
}
//订单结束时间
if (StringUtils.isNoneBlank(order.getOrderEndTime())) {
conds.lessEqual("DATE_FORMAT(o.create_time, '%Y-%m-%d')", order.getOrderEndTime());
}
List<Order> list = orderService.fetchSearchByPage(conds, sort, 0, 0); List<Order> list = orderService.fetchSearchByPage(conds, sort, 0, 0);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
LinkedList<OrderVO> orderVOS = new LinkedList<>(); LinkedList<OrderVO> orderVOS = new LinkedList<>();
for (Order order : list) { OrderVO orderVO = null;
OrderVO orderVO = new OrderVO(); for (Order orderObject : list) {
orderVO.setProductNumber(order.getProductNumber()); orderVO = new OrderVO();
orderVO.setProductName(order.getProductName()); orderVO.setNumber(orderObject.getNumber());
orderVO.setOrderAmount(order.getOrderAmount()); orderVO.setConsultCode(orderObject.getConsultCode());
orderVO.setAddress(order.getAddress()); orderVO.setProductName(orderObject.getProductName());
orderVO.setCourierNumber(order.getCourierNumber()); orderVO.setOrderAmount(orderObject.getOrderAmount());
orderVO.setTradeNo(order.getTradeNo()); orderVO.setTotalAmount(orderObject.getTotalAmount());
orderVO.setCreateTime(simpleDateFormat.format(order.getCreateTime())); orderVO.setNickName(orderObject.getNickName());
orderVO.setPayStatus(order.getPayStatus().equals("0") ? "待确认" : order.getPayStatus().equals("1") ? "待付款" : order.getPayStatus().equals("2") ? "待发货" :order.getPayStatus().equals("3") ? "待收货":order.getPayStatus().equals("4") ? "已完成" :"已取消"); orderVO.setOpenid(orderObject.getOpenid());
orderVO.setCourierNumber(orderObject.getCourierNumber());
orderVO.setTradeNo(orderObject.getTradeNo());
orderVO.setPayStatus(orderObject.getPayStatus() == null ? "" : orderObject.getPayStatus() == 0 ? "待确认" : orderObject.getPayStatus() == 1 ? "待付款" : orderObject.getPayStatus() == 2 ? "待发货" :orderObject.getPayStatus() == 3 ? "待收货":
orderObject.getPayStatus() == 4 ? "已完成" :"已取消");
orderVO.setConfirm(StringUtils.isNotBlank(orderObject.getConfirm()) ? "是":"否");
orderVO.setCreateTime(simpleDateFormat.format(orderObject.getCreateTime()));
orderVOS.add(orderVO); orderVOS.add(orderVO);
} }
ExcelKit.$Export(OrderVO.class, response).toExcel(orderVOS, "订单管理信息"); ExcelKit.$Export(OrderVO.class, response).toExcel(orderVOS, "订单管理信息");
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
<module>reportform-module-web</module> <module>reportform-module-web</module>
<module>waybill-module</module> <module>waybill-module</module>
<module>waybill-module-web</module> <module>waybill-module-web</module>
<module>authentication-module</module>
<module>authentication-module-web</module>
</modules> </modules>
......
...@@ -63,7 +63,10 @@ public class ProductDetailController { ...@@ -63,7 +63,10 @@ public class ProductDetailController {
@RequestMapping("/form") @RequestMapping("/form")
public String form(HttpServletRequest request, String id, Model model) { public String form(HttpServletRequest request, String id, Model model) {
if (!StringUtils.isEmpty(id)) { if (!StringUtils.isEmpty(id)) {
ProductDetail productDetail = productDetailService.fetchById(id); Conds conds = new Conds();
conds.equal("d.del_flag",0);
conds.equal("d.id",id);
ProductDetail productDetail = productDetailService.fetchSearchByConds(conds);
model.addAttribute("data", productDetail); model.addAttribute("data", productDetail);
} }
return "productDetail/productDetailform"; return "productDetail/productDetailform";
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box"> <div class="box">
<div class="box-header"> <div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/waybill/list')" method="get"> <form id="seachTableForm" action="#springUrl('/a/waybill/exportExcel')" method="get">
<div class="col-xs-2"> <div class="col-xs-2">
<input type="text" class="form-control" name="number" placeholder="物流编码"> <input type="text" class="form-control" name="number" placeholder="物流编码">
</div> </div>
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<button type="button" class="search btn btn-primary">搜索</button> <button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:waybill:edit")) #if($shiro.hasPermission("qy:waybill:edit"))
<!--<a href="#springUrl('/a/waybill/form')" class="btn btn-primary">新增</a>--> <!--<a href="#springUrl('/a/waybill/form')" class="btn btn-primary">新增</a>-->
<a href="#springUrl('/a/waybill/exportExcel')" class="btn btn-primary">导出</a> <button type="submit" class="btn btn-primary">导出</button>
<!--<a onclick="importExcel();" class="btn btn-primary">导入</a>--> <!--<a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end #end
</div> </div>
......
...@@ -18,73 +18,76 @@ public class Waybill implements Serializable { ...@@ -18,73 +18,76 @@ public class Waybill implements Serializable {
/* 主键id */ /* 主键id */
private Long id; private Long id;
/* 咨询单Id */ /* 咨询单Id */
@ExportConfig(value = "咨询单Id", width = 100, showLevel = 1)
private Long consultId; private Long consultId;
/* 订单Id */ /* 订单Id */
@ExportConfig(value = "订单Id", width = 100, showLevel = 1)
private Long orderId; private Long orderId;
/* 物流单编码 */ /* 物流单编码 */
@ExportConfig(value = "物流单编码", width = 100, showLevel = 1) @ExportConfig(value = "物流单编码", width = 100, showLevel = 1)
private String number; private String number;
/* 会员Id */ /* 会员Id */
@ExportConfig(value = "会员Id", width = 100, showLevel = 1)
private String memberId; private String memberId;
/* 粉丝Id */ /* 粉丝Id */
@ExportConfig(value = "粉丝Id", width = 100, showLevel = 1)
private String openId; private String openId;
/* 仓管员Id */ /* 仓管员Id */
@ExportConfig(value = "仓管员Id", width = 100, showLevel = 1)
private String storageManage; private String storageManage;
/* 顺丰运单号 */ /* 顺丰运单号 */
@ExportConfig(value = "顺丰运单号", width = 100, showLevel = 1) @ExportConfig(value = "顺丰运单号", width = 100, showLevel = 1)
private String waybillNo; private String waybillNo;
/* 语言 */ /* 语言 */
@ExportConfig(value = "语言", width = 100, showLevel = 1)
private String language; private String language;
/* 顺丰月结卡号 */ /* 顺丰月结卡号 */
@ExportConfig(value = "顺丰月结卡号", width = 100, showLevel = 1)
private String monthlyCard; private String monthlyCard;
/**
* 会员名称
*/
@ExportConfig(value = "会员名称", width = 100, showLevel = 1)
private String memberName;
@ExportConfig(value = "联系人", width = 100, showLevel = 1)
private String contact;
/* 快件产品类型 */ /* 快件产品类型 */
@ExportConfig(value = "快件产品类型", width = 100, showLevel = 1)
private String expressTypeId; private String expressTypeId;
/* 温度范围控制 1:冷藏 3:冷冻 */ /* 温度范围控制 1:冷藏 3:冷冻 */
@ExportConfig(value = "温度范围控制 1:冷藏 3:冷冻", width = 100, showLevel = 1)
private String temperatureRange; private String temperatureRange;
/* 联系人 */ /* 联系人 */
@ExportConfig(value = "联系人", width = 100, showLevel = 1)
private String contact;
/* 联系电话 */ /* 联系电话 */
@ExportConfig(value = "联系电话", width = 100, showLevel = 1) @ExportConfig(value = "联系电话", width = 100, showLevel = 1)
private String mobile; private String mobile;
/* 省份 */ /* 省份 */
@ExportConfig(value = "省份", width = 100, showLevel = 1)
private String province; private String province;
/* 城市 */ /* 城市 */
@ExportConfig(value = "城市", width = 100, showLevel = 1)
private String city; private String city;
/* 县/区级行政区名称 */ /* 县/区级行政区名称 */
@ExportConfig(value = "县/区级行政区名称", width = 100, showLevel = 1)
private String county; private String county;
/* 地址Id */ /* 地址Id */
@ExportConfig(value = "地址Id", width = 100, showLevel = 1)
private String addressId; private String addressId;
/* 详细地址 */ /* 详细地址 */
@ExportConfig(value = "详细地址", width = 100, showLevel = 1)
private String address; private String address;
/* 发件时间 */ /* 发件时间 */
@ExportConfig(value = "发件时间", width = 100, showLevel = 1)
private Date sendExpressDate; private Date sendExpressDate;
/* 收件时间 */ /* 收件时间 */
@ExportConfig(value = "收件时间", width = 100, showLevel = 1)
private Date acceptExpressDate; private Date acceptExpressDate;
/* 运单描述 */ /* 运单描述 */
@ExportConfig(value = "运单描述", width = 100, showLevel = 1)
private String waybillRemark; private String waybillRemark;
/* 所属的账号 */ /* 所属的账号 */
private Long accountsId; private Long accountsId;
/* 删除标识 */ /* 删除标识 */
private boolean delFlag; private boolean delFlag;
/* 状态 */ /* 状态 */
@ExportConfig(value = "物流状态", width = 100, showLevel = 1)
private String status; private String status;
/* 创建时间 */ /* 创建时间 */
private Date createTime; private Date createTime;
...@@ -105,7 +108,7 @@ public class Waybill implements Serializable { ...@@ -105,7 +108,7 @@ public class Waybill implements Serializable {
private String drugsName;//商品名称 private String drugsName;//商品名称
private String drugsCode;//商品编码 private String drugsCode;//商品编码
private String price;//价格 private String price;//价格
private String memberName;//会员名称
private String consultSheetCode;//咨询单编码 private String consultSheetCode;//咨询单编码
private String storageManageName;//仓管员名称 private String storageManageName;//仓管员名称
private String sendExpressDateStr; private String sendExpressDateStr;
......
...@@ -150,12 +150,29 @@ public class WaybillController { ...@@ -150,12 +150,29 @@ public class WaybillController {
@RequestMapping("/exportExcel") @RequestMapping("/exportExcel")
@RequiresPermissions(value = WAYBILL_VIEW) @RequiresPermissions(value = WAYBILL_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response , Waybill waybill) {
Long accountId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Sort sort = new Sort("create_time", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("del_flag", 0); conds.equal("t.del_flag", Constants.DEL_FLAG_0);
conds.equal("accounts_id", accountId); conds.equal("t.accounts_id", accountsId);
if (StringUtils.isNoneBlank(waybill.getNumber())) {
conds.equal("t.number", waybill.getNumber());
}
if (StringUtils.isNoneBlank(waybill.getWaybillNo())) {
conds.equal("t.waybill_no", waybill.getWaybillNo());
}
if (StringUtils.isNoneBlank(waybill.getOrderCode())) {
conds.equal("o.number", waybill.getOrderCode());
}
if (StringUtils.isNoneBlank(waybill.getContact())) {
conds.like("t.contact", "%" + waybill.getContact() + "%");
}
Sort sort = new Sort("t.create_time", OrderType.DESC);
List<Waybill> list = waybillService.fetchSearchByPage(conds, sort, 0, 0); List<Waybill> list = waybillService.fetchSearchByPage(conds, sort, 0, 0);
ExcelKit.$Export(Waybill.class, response).toExcel(list, "顺丰物流运单信息"); ExcelKit.$Export(Waybill.class, response).toExcel(list, "顺丰物流运单信息");
} }
......
...@@ -238,49 +238,59 @@ ...@@ -238,49 +238,59 @@
//选择栏目 //选择栏目
$("#columnSelect").click(function () { $("#columnSelect").click(function () {
var type = $("#typeselect").val(); var type = $("#typeselect").val();
if (type == "4") { if ( type =="" || type == null ){
columnUrl ="#springUrl('/a/wxQrcode/listOrg')" Cfapp.alert({
} else { message: "请先选择二维码类型",
columnUrl ="#springUrl('/a/wxQrcode/listUser?type=" + type + "')" btntext: "确定",
} success: function () {
var title = type == "4" ? "人员名称" : "组织名称";
Cfapp.f7({
dataUrl: columnUrl,
checkType: 'single', // 多选为multi
title: "选择二维码绑定对象",
btnoktext: "确定",
btncanceltext: "取消",
columns: ['选择', title],
isSearch: '0',
searchColumns: ["name"],//搜索的字段名称
searchColumnsRemarks: [title],//搜索的字段备注
aoColumns: [{
"mData": "id"
}, {
"mData": "name"
}],
aoColumnDefs: [{
"aTargets": [0],
"mData": "id",
"mRender": function (a, b, c, d) {
return '<input class="bindId" value="' + a + '" type="radio" id="' + a + '" name="sel" data-value="' + a + '" data-name="' + c.name + '">';
}
}, {
"aTargets": [1],
"mData": "name",
"mRender": function (a, b, c, d) {//a表示createtime对应的值,c表示当前记录行对象
return a;
} }
}], });
success: function () { } else {
if (type == "4") {
columnUrl ="#springUrl('/a/wxQrcode/listOrg')"
} else {
columnUrl ="#springUrl('/a/wxQrcode/listUser?type=" + type + "')"
}
var title = type == "4" ? "组织名称" : "人员名称";
Cfapp.f7({
dataUrl: columnUrl,
checkType: 'single', // 多选为multi
title: "选择二维码绑定对象",
btnoktext: "确定",
btncanceltext: "取消",
columns: ['选择', title],
isSearch: '0',
searchColumns: ["name"],//搜索的字段名称
searchColumnsRemarks: [title],//搜索的字段备注
aoColumns: [{
"mData": "id"
}, {
"mData": "name"
}],
aoColumnDefs: [{
"aTargets": [0],
"mData": "id",
"mRender": function (a, b, c, d) {
return '<input class="bindId" value="' + a + '" type="radio" id="' + a + '" name="sel" data-value="' + a + '" data-name="' + c.name + '">';
}
}, {
"aTargets": [1],
"mData": "name",
"mRender": function (a, b, c, d) {//a表示createtime对应的值,c表示当前记录行对象
return a;
}
}],
success: function () {
}, },
cancel: function () { cancel: function () {
},
storeFields: 'bindId', // 储存的字段
displayFields: 'columnName'
})
}
},
storeFields: 'bindId', // 储存的字段
displayFields: 'columnName'
})
}); });
var recdTypeAdd = function () { var recdTypeAdd = function () {
......
...@@ -49,6 +49,11 @@ public class WxQrcode implements Serializable { ...@@ -49,6 +49,11 @@ public class WxQrcode implements Serializable {
/* 绑定对象 */ /* 绑定对象 */
private String qrcodeNames; private String qrcodeNames;
/**
* 绑定对象显示的名字
*/
private String objectName;
public WxQrcode() { public WxQrcode() {
this.delFlag = false; this.delFlag = false;
this.status = "0"; this.status = "0";
......
...@@ -63,6 +63,7 @@ public class WxQrcodeController { ...@@ -63,6 +63,7 @@ public class WxQrcodeController {
private WxQrcodeUtil wxQrcodeUtil; private WxQrcodeUtil wxQrcodeUtil;
//下载展厅二维码 //下载展厅二维码
@RequestMapping(value = "/downloadcode", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/downloadcode", method = {RequestMethod.GET, RequestMethod.POST})
public void downloadcode(Long id, WxQrcode qrcode, String name, HttpServletRequest request, HttpServletResponse response) throws IOException { public void downloadcode(Long id, WxQrcode qrcode, String name, HttpServletRequest request, HttpServletResponse response) throws IOException {
......
...@@ -259,19 +259,14 @@ public class MemberController { ...@@ -259,19 +259,14 @@ public class MemberController {
Long accountsId = UserUtils.getmpaccounts(request); Long accountsId = UserUtils.getmpaccounts(request);
Conds conds = new Conds(); Conds conds = new Conds();
conds.equal("m.del_flag", Constants.DEL_FLAG_0); conds.equal("m.del_flag", Constants.DEL_FLAG_0);
// conds.equal("m.accounts_id", accountsId);
// if(member.getStatus().equals("1")){ //注册会员
// conds.isNull("m.status");
// }else if(member.getStatus().equals("2")){ //虚拟会员
// conds.equal("m.status",1);
// }
// if (!StringUtils.isEmpty(member.getCompan())) {
// conds.like("m.compan", member.getCompan());
// }
// if (!StringUtils.isEmpty(member.getName())) {
// conds.like("m.name", member.getName());
// }
if (!StringUtils.isEmpty(member.getName())){
conds.like("CONVERT(AES_DECRYPT(m.name,'aideakey') USING UTF8)", member.getName());
}
if (!StringUtils.isEmpty(member.getPhone())){
conds.like("CONVERT(AES_DECRYPT(m.phone,'aideakey') USING UTF8)",member.getPhone());
}
Sort sort = new Sort("m.create_time", OrderType.DESC); Sort sort = new Sort("m.create_time", OrderType.DESC);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
...@@ -311,8 +306,8 @@ public class MemberController { ...@@ -311,8 +306,8 @@ public class MemberController {
} }
// 生成Excel并使用浏览器下载
ExcelKit.$Export(MemberDto.class, response).toExcel(list, "会员信息");
} }
// 生成Excel并使用浏览器下载
ExcelKit.$Export(MemberDto.class, response).toExcel(list, "会员信息");
} }
} }
...@@ -131,8 +131,11 @@ public class MpFanssController { ...@@ -131,8 +131,11 @@ public class MpFanssController {
Long id = UserUtils.getmpaccounts(request); Long id = UserUtils.getmpaccounts(request);
Sort sort = new Sort("t.subscribetime", OrderType.DESC); Sort sort = new Sort("t.subscribetime", OrderType.DESC);
Conds conds = new Conds(); Conds conds = new Conds();
if (StringUtils.isNotBlank(mpFanssEntity.getSource())) {
conds.equal("source", mpFanssEntity.getSource());
}
if (StringUtils.isNotBlank(mpFanssEntity.getNickname())) { if (StringUtils.isNotBlank(mpFanssEntity.getNickname())) {
conds.like("t.nickname", mpFanssEntity.getNickname()); conds.like("CONVERT(AES_DECRYPT(nickname,'aideakey') USING UTF8)", mpFanssEntity.getNickname());
} }
if (StringUtils.isNotBlank(startTime)) { if (StringUtils.isNotBlank(startTime)) {
conds.greatEqual("t.subscribetime", startTime); conds.greatEqual("t.subscribetime", startTime);
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
<module>workshop-module-web</module> <module>workshop-module-web</module>
<module>schaeffler-modules</module> <module>schaeffler-modules</module>
<module>aidea-modules</module> <module>aidea-modules</module>
<module>authentication-module-web</module>
</modules> </modules>
......
...@@ -298,6 +298,12 @@ ...@@ -298,6 +298,12 @@
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<type>war</type> <type>war</type>
</dependency> </dependency>
<dependency>
<groupId>com.cftech</groupId>
<artifactId>authentication-module-web</artifactId>
<version>1.0-SNAPSHOT</version>
<type>war</type>
</dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>portal-web</finalName> <finalName>portal-web</finalName>
......
...@@ -45,6 +45,7 @@ public class QyuserVO implements Serializable { ...@@ -45,6 +45,7 @@ public class QyuserVO implements Serializable {
@ExportConfig(value = "性别", width = 120) @ExportConfig(value = "性别", width = 120)
private String gender; private String gender;
@ExportConfig(value = "峰值", width = 120)
private String peakVal; private String peakVal;
// @ExportConfig(value = "粉丝关注数", width = 100,showLevel=1) // @ExportConfig(value = "粉丝关注数", width = 100,showLevel=1)
......
...@@ -252,7 +252,7 @@ public class OrgUnitController { ...@@ -252,7 +252,7 @@ public class OrgUnitController {
@RequestMapping(value = "/exportExcel",method = {RequestMethod.GET,RequestMethod.POST}) @RequestMapping(value = "/exportExcel",method = {RequestMethod.GET,RequestMethod.POST})
@RequiresPermissions(value = PermissionSign.ORGUNIT_VIEW) @RequiresPermissions(value = PermissionSign.ORGUNIT_VIEW)
public void exportExcel(HttpServletRequest request, HttpServletResponse response) { public void exportExcel(HttpServletRequest request, HttpServletResponse response , OrgUnit orgUnit) {
Long accountId = Long.parseLong(qyAccounts); Long accountId = Long.parseLong(qyAccounts);
Sort sort = new Sort("parent_id", OrderType.ASC); Sort sort = new Sort("parent_id", OrderType.ASC);
Conds conds = new Conds(); Conds conds = new Conds();
...@@ -261,6 +261,12 @@ public class OrgUnitController { ...@@ -261,6 +261,12 @@ public class OrgUnitController {
// User user = UserUtils.getUser(); // User user = UserUtils.getUser();
// Qyuser qyuser = qyuserService.fetchById(user.getUserid()); // Qyuser qyuser = qyuserService.fetchById(user.getUserid());
// Long orgId = qyuser.getOrgId(); // Long orgId = qyuser.getOrgId();
if(!StringUtils.isEmpty(orgUnit.getNumber())){
conds.equal("t.number", orgUnit.getNumber());
}
if (!StringUtils.isEmpty(orgUnit.getOrgName())) {
conds.like("t.org_name", orgUnit.getOrgName());
}
List<OrgUnit> orgunits = orgUnitService.fetchSearchByPage(null, conds, sort, 0, 0); List<OrgUnit> orgunits = orgUnitService.fetchSearchByPage(null, conds, sort, 0, 0);
// 生成Excel并使用浏览器下载 // 生成Excel并使用浏览器下载
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment