Commit fd6e0147 authored by 赵啸非's avatar 赵啸非

添加公共庫

parent 87ee3328
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -137,50 +137,6 @@ public class HomeController extends BaseJsonBodyController { ...@@ -137,50 +137,6 @@ public class HomeController extends BaseJsonBodyController {
return ret; return ret;
} }
/* @PostMapping({"device/list"})
@UnAuth
public Rest<Object> deviceList(@RequestBody DevicePdu queryPdu) {
// IUser user = this.getCurUser();
// if(user==null){
// throw new AppException("用户未登录");
// }
Rest<Object> ret = new Rest();
Map<String, Object> model = new HashMap();
String busiDesc = "查询站点设备列表" ;
int code=1;
try {
if(queryPdu.getSiteId()!=null){
String resp = iApiDeviceFeign.getDeviceByQuery(queryPdu);
ApiResp<JSONObject> apiResp = JSON.parseObject(resp, ApiResp.class);
if (apiResp.getCode() != YesNoEnum.YES.getValue()) {
throw new AppException("获取站点设备列表失败:" + apiResp.getMsg());
}
if(apiResp.getData().get("data")!=null) {
model.put("data", apiResp.getData().get("data"));
model.put("dict", apiResp.getData().get("dict"));
model.put("pageInfo",apiResp.getData().get("pageInfo"));
}else {
model.put("data", Collections.emptyList());
}
}else {
model.put("data", Collections.emptyList());
}
model.put("message_info", busiDesc + "成功");
this.recordSysLog(this.request, busiDesc + " 【成功】");
} catch (Exception var9) {
code = -1;
this.doException(this.request, busiDesc, model, var9);
}
ret.setCode(code);
ret.setData(model);
ret.setDict(model.get("dict"));
ret.setMsg(model.get("message_info") == null ? "" : model.remove("message_info").toString());
return ret;
}*/
/** /**
* 合成表单与模板 * 合成表单与模板
*/ */
......
package com.mortals.xhx.module.matter.model.vo; package com.mortals.xhx.module.matter.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.MatterDatumEntity; import com.mortals.xhx.module.matter.model.MatterDatumEntity;
import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 事项申请材料视图对象 * 事项申请材料视图对象
* *
* @author zxfei * @author zxfei
* @date 2022-09-27 * @date 2022-09-27
*/ */
@Data
public class MatterDatumVo extends BaseEntityLong { public class MatterDatumVo extends BaseEntityLong {
/** /**
* 事项名称 * 事项名称
...@@ -23,27 +28,5 @@ public class MatterDatumVo extends BaseEntityLong { ...@@ -23,27 +28,5 @@ public class MatterDatumVo extends BaseEntityLong {
*/ */
private String deptName; private String deptName;
public String getMatterName() {
return matterName;
}
public void setMatterName(String matterName) {
this.matterName = matterName;
}
public String getMatterNo() {
return matterNo;
}
public void setMatterNo(String matterNo) {
this.matterNo = matterNo;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.matter.model.vo; package com.mortals.xhx.module.matter.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import lombok.Data;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -9,16 +11,10 @@ import java.util.List; ...@@ -9,16 +11,10 @@ import java.util.List;
* @author zxfei * @author zxfei
* @date 2022-09-27 * @date 2022-09-27
*/ */
@Data
public class MatterVo extends BaseEntityLong { public class MatterVo extends BaseEntityLong {
/** 材料数量 */ /** 材料数量 */
private Integer datumCount; private Integer datumCount;
public Integer getDatumCount() {
return datumCount;
}
public void setDatumCount(Integer datumCount) {
this.datumCount = datumCount;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.public.dao;
import com.mortals.framework.dao.ICRUDDao;
import com.mortals.xhx.module.public.model.PublicDatumEntity;
import java.util.List;
/**
* 事项材料公共库Dao
* 事项材料公共库 DAO接口
*
* @author zxfei
* @date 2022-11-10
*/
public interface PublicDatumDao extends ICRUDDao<PublicDatumEntity,Long>{
}
package com.mortals.xhx.module.public.dao.ibatis;
import org.springframework.stereotype.Repository;
import com.mortals.xhx.module.public.dao.PublicDatumDao;
import com.mortals.xhx.module.public.model.PublicDatumEntity;
import java.util.Date;
import com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis;
import java.util.List;
/**
* 事项材料公共库DaoImpl DAO接口
*
* @author zxfei
* @date 2022-11-10
*/
@Repository("publicDatumDao")
public class PublicDatumDaoImpl extends BaseCRUDDaoMybatis<PublicDatumEntity,Long> implements PublicDatumDao {
}
package com.mortals.xhx.module.public.model;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.public.model.vo.PublicDatumVo;
/**
* 事项材料公共库实体对象
*
* @author zxfei
* @date 2022-11-10
*/
public class PublicDatumEntity extends PublicDatumVo {
private static final long serialVersionUID = 1L;
/**
* 事项matter id
*/
private Long matterId;
/**
* 部门ID
*/
private Long deptId;
/**
* 部门编号
*/
private String deptCode;
/**
* 材料名
*/
private String materialName;
/**
* 材料全名
*/
private String materiaFullName;
/**
* 填单次数
*/
private Integer total;
/**
* 排序
*/
private Integer sort;
/**
* 样表名称
*/
private String sampleName;
/**
* 样表地址
*/
private String samplePath;
/**
* 样表预览地址
*/
private String preViewPath;
public PublicDatumEntity(){}
/**
* 获取 事项matter id
* @return Long
*/
public Long getMatterId(){
return matterId;
}
/**
* 设置 事项matter id
* @param matterId
*/
public void setMatterId(Long matterId){
this.matterId = matterId;
}
/**
* 获取 部门ID
* @return Long
*/
public Long getDeptId(){
return deptId;
}
/**
* 设置 部门ID
* @param deptId
*/
public void setDeptId(Long deptId){
this.deptId = deptId;
}
/**
* 获取 部门编号
* @return String
*/
public String getDeptCode(){
return deptCode;
}
/**
* 设置 部门编号
* @param deptCode
*/
public void setDeptCode(String deptCode){
this.deptCode = deptCode;
}
/**
* 获取 材料名
* @return String
*/
public String getMaterialName(){
return materialName;
}
/**
* 设置 材料名
* @param materialName
*/
public void setMaterialName(String materialName){
this.materialName = materialName;
}
/**
* 获取 材料全名
* @return String
*/
public String getMateriaFullName(){
return materiaFullName;
}
/**
* 设置 材料全名
* @param materiaFullName
*/
public void setMateriaFullName(String materiaFullName){
this.materiaFullName = materiaFullName;
}
/**
* 获取 填单次数
* @return Integer
*/
public Integer getTotal(){
return total;
}
/**
* 设置 填单次数
* @param total
*/
public void setTotal(Integer total){
this.total = total;
}
/**
* 获取 排序
* @return Integer
*/
public Integer getSort(){
return sort;
}
/**
* 设置 排序
* @param sort
*/
public void setSort(Integer sort){
this.sort = sort;
}
/**
* 获取 样表名称
* @return String
*/
public String getSampleName(){
return sampleName;
}
/**
* 设置 样表名称
* @param sampleName
*/
public void setSampleName(String sampleName){
this.sampleName = sampleName;
}
/**
* 获取 样表地址
* @return String
*/
public String getSamplePath(){
return samplePath;
}
/**
* 设置 样表地址
* @param samplePath
*/
public void setSamplePath(String samplePath){
this.samplePath = samplePath;
}
/**
* 获取 样表预览地址
* @return String
*/
public String getPreViewPath(){
return preViewPath;
}
/**
* 设置 样表预览地址
* @param preViewPath
*/
public void setPreViewPath(String preViewPath){
this.preViewPath = preViewPath;
}
@Override
public int hashCode() {
return this.getId().hashCode();
}
@Override
public boolean equals(Object obj) {
if (obj == null) return false;
if (obj instanceof PublicDatumEntity) {
PublicDatumEntity tmp = (PublicDatumEntity) obj;
if (this.getId() == tmp.getId()) {
return true;
}
}
return false;
}
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",matterId:").append(getMatterId());
sb.append(",deptId:").append(getDeptId());
sb.append(",deptCode:").append(getDeptCode());
sb.append(",materialName:").append(getMaterialName());
sb.append(",materiaFullName:").append(getMateriaFullName());
sb.append(",total:").append(getTotal());
sb.append(",sort:").append(getSort());
sb.append(",sampleName:").append(getSampleName());
sb.append(",samplePath:").append(getSamplePath());
sb.append(",preViewPath:").append(getPreViewPath());
return sb.toString();
}
public void initAttrValue(){
this.matterId = null;
this.deptId = null;
this.deptCode = "";
this.materialName = "";
this.materiaFullName = "";
this.total = null;
this.sort = null;
this.sampleName = "";
this.samplePath = "";
this.preViewPath = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.public.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.public.model.PublicDatumEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 事项材料公共库视图对象
*
* @author zxfei
* @date 2022-11-10
*/
public class PublicDatumVo extends BaseEntityLong {
}
\ No newline at end of file
package com.mortals.xhx.module.public.service;
import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.public.model.PublicDatumEntity;
/**
* PublicDatumService
*
* 事项材料公共库 service接口
*
* @author zxfei
* @date 2022-11-10
*/
public interface PublicDatumService extends ICRUDService<PublicDatumEntity,Long>{
}
\ No newline at end of file
package com.mortals.xhx.module.public.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context;
import com.mortals.xhx.module.public.dao.PublicDatumDao;
import com.mortals.xhx.module.public.model.PublicDatumEntity;
import com.mortals.xhx.module.public.service.PublicDatumService;
/**
* PublicDatumService
* 事项材料公共库 service实现
*
* @author zxfei
* @date 2022-11-10
*/
@Service("publicDatumService")
public class PublicDatumServiceImpl extends AbstractCRUDServiceImpl<PublicDatumDao, PublicDatumEntity, Long> implements PublicDatumService {
}
\ No newline at end of file
package com.mortals.xhx.module.public.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.public.model.PublicDatumEntity;
import com.mortals.xhx.module.public.service.PublicDatumService;
import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import java.util.Arrays;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*;
/**
*
* 事项材料公共库
*
* @author zxfei
* @date 2022-11-10
*/
@RestController
@RequestMapping("public/datum")
public class PublicDatumController extends BaseCRUDJsonBodyMappingController<PublicDatumService,PublicDatumEntity,Long> {
@Autowired
private ParamService paramService;
public PublicDatumController(){
super.setModuleDesc( "事项材料公共库");
}
@Override
protected void init(Map<String, Object> model, Context context) {
super.init(model, context);
}
}
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<result property="matterNo" column="matterNo" /> <result property="matterNo" column="matterNo" />
<result property="matterFullName" column="matterFullName" /> <result property="matterFullName" column="matterFullName" />
<result property="deptId" column="deptId" /> <result property="deptId" column="deptId" />
<result property="deptCode" column="deptCode" />
<result property="deptName" column="deptName" /> <result property="deptName" column="deptName" />
<result property="total" column="total" /> <result property="total" column="total" />
<result property="sort" column="sort" /> <result property="sort" column="sort" />
...@@ -60,6 +61,9 @@ ...@@ -60,6 +61,9 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))">
a.deptId, a.deptId,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptCode') or colPickMode == 1 and data.containsKey('deptCode')))">
a.deptCode,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))">
a.deptName, a.deptName,
</if> </if>
...@@ -89,18 +93,18 @@ ...@@ -89,18 +93,18 @@
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="MatterEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="MatterEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_matter insert into mortals_xhx_matter
(siteId,tid,tcode,tname,matterName,englishName,matterNo,matterFullName,deptId,deptName,total,sort,isRecommend,source,createTime,createUserId,updateTime) (siteId,tid,tcode,tname,matterName,englishName,matterNo,matterFullName,deptId,deptCode,deptName,total,sort,isRecommend,source,createTime,createUserId,updateTime)
VALUES VALUES
(#{siteId},#{tid},#{tcode},#{tname},#{matterName},#{englishName},#{matterNo},#{matterFullName},#{deptId},#{deptName},#{total},#{sort},#{isRecommend},#{source},#{createTime},#{createUserId},#{updateTime}) (#{siteId},#{tid},#{tcode},#{tname},#{matterName},#{englishName},#{matterNo},#{matterFullName},#{deptId},#{deptCode},#{deptName},#{total},#{sort},#{isRecommend},#{source},#{createTime},#{createUserId},#{updateTime})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_matter insert into mortals_xhx_matter
(siteId,tid,tcode,tname,matterName,englishName,matterNo,matterFullName,deptId,deptName,total,sort,isRecommend,source,createTime,createUserId,updateTime) (siteId,tid,tcode,tname,matterName,englishName,matterNo,matterFullName,deptId,deptCode,deptName,total,sort,isRecommend,source,createTime,createUserId,updateTime)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.siteId},#{item.tid},#{item.tcode},#{item.tname},#{item.matterName},#{item.englishName},#{item.matterNo},#{item.matterFullName},#{item.deptId},#{item.deptName},#{item.total},#{item.sort},#{item.isRecommend},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime}) (#{item.siteId},#{item.tid},#{item.tcode},#{item.tname},#{item.matterName},#{item.englishName},#{item.matterNo},#{item.matterFullName},#{item.deptId},#{item.deptCode},#{item.deptName},#{item.total},#{item.sort},#{item.isRecommend},#{item.source},#{item.createTime},#{item.createUserId},#{item.updateTime})
</foreach> </foreach>
</insert> </insert>
...@@ -143,6 +147,9 @@ ...@@ -143,6 +147,9 @@
<if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))"> <if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))">
a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement}, a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('deptCode')) or (colPickMode==1 and !data.containsKey('deptCode'))">
a.deptCode=#{data.deptCode},
</if>
<if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))"> <if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))">
a.deptName=#{data.deptName}, a.deptName=#{data.deptName},
</if> </if>
...@@ -267,6 +274,13 @@ ...@@ -267,6 +274,13 @@
</choose> </choose>
</foreach> </foreach>
</trim> </trim>
<trim prefix="deptCode=(case" suffix="ELSE deptCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptCode')) or (colPickMode==1 and !item.containsKey('deptCode'))">
when a.id=#{item.id} then #{item.deptCode}
</if>
</foreach>
</trim>
<trim prefix="deptName=(case" suffix="ELSE deptName end),"> <trim prefix="deptName=(case" suffix="ELSE deptName end),">
<foreach collection="data.dataList" item="item" index="index" separator="" > <foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))"> <if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))">
...@@ -618,6 +632,21 @@ ...@@ -618,6 +632,21 @@
</if> </if>
<if test="conditionParamRef.containsKey('deptCode')">
<if test="conditionParamRef.deptCode != null and conditionParamRef.deptCode != ''">
${_conditionType_} a.deptCode like #{${_conditionParam_}.deptCode}
</if>
<if test="conditionParamRef.deptCode == null">
${_conditionType_} a.deptCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('deptCodeList')">
${_conditionType_} a.deptCode in
<foreach collection="conditionParamRef.deptCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('deptName')"> <if test="conditionParamRef.containsKey('deptName')">
<if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''"> <if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''">
${_conditionType_} a.deptName like #{${_conditionParam_}.deptName} ${_conditionType_} a.deptName like #{${_conditionParam_}.deptName}
...@@ -830,6 +859,11 @@ ...@@ -830,6 +859,11 @@
<if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if> <if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('deptCode')">
a.deptCode
<if test='orderCol.deptCode != null and "DESC".equalsIgnoreCase(orderCol.deptCode)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('deptName')"> <if test="orderCol.containsKey('deptName')">
a.deptName a.deptName
<if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if> <if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if>
......
###客户试用申请列表
POST {{baseUrl}}/customer/trial/list
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
###客户试用申请更新与保存
POST {{baseUrl}}/customer/trial/save
Authorization: {{authToken}}
Content-Type: application/json
{
"customerId":401,
"memberLevel":589,
"isAccept":109,
}
> {%
client.global.set("CustomerTrial_id", JSON.parse(response.body).data.id);
%}
###客户试用申请查看
GET {{baseUrl}}/customer/trial/info?id={{CustomerTrial_id}}
Authorization: {{authToken}}
Accept: application/json
###客户试用申请编辑
GET {{baseUrl}}/customer/trial/edit?id={{CustomerTrial_id}}
Authorization: {{authToken}}
Accept: application/json
###客户试用申请删除
GET {{baseUrl}}/customer/trial/delete?id={{CustomerTrial_id}}
Authorization: {{authToken}}
Accept: application/json
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