Commit 70660722 by Suvalue

数据库切换到MySql

parent 0073b8a0
package com.bsoft.api.common.enums;
public enum DimType {
DATABASE(1,"需要从数据获取数据"),
NODATA(0,"无所获取");
DimType(int value,String desc) {
this.value = value;
this.desc = desc;
}
private int value;
private String desc;
public int getValue() {
return value;
}
public String getDesc() {
return desc;
}
}
......@@ -18,11 +18,11 @@ public class CurrentUserMethodArgumentResolver implements HandlerMethodArgumentR
}
@Override
public Object resolveArgument(MethodParameter methodParameter, ModelAndViewContainer modelAndViewContainer,
NativeWebRequest nativeWebRequest, WebDataBinderFactory webDataBinderFactory) {
public Object resolveArgument(MethodParameter methodParameter,ModelAndViewContainer modelAndViewContainer,
NativeWebRequest nativeWebRequest,WebDataBinderFactory webDataBinderFactory) {
String token = nativeWebRequest.getHeader(Constants.TOKEN_KEY);
if(TokenUtil.checkToken(token)){
SysUser user = (SysUser) RedisUtil.get(token);
SysUser user = (SysUser)RedisUtil.get(token);
return user.getId();
}
return null;
......
......@@ -10,40 +10,43 @@ public class TokenUtil {
/**
* 获取token,并将token存入redis
*
* @param secret 密码
* @param user 用户信息
* @return token
*/
public static String getToken(String secret, SysUser user){
public static String getToken(String secret,SysUser user) {
String time = String.valueOf(System.currentTimeMillis());
String token = JWTUtil.create(secret, time, String.valueOf(user.getId()));
RedisUtil.set(token, user, TOKEN_TIME_OUT);
String token = JWTUtil.create(secret,time,String.valueOf(user.getId()));
RedisUtil.set(token,user,TOKEN_TIME_OUT);
return token;
}
/**
* 刷新token,并将旧token设置过期时间为5分钟
*
* @param oldToken 旧的token
* @return 新的token
*/
public static String refresh(String oldToken){
public static String refresh(String oldToken) {
String token = null;
SysUser user = (SysUser) RedisUtil.get(oldToken);
SysUser user = (SysUser)RedisUtil.get(oldToken);
if(checkToken(oldToken)){
RedisUtil.expire(oldToken, OLD_TOKEN_DURATION);
token = getToken(user.getPassword(), user);
RedisUtil.expire(oldToken,OLD_TOKEN_DURATION);
token = getToken(user.getPassword(),user);
}
return token;
}
/**
* 校验token
*
* @param token token
* @return 返回校验结果
*/
public static boolean checkToken(String token){
SysUser user = (SysUser) RedisUtil.get(token);
boolean result = user != null && JWTUtil.verifier(token, user.getPassword());
public static boolean checkToken(String token) {
SysUser user = (SysUser)RedisUtil.get(token);
boolean result = user != null && JWTUtil.verifier(token,user.getPassword());
if(result){
RedisUtil.expire(token,TOKEN_TIME_OUT);
}
......
......@@ -24,7 +24,7 @@ public class SerDiseaseDocController {
@PostMapping("diseaseDoc")
@Token
@ApiOperation("根据Code查询疾病关系信息")
public Object getDiseaseDoc(@RequestBody DiseaseDoc disease) throws InterruptedException {
public Object getDiseaseDoc(@RequestBody DiseaseDoc disease) throws InterruptedException {
List<SerDiseaseDocRs> list = serDiseaseDocService.getDiseaseDoc(disease.getDocCode(),disease.getMdcCode(),
disease.getDeptCode(),disease.getDate());
return Result.success(list);
......
......@@ -14,9 +14,9 @@ public interface DicDimMapper {
List<DicDim> selectAll();
int updateByPrimaryKey(DicDim record);
List<DicDim> selectByPageid(@Param("pageID") Integer pageID);
List<DicDim> selectByPageCode(@Param("pageCode") String pageCode);
int updateByPrimaryKey(DicDim record);
}
\ No newline at end of file
......@@ -15,9 +15,9 @@ public interface DicOrgMapper {
List<DicOrg> selectAll();
List<DicOrg> selectByUser(@Param("userId") Long userId);
int updateByPrimaryKey(DicOrg record);
List<DicOrg> selectByUser(@Param("userId") Long userId);
List<SerDepartment> selectDeptByUser(@Param("userId") Long userId,@Param("orgId") Long orgId);
}
\ No newline at end of file
......@@ -3,23 +3,23 @@ package com.bsoft.api.mapper;
import com.bsoft.api.model.SerDiseaseDocRs;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
public interface SerDiseaseDocRsMapper {
int deleteByPrimaryKey(Long id);
int deleteByPrimaryKey(BigDecimal id);
int insert(SerDiseaseDocRs record);
SerDiseaseDocRs selectByPrimaryKey(Long id);
SerDiseaseDocRs selectByPrimaryKey(BigDecimal id);
List<SerDiseaseDocRs> selectAll();
int updateByPrimaryKey(SerDiseaseDocRs record);
List<SerDiseaseDocRs> selectByCode(@Param("docCode") String docCode,@Param("mdcCode") String mdcCode,
@Param("deptCode") String deptCode,@Param("date") String date);
List<SerDiseaseDocRs> selectByRelation(@Param("docCode") String docCode,@Param("listMdcCode") String[] listMdcCode,
@Param("deptCode") String deptCode,@Param("date") String date);
int updateByPrimaryKey(SerDiseaseDocRs record);
}
@Param("deptCode") String deptCode,@Param("date") String date);
}
\ No newline at end of file
......@@ -7,18 +7,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SerDiseaseMapper {
int deleteByPrimaryKey(Long id);
int insert(SerDisease record);
SerDisease selectByPrimaryKey(Long id);
List<SerDisease> selectAll();
SerDisease selectByCode(@Param("code") String code,@Param("date") String date,@Param("docCode") String docCode,
@Param("deptCode") String deptCode);
List<SerDisease> selectAll();
List<SerDisease> selectByMdcName(@Param("date") String date,@Param("mdcName") String mdcName,
@Param("docCode") String docCode,@Param("deptCode") String deptCode);
......@@ -33,7 +28,4 @@ public interface SerDiseaseMapper {
List<DiseaseLevel> selectSonById(@Param("date") String date,@Param("diseaseId") Integer diseaseId,
@Param("docCode") String docCode,@Param("deptCode") String deptCode);
int updateByPrimaryKey(SerDisease record);
}
}
\ No newline at end of file
......@@ -15,7 +15,7 @@ public interface SerDoctorMapper {
List<SerDoctor> selectAll();
List<SerDoctor> selectDoctor(@Param("dept") String dept);
int updateByPrimaryKey(SerDoctor record);
List<SerDoctor> selectDoctor(@Param("dept") String dept);
}
\ No newline at end of file
package com.bsoft.api.mapper;
import com.bsoft.api.model.SerPageBlockRs;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......
package com.bsoft.api.mapper;
import com.bsoft.api.model.SerPageDimRs;
import java.util.List;
public interface SerPageDimRsMapper {
int deleteByPrimaryKey(Long id);
int insert(SerPageDimRs record);
SerPageDimRs selectByPrimaryKey(Long id);
List<SerPageDimRs> selectAll();
int updateByPrimaryKey(SerPageDimRs record);
}
\ No newline at end of file
package com.bsoft.api.mapper;
import com.bsoft.api.model.SerPageField;
import java.math.BigDecimal;
import java.util.List;
public interface SerPageFieldMapper {
int deleteByPrimaryKey(BigDecimal id);
int insert(SerPageField record);
SerPageField selectByPrimaryKey(BigDecimal id);
List<SerPageField> selectAll();
int updateByPrimaryKey(SerPageField record);
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ public interface SerPageMapper {
int updateByPrimaryKey(SerPage record);
List<SerPage> selectByCodeAndDim(@Param("pageCode") Integer pageCode, @Param("inField") String inField, @Param("dimCount") int dimCount);
List<SerPage> selectByCodeAndDim(@Param("pageCode") Integer pageCode,@Param("inField") String inField,@Param("dimCount") int dimCount);
List<SerPage> selectByCodeAndDimList(@Param("pageCode") Integer pageCode, @Param("inFields") Set<String> inFields, @Param("dimCount") int dimCount);
List<SerPage> selectByCodeAndDimList(@Param("pageCode") Integer pageCode,@Param("inFields") Set<String> inFields,@Param("dimCount") int dimCount);
}
\ No newline at end of file
package com.bsoft.api.mapper;
import com.bsoft.api.model.SerPageProjFieldRs;
import java.math.BigDecimal;
import java.util.List;
public interface SerPageProjFieldRsMapper {
int deleteByPrimaryKey(BigDecimal id);
int insert(SerPageProjFieldRs record);
SerPageProjFieldRs selectByPrimaryKey(BigDecimal id);
List<SerPageProjFieldRs> selectAll();
int updateByPrimaryKey(SerPageProjFieldRs record);
}
\ No newline at end of file
package com.bsoft.api.mapper;
import com.bsoft.api.model.SerPageProj;
import java.math.BigDecimal;
import java.util.List;
public interface SerPageProjMapper {
int deleteByPrimaryKey(BigDecimal id);
int insert(SerPageProj record);
SerPageProj selectByPrimaryKey(BigDecimal id);
List<SerPageProj> selectAll();
int updateByPrimaryKey(SerPageProj record);
}
\ No newline at end of file
......@@ -5,20 +5,13 @@ import com.bsoft.api.model.respmodel.SummaryNew;
import com.bsoft.api.model.respmodel.SummaryValue;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
public interface SerPageProjValueMapper {
int deleteByPrimaryKey(BigDecimal id);
int insert(SerPageProjValue record);
SerPageProjValue selectByPrimaryKey(BigDecimal id);
List<SerPageProjValue> selectAll();
int updateByPrimaryKey(SerPageProjValue record);
List<SummaryNew> selectDept(@Param("date") Integer date,@Param("page") Integer page);
List<SummaryValue> selectValue(@Param("date") Integer date,@Param("page") Integer page,
......
package com.bsoft.api.mapper;
import com.bsoft.api.model.SerProjValueHistory;
import java.util.List;
public interface SerProjValueHistoryMapper {
int insert(SerProjValueHistory record);
List<SerProjValueHistory> selectAll();
int copyValue();
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.bsoft.api.mapper;
import com.bsoft.api.model.SysMenu;
import com.bsoft.api.model.respmodel.SysMenuList;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -16,5 +17,5 @@ public interface SysMenuMapper {
int updateByPrimaryKey(SysMenu record);
List<SysMenuList> selectMenuByUser(Long userId);
List<SysMenuList> selectMenuByUser(@Param("userId") Long userId);
}
\ No newline at end of file
package com.bsoft.api.mapper;
import com.bsoft.api.model.SysOrg;
import java.util.List;
public interface SysOrgMapper {
int deleteByPrimaryKey(Long id);
int insert(SysOrg record);
SysOrg selectByPrimaryKey(Long id);
List<SysOrg> selectAll();
int updateByPrimaryKey(SysOrg record);
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.bsoft.api.mapper;
import com.bsoft.api.model.SysRole;
import com.bsoft.api.model.SysUserRoleRs;
import java.util.List;
public interface SysUserRoleRsMapper {
......
......@@ -5,11 +5,17 @@ import java.util.Date;
public class DicDim {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private String dimName;
private String dimField;
private Long dimType;
private Short dimType;
public Long getId() {
return id;
......@@ -19,6 +25,30 @@ public class DicDim {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public String getDimName() {
return dimName;
}
......@@ -35,21 +65,11 @@ public class DicDim {
this.dimField = dimField;
}
public Long getDimType() {
public Short getDimType() {
return dimType;
}
public void setDimType(Long dimType) {
public void setDimType(Short dimType) {
this.dimType = dimType;
}
@Override
public String toString() {
return "DicDim{" +
"id=" + id +
", dimName='" + dimName + '\'' +
", dimField='" + dimField + '\'' +
", dimType=" + dimType +
'}';
}
}
\ No newline at end of file
......@@ -9,7 +9,7 @@ public class DicInd {
private Long createUserid;
private Short state;
private Long state;
private String indCode;
......@@ -19,10 +19,14 @@ public class DicInd {
private Short computeMode;
private String columnType;
private String execSql;
private String describe;
private String checkSql;
public Long getId() {
return id;
}
......@@ -47,11 +51,11 @@ public class DicInd {
this.createUserid = createUserid;
}
public Short getState() {
public Long getState() {
return state;
}
public void setState(Short state) {
public void setState(Long state) {
this.state = state;
}
......@@ -87,6 +91,14 @@ public class DicInd {
this.computeMode = computeMode;
}
public String getColumnType() {
return columnType;
}
public void setColumnType(String columnType) {
this.columnType = columnType;
}
public String getExecSql() {
return execSql;
}
......@@ -103,19 +115,11 @@ public class DicInd {
this.describe = describe;
}
@Override
public String toString() {
return "DicInd{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", indCode='" + indCode + '\'' +
", indName='" + indName + '\'' +
", indField='" + indField + '\'' +
", computeMode=" + computeMode +
", execSql='" + execSql + '\'' +
", describe='" + describe + '\'' +
'}';
public String getCheckSql() {
return checkSql;
}
public void setCheckSql(String checkSql) {
this.checkSql = checkSql;
}
}
\ No newline at end of file
......@@ -5,6 +5,12 @@ import java.util.Date;
public class DicOrg {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private String orgCode;
private String orgName;
......@@ -29,6 +35,30 @@ public class DicOrg {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public String getOrgCode() {
return orgCode;
}
......@@ -92,19 +122,4 @@ public class DicOrg {
public void setParentId(Long parentId) {
this.parentId = parentId;
}
@Override
public String toString() {
return "DicOrg{" +
"id=" + id +
", orgCode='" + orgCode + '\'' +
", orgName='" + orgName + '\'' +
", orgNo='" + orgNo + '\'' +
", orgShortName='" + orgShortName + '\'' +
", orgGroup='" + orgGroup + '\'' +
", orgType='" + orgType + '\'' +
", orgAddress='" + orgAddress + '\'' +
", parentId=" + parentId +
'}';
}
}
\ No newline at end of file
......@@ -72,17 +72,4 @@ public class SerBlock {
public void setReturnType(Short returnType) {
this.returnType = returnType;
}
@Override
public String toString() {
return "SerBlock{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", blockCode='" + blockCode + '\'' +
", blockName='" + blockName + '\'' +
", returnType=" + returnType +
'}';
}
}
\ No newline at end of file
......@@ -62,36 +62,4 @@ public class SerDimValue {
public void setDimId(Long dimId) {
this.dimId = dimId;
}
@Override
public String toString() {
return "SerDimValue{" +
"id=" + id +
", orgId=" + orgId +
", itemName='" + itemName + '\'' +
", itemValue='" + itemValue + '\'' +
", date=" + date +
", dimId=" + dimId +
'}';
}
public enum Dim_Type{
DATABASE(1, "需要从数据获取数据"),NODATA(0, "无所获取"),;
Dim_Type(int value, String desc){
this.value = value;
this.desc = desc;
}
private int value;
private String desc;
public int getValue() {
return value;
}
public String getDesc() {
return desc;
}
}
}
\ No newline at end of file
......@@ -6,6 +6,12 @@ import java.util.Date;
public class SerDisease {
private BigDecimal id;
private Date createDate;
private BigDecimal createUserid;
private BigDecimal state;
private String mdcCode;
private String mdcName;
......@@ -22,6 +28,8 @@ public class SerDisease {
private String orgName;
private String parentCode;
public BigDecimal getId() {
return id;
}
......@@ -30,6 +38,30 @@ public class SerDisease {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getCreateUserid() {
return createUserid;
}
public void setCreateUserid(BigDecimal createUserid) {
this.createUserid = createUserid;
}
public BigDecimal getState() {
return state;
}
public void setState(BigDecimal state) {
this.state = state;
}
public String getMdcCode() {
return mdcCode;
}
......@@ -94,18 +126,11 @@ public class SerDisease {
this.orgName = orgName;
}
@Override
public String toString() {
return "SerDisease{" +
"id=" + id +
", mdcCode='" + mdcCode + '\'' +
", mdcName='" + mdcName + '\'' +
", date=" + date +
", mdcNum=" + mdcNum +
", parentId=" + parentId +
", level=" + level +
", orgId=" + orgId +
", orgName='" + orgName + '\'' +
'}';
public String getParentCode() {
return parentCode;
}
public void setParentCode(String parentCode) {
this.parentCode = parentCode;
}
}
\ No newline at end of file
......@@ -82,18 +82,4 @@ public class SerDiseaseDocRs {
public void setDeptName(String deptName) {
this.deptName = deptName;
}
@Override
public String toString() {
return "SerDiseaseDocRs{" +
"id=" + id +
", orgId=" + orgId +
", docCode='" + docCode + '\'' +
", docName='" + docName + '\'' +
", mdcCode='" + mdcCode + '\'' +
", date=" + date +
", deptCode='" + deptCode + '\'' +
", deptName='" + deptName + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -62,16 +62,4 @@ public class SerPage {
public void setPageName(String pageName) {
this.pageName = pageName;
}
@Override
public String toString() {
return "SerPage{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", pageCode='" + pageCode + '\'' +
", pageName='" + pageName + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -17,14 +17,6 @@ public class SerPageBlockRs {
private String whereClause;
public String getWhereClause() {
return whereClause;
}
public void setWhereClause(String whereClause) {
this.whereClause = whereClause;
}
public Long getId() {
return id;
}
......@@ -73,16 +65,11 @@ public class SerPageBlockRs {
this.pageId = pageId;
}
@Override
public String toString() {
return "SerPageBlockRs{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", blockId=" + blockId +
", pageId=" + pageId +
", whereClause='" + whereClause + '\'' +
'}';
public String getWhereClause() {
return whereClause;
}
public void setWhereClause(String whereClause) {
this.whereClause = whereClause;
}
}
\ No newline at end of file
package com.bsoft.api.model;
import java.util.Date;
public class SerPageDimRs {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private Long dimId;
private Long pageId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public Long getDimId() {
return dimId;
}
public void setDimId(Long dimId) {
this.dimId = dimId;
}
public Long getPageId() {
return pageId;
}
public void setPageId(Long pageId) {
this.pageId = pageId;
}
@Override
public String toString() {
return "SerPageDimRs{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", dimId=" + dimId +
", pageId=" + pageId +
'}';
}
}
\ No newline at end of file
......@@ -24,6 +24,8 @@ public class SerProj {
private BigDecimal sort;
private BigDecimal parent;
public BigDecimal getId() {
return id;
}
......@@ -103,4 +105,12 @@ public class SerProj {
public void setSort(BigDecimal sort) {
this.sort = sort;
}
public BigDecimal getParent() {
return parent;
}
public void setParent(BigDecimal parent) {
this.parent = parent;
}
}
\ No newline at end of file
package com.bsoft.api.model;
import com.bsoft.api.model.reqmodel.BudgetValue;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
public class SerProjValue {
public SerProjValue() {
}
......@@ -31,6 +28,7 @@ public class SerProjValue {
this.szUnit = request.getSzUnit();
}
private BigDecimal id;
private Date createDate;
......@@ -77,6 +75,217 @@ public class SerProjValue {
private String szUnit;
private String hosCode;
private BigDecimal wqqsZypzJs;
private String deptName;
private String hoscode;
public BigDecimal getId() {
return id;
}
public void setId(BigDecimal id) {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getCreateUserid() {
return createUserid;
}
public void setCreateUserid(BigDecimal createUserid) {
this.createUserid = createUserid;
}
public BigDecimal getState() {
return state;
}
public void setState(BigDecimal state) {
this.state = state;
}
public BigDecimal getProjId() {
return projId;
}
public void setProjId(BigDecimal projId) {
this.projId = projId;
}
public BigDecimal getQnz() {
return qnz;
}
public void setQnz(BigDecimal qnz) {
this.qnz = qnz;
}
public BigDecimal getWqqs() {
return wqqs;
}
public void setWqqs(BigDecimal wqqs) {
this.wqqs = wqqs;
}
public BigDecimal getLs() {
return ls;
}
public void setLs(BigDecimal ls) {
this.ls = ls;
}
public BigDecimal getMb() {
return mb;
}
public void setMb(BigDecimal mb) {
this.mb = mb;
}
public BigDecimal getCsysz() {
return csysz;
}
public void setCsysz(BigDecimal csysz) {
this.csysz = csysz;
}
public BigDecimal getCsyszTb() {
return csyszTb;
}
public void setCsyszTb(BigDecimal csyszTb) {
this.csyszTb = csyszTb;
}
public BigDecimal getYsz() {
return ysz;
}
public void setYsz(BigDecimal ysz) {
this.ysz = ysz;
}
public BigDecimal getYszTb() {
return yszTb;
}
public void setYszTb(BigDecimal yszTb) {
this.yszTb = yszTb;
}
public BigDecimal getSz() {
return sz;
}
public void setSz(BigDecimal sz) {
this.sz = sz;
}
public BigDecimal getZxpl() {
return zxpl;
}
public void setZxpl(BigDecimal zxpl) {
this.zxpl = zxpl;
}
public BigDecimal getDate() {
return date;
}
public void setDate(BigDecimal date) {
this.date = date;
}
public String getDeptCode() {
return deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public BigDecimal getSort() {
return sort;
}
public void setSort(BigDecimal sort) {
this.sort = sort;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getQnzUnit() {
return qnzUnit;
}
public void setQnzUnit(String qnzUnit) {
this.qnzUnit = qnzUnit;
}
public String getCsyszUnit() {
return csyszUnit;
}
public void setCsyszUnit(String csyszUnit) {
this.csyszUnit = csyszUnit;
}
public String getYszUnit() {
return yszUnit;
}
public void setYszUnit(String yszUnit) {
this.yszUnit = yszUnit;
}
public String getSzUnit() {
return szUnit;
}
public void setSzUnit(String szUnit) {
this.szUnit = szUnit;
}
public BigDecimal getWqqsZypzJs() {
return wqqsZypzJs;
}
public void setWqqsZypzJs(BigDecimal wqqsZypzJs) {
this.wqqsZypzJs = wqqsZypzJs;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
public String getHoscode() {
return hoscode;
}
public void setHoscode(String hoscode) {
this.hoscode = hoscode;
}
}
\ No newline at end of file
package com.bsoft.api.model;
import java.math.BigDecimal;
import java.util.Date;
public class SerProjValueHistory {
private BigDecimal id;
private Date createDate;
private BigDecimal createUserid;
private BigDecimal state;
private BigDecimal projId;
private BigDecimal qnz;
private BigDecimal wqqs;
private Long ls;
private BigDecimal mb;
private BigDecimal csysz;
private BigDecimal csyszTb;
private BigDecimal ysz;
private BigDecimal yszTb;
private BigDecimal sz;
private BigDecimal zxpl;
private BigDecimal date;
private String deptCode;
private BigDecimal sort;
private String version;
private String qnzUnit;
private String csyszUnit;
private String yszUnit;
private String szUnit;
private Long wqqsZypzJs;
private String deptName;
public BigDecimal getId() {
return id;
}
public void setId(BigDecimal id) {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public BigDecimal getCreateUserid() {
return createUserid;
}
public void setCreateUserid(BigDecimal createUserid) {
this.createUserid = createUserid;
}
public BigDecimal getState() {
return state;
}
public void setState(BigDecimal state) {
this.state = state;
}
public BigDecimal getProjId() {
return projId;
}
public void setProjId(BigDecimal projId) {
this.projId = projId;
}
public BigDecimal getQnz() {
return qnz;
}
public void setQnz(BigDecimal qnz) {
this.qnz = qnz;
}
public BigDecimal getWqqs() {
return wqqs;
}
public void setWqqs(BigDecimal wqqs) {
this.wqqs = wqqs;
}
public Long getLs() {
return ls;
}
public void setLs(Long ls) {
this.ls = ls;
}
public BigDecimal getMb() {
return mb;
}
public void setMb(BigDecimal mb) {
this.mb = mb;
}
public BigDecimal getCsysz() {
return csysz;
}
public void setCsysz(BigDecimal csysz) {
this.csysz = csysz;
}
public BigDecimal getCsyszTb() {
return csyszTb;
}
public void setCsyszTb(BigDecimal csyszTb) {
this.csyszTb = csyszTb;
}
public BigDecimal getYsz() {
return ysz;
}
public void setYsz(BigDecimal ysz) {
this.ysz = ysz;
}
public BigDecimal getYszTb() {
return yszTb;
}
public void setYszTb(BigDecimal yszTb) {
this.yszTb = yszTb;
}
public BigDecimal getSz() {
return sz;
}
public void setSz(BigDecimal sz) {
this.sz = sz;
}
public BigDecimal getZxpl() {
return zxpl;
}
public void setZxpl(BigDecimal zxpl) {
this.zxpl = zxpl;
}
public BigDecimal getDate() {
return date;
}
public void setDate(BigDecimal date) {
this.date = date;
}
public String getDeptCode() {
return deptCode;
}
public void setDeptCode(String deptCode) {
this.deptCode = deptCode;
}
public BigDecimal getSort() {
return sort;
}
public void setSort(BigDecimal sort) {
this.sort = sort;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getQnzUnit() {
return qnzUnit;
}
public void setQnzUnit(String qnzUnit) {
this.qnzUnit = qnzUnit;
}
public String getCsyszUnit() {
return csyszUnit;
}
public void setCsyszUnit(String csyszUnit) {
this.csyszUnit = csyszUnit;
}
public String getYszUnit() {
return yszUnit;
}
public void setYszUnit(String yszUnit) {
this.yszUnit = yszUnit;
}
public String getSzUnit() {
return szUnit;
}
public void setSzUnit(String szUnit) {
this.szUnit = szUnit;
}
public Long getWqqsZypzJs() {
return wqqsZypzJs;
}
public void setWqqsZypzJs(Long wqqsZypzJs) {
this.wqqsZypzJs = wqqsZypzJs;
}
public String getDeptName() {
return deptName;
}
public void setDeptName(String deptName) {
this.deptName = deptName;
}
}
\ No newline at end of file
......@@ -5,7 +5,11 @@ import java.util.Date;
public class SysMenu {
private Long id;
private Long projectId;
private Date createData;
private Long createUserid;
private Short state;
private String menuName;
......@@ -27,12 +31,28 @@ public class SysMenu {
this.id = id;
}
public Long getProjectId() {
return projectId;
public Date getCreateData() {
return createData;
}
public void setCreateData(Date createData) {
this.createData = createData;
}
public Long getCreateUserid() {
return createUserid;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public String getMenuName() {
......@@ -82,18 +102,4 @@ public class SysMenu {
public void setSort(Long sort) {
this.sort = sort;
}
@Override
public String toString() {
return "SysMenu{" +
"id=" + id +
", projectId=" + projectId +
", menuName='" + menuName + '\'' +
", menuUrl='" + menuUrl + '\'' +
", menuImage='" + menuImage + '\'' +
", parentId=" + parentId +
", pageCode='" + pageCode + '\'' +
", sort=" + sort +
'}';
}
}
\ No newline at end of file
package com.bsoft.api.model;
import java.util.Date;
public class SysOrg {
private Long id;
private Date createData;
private String createUserid;
private Short state;
private String orgCode;
private String orgName;
private String orgNo;
private String orgShortName;
private String orgGroup;
private String orgType;
private String orgAddress;
private Long parentId;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Date getCreateData() {
return createData;
}
public void setCreateData(Date createData) {
this.createData = createData;
}
public String getCreateUserid() {
return createUserid;
}
public void setCreateUserid(String createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public String getOrgCode() {
return orgCode;
}
public void setOrgCode(String orgCode) {
this.orgCode = orgCode;
}
public String getOrgName() {
return orgName;
}
public void setOrgName(String orgName) {
this.orgName = orgName;
}
public String getOrgNo() {
return orgNo;
}
public void setOrgNo(String orgNo) {
this.orgNo = orgNo;
}
public String getOrgShortName() {
return orgShortName;
}
public void setOrgShortName(String orgShortName) {
this.orgShortName = orgShortName;
}
public String getOrgGroup() {
return orgGroup;
}
public void setOrgGroup(String orgGroup) {
this.orgGroup = orgGroup;
}
public String getOrgType() {
return orgType;
}
public void setOrgType(String orgType) {
this.orgType = orgType;
}
public String getOrgAddress() {
return orgAddress;
}
public void setOrgAddress(String orgAddress) {
this.orgAddress = orgAddress;
}
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
@Override
public String toString() {
return "SysOrg{" +
"id=" + id +
", createData=" + createData +
", createUserid='" + createUserid + '\'' +
", state=" + state +
", orgCode='" + orgCode + '\'' +
", orgName='" + orgName + '\'' +
", orgNo='" + orgNo + '\'' +
", orgShortName='" + orgShortName + '\'' +
", orgGroup='" + orgGroup + '\'' +
", orgType='" + orgType + '\'' +
", orgAddress='" + orgAddress + '\'' +
", parentId=" + parentId +
'}';
}
}
\ No newline at end of file
......@@ -62,16 +62,4 @@ public class SysProject {
public void setProjectName(String projectName) {
this.projectName = projectName;
}
@Override
public String toString() {
return "SysProject{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", projectCode='" + projectCode + '\'' +
", projectName='" + projectName + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -13,8 +13,6 @@ public class SysRole {
private String roleName;
private Long projectId;
private Long roleCode;
public Long getId() {
......@@ -57,14 +55,6 @@ public class SysRole {
this.roleName = roleName;
}
public Long getProjectId() {
return projectId;
}
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public Long getRoleCode() {
return roleCode;
}
......@@ -72,17 +62,4 @@ public class SysRole {
public void setRoleCode(Long roleCode) {
this.roleCode = roleCode;
}
@Override
public String toString() {
return "SysRole{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", roleName='" + roleName + '\'' +
", projectId=" + projectId +
", roleCode=" + roleCode +
'}';
}
}
\ No newline at end of file
......@@ -62,16 +62,4 @@ public class SysRoleMenuRs {
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
@Override
public String toString() {
return "SysRoleMenuRs{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", menuId=" + menuId +
", roleId=" + roleId +
'}';
}
}
\ No newline at end of file
......@@ -62,16 +62,4 @@ public class SysUserMenuRs {
public void setMenuId(Long menuId) {
this.menuId = menuId;
}
@Override
public String toString() {
return "SysUserMenuRs{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", userId=" + userId +
", menuId=" + menuId +
'}';
}
}
\ No newline at end of file
......@@ -62,16 +62,4 @@ public class SysUserOrgRs {
public void setOrgId(Long orgId) {
this.orgId = orgId;
}
@Override
public String toString() {
return "SysUserOrgRs{" +
"id=" + id +
", createDate=" + createDate +
", createUserid=" + createUserid +
", state=" + state +
", userId=" + userId +
", orgId=" + orgId +
'}';
}
}
\ No newline at end of file
......@@ -5,6 +5,12 @@ import java.util.Date;
public class SysUserRoleRs {
private Long id;
private Date createDate;
private Long createUserid;
private Short state;
private Long userId;
private Long roleId;
......@@ -17,6 +23,30 @@ public class SysUserRoleRs {
this.id = id;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Long getCreateUserid() {
return createUserid;
}
public void setCreateUserid(Long createUserid) {
this.createUserid = createUserid;
}
public Short getState() {
return state;
}
public void setState(Short state) {
this.state = state;
}
public Long getUserId() {
return userId;
}
......@@ -32,13 +62,4 @@ public class SysUserRoleRs {
public void setRoleId(Long roleId) {
this.roleId = roleId;
}
@Override
public String toString() {
return "SysUserRoleRs{" +
"id=" + id +
", userId=" + userId +
", roleId=" + roleId +
'}';
}
}
\ No newline at end of file
package com.bsoft.api.model.respmodel;
import com.bsoft.api.model.DicDim;
import com.bsoft.api.model.SerDimValue;
......@@ -10,7 +11,6 @@ public class DimValue {
private List<SerDimValue> dimValues;
public DicDim getDicDim() {
return dicDim;
}
......
......@@ -5,8 +5,8 @@ import com.bsoft.api.model.respmodel.DimValue;
import java.util.List;
public interface DicDimService extends ServiceBase<DicDim> {
public interface DicDimService extends ServiceBase<DicDim> {
List<DimValue> getByPageCode(String pageCode,Long orgId,String date);
List<DimValue> getByPageCode(String pageCode,Long orgId,String date);
}
......@@ -4,6 +4,6 @@ import com.bsoft.api.model.DicInd;
import java.util.List;
public interface DicIndService extends ServiceBase<DicInd>{
public interface DicIndService extends ServiceBase<DicInd> {
List<DicInd> selectAll(String filter);
}
package com.bsoft.api.service.Impl;
import com.bsoft.api.common.exceptions.DBConfigurationError;
import com.bsoft.api.common.utils.SqlUtil;
import com.bsoft.api.mapper.BlockValuesMapper;
import com.bsoft.api.mapper.DicDimMapper;
import com.bsoft.api.mapper.SerPageBlockRsMapper;
import com.bsoft.api.mapper.SerPageMapper;
import com.bsoft.api.model.DicDim;
import com.bsoft.api.model.SerPage;
import com.bsoft.api.model.SerPageBlockRs;
import com.bsoft.api.model.respmodel.BlockValue;
import com.bsoft.api.service.AsynBlockValuesService;
import com.bsoft.api.service.BlockValuesService;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.binding.MapperMethod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
@Service
public class BlockValuesServiceImpl implements BlockValuesService {
......
package com.bsoft.api.service.Impl;
import com.bsoft.api.common.enums.DimType;
import com.bsoft.api.mapper.DicDimMapper;
import com.bsoft.api.mapper.SerDimValueMapper;
import com.bsoft.api.model.DicDim;
......@@ -21,7 +22,7 @@ public class DicDimServiceImpl implements DicDimService {
@Override
public int add(DicDim dicDim) {
return dicDimMapper.insert(dicDim);
return dicDimMapper.insert(dicDim);
}
@Override
......@@ -50,14 +51,14 @@ public class DicDimServiceImpl implements DicDimService {
}
@Override
public List<DimValue> getByPageCode(String pageCode, Long orgId, String date) {
public List<DimValue> getByPageCode(String pageCode,Long orgId,String date) {
List<DicDim> dicDimList = dicDimMapper.selectByPageCode(pageCode);
if(dicDimList!=null&&dicDimList.size()>0){
if(dicDimList != null && dicDimList.size() > 0){
List<DimValue> dimValueList = new ArrayList<>();
for (DicDim dic:dicDimList) {
for(DicDim dic : dicDimList){
DimValue dimValue = new DimValue();
dimValue.setDicDim(dic);
if(dic.getDimType()== SerDimValue.Dim_Type.DATABASE.getValue()){
if(dic.getDimType() == DimType.DATABASE.getValue()){
List<SerDimValue> serDimValueList = serDimValueMapper.selectByDimId(pageCode,orgId,dic.getId(),date);
dimValue.setDimValues(serDimValueList);
}
......
package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.DicOrgMapper;
import com.bsoft.api.model.DicOrg;
import com.bsoft.api.service.DicOrgService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Service
......
......@@ -12,21 +12,20 @@ import java.util.UUID;
public class ExcelServiceImpl implements ExcelService {
@Override
public String tableToXls(String realPath, String tableStr) {
try {
File directory = new File(realPath+"/excel");
if (!directory .exists() && !directory .isDirectory())
{
directory .mkdir();
public String tableToXls(String realPath,String tableStr) {
try{
File directory = new File(realPath + "/excel");
if(!directory.exists() && !directory.isDirectory()){
directory.mkdir();
}
String uuid = UUID.randomUUID().toString().replaceAll("-", "");
String fileName = uuid+".xls";
FileOutputStream fout = new FileOutputStream(directory+"/"+fileName);
TableToXls.process(tableStr, fout);
String uuid = UUID.randomUUID().toString().replaceAll("-","");
String fileName = uuid + ".xls";
FileOutputStream fout = new FileOutputStream(directory + "/" + fileName);
TableToXls.process(tableStr,fout);
fout.close();
return "excel/"+fileName;
}catch (Exception ex){
log.error(ex.getMessage(), ex);
return "excel/" + fileName;
}catch(Exception ex){
log.error(ex.getMessage(),ex);
}
return null;
}
......
......@@ -11,7 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.lang.annotation.Retention;
import java.util.Date;
import java.util.List;
......@@ -28,13 +27,13 @@ public class LoginServiceImpl implements LoginService {
private DicOrgMapper dicOrgMapper;
@Override
public LoginInfo login(String logName, String password,String ip) {
public LoginInfo login(String logName,String password,String ip) {
LoginInfo loginInfo = new LoginInfo();
SysUser user = userServiceImpl.findByLoginName(logName);
if(user != null && user.getPassword().equals(password)){
String token = TokenUtil.getToken(password, user);
String token = TokenUtil.getToken(password,user);
//修改ip以及最后登录时间
user.setLastIp(ip);
user.setLastTime(new Date());
......@@ -44,13 +43,13 @@ public class LoginServiceImpl implements LoginService {
loginInfo.setToken(token);
loginInfo.setUser(user);
//查询用户机构
List<DicOrg> orgList =dicOrgMapper.selectByUser(user.getId());
List<DicOrg> orgList = dicOrgMapper.selectByUser(user.getId());
loginInfo.setOrg(orgList);
}
return loginInfo;
}
public String refreshToken(String oldToken){
public String refreshToken(String oldToken) {
return TokenUtil.refresh(oldToken);
}
}
package com.bsoft.api.service.Impl;
import com.bsoft.api.common.utils.SqlUtil;
import com.bsoft.api.mapper.SerDiseaseDocRsMapper;
import com.bsoft.api.model.SerDiseaseDocRs;
import com.bsoft.api.service.SerDiseaseDocService;
import com.bsoft.common.utils.StringUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.sql.Array;
import java.util.ArrayList;
import java.util.List;
@Service
......@@ -18,11 +16,11 @@ public class SerDiseaseDocServiceImpl implements SerDiseaseDocService {
private SerDiseaseDocRsMapper serDiseaseDocRsMapper;
@Override
public List<SerDiseaseDocRs> getDiseaseDoc(String docCode, String mdcCode, String deptCode,String date) throws InterruptedException {
docCode= StringUtil.isNullOrEmpty(docCode)?null:docCode;
mdcCode= StringUtil.isNullOrEmpty(mdcCode)?"":mdcCode;
deptCode= StringUtil.isNullOrEmpty(deptCode)?null:deptCode;
date= StringUtil.isNullOrEmpty(date)?null:date;
public List<SerDiseaseDocRs> getDiseaseDoc(String docCode,String mdcCode,String deptCode,String date) throws InterruptedException {
docCode = StringUtil.isNullOrEmpty(docCode) ? null : docCode;
mdcCode = StringUtil.isNullOrEmpty(mdcCode) ? "" : mdcCode;
deptCode = StringUtil.isNullOrEmpty(deptCode) ? null : deptCode;
date = StringUtil.isNullOrEmpty(date) ? null : date;
String[] inField = mdcCode.split(",");
// return serDiseaseDocRsMapper.selectByCode(docCode,mdcCode,deptCode,date);
return serDiseaseDocRsMapper.selectByRelation(docCode,inField,deptCode,date);
......
package com.bsoft.api.service.Impl;
import com.bsoft.api.mapper.DicOrgMapper;
import com.bsoft.api.mapper.SerDiseaseMapper;
import com.bsoft.api.model.DicOrg;
import com.bsoft.api.model.SerDisease;
import com.bsoft.api.model.respmodel.DiseaseLevel;
import com.bsoft.api.service.SerDiseaseService;
......@@ -17,8 +15,6 @@ import java.util.List;
public class SerDiseaseServiceImpl implements SerDiseaseService {
@Resource
private SerDiseaseMapper serDiseaseMapper;
@Resource
private DicOrgMapper dicOrgMapper;
@Override
public List<DiseaseLevel> selectListByIdorLevel(String date,String diseaseCode,Integer level,String docCode,String deptCode,Long userId) {
......
......@@ -13,7 +13,6 @@ import com.bsoft.api.model.reqmodel.AddBudgetValue;
import com.bsoft.api.model.reqmodel.BudgetValue;
import com.bsoft.api.model.respmodel.*;
import com.bsoft.api.service.SerProjValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -94,7 +93,7 @@ public class SerProjValueServiceImpl implements SerProjValueService {
info.setCreateDate(new Date());
info.setState(BigDecimal.valueOf(StateType.ON.getValue()));
info.setVersion(String.valueOf(version));
info.setHosCode(orgCode);
info.setHoscode(orgCode);
serProjValueMapper.insert(info);
}
//调用计算数值存储过程
......
......@@ -7,12 +7,9 @@ import com.bsoft.api.service.SysMenuService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.awt.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Service
......
......@@ -6,7 +6,6 @@ import com.bsoft.api.service.SysRoleMenuRsService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Service
......
......@@ -6,7 +6,6 @@ import com.bsoft.api.service.SysRoleService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Service
......
......@@ -6,7 +6,6 @@ import com.bsoft.api.service.SysUserMenuRsService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Service
......
......@@ -7,7 +7,6 @@ import com.bsoft.api.service.SysUserRoleRsService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.List;
@Service
......
......@@ -10,7 +10,7 @@ import java.util.List;
public interface LoginService {
LoginInfo login(String loginName, String password,String ip);
LoginInfo login(String loginName,String password,String ip);
String refreshToken(String oldToken);
......@@ -24,15 +24,13 @@ public interface LoginService {
private List<DicOrg> org;
public LoginInfo() {
}
public LoginInfo(String token, SysUser user,List<DicOrg> org) {
public LoginInfo(String token,SysUser user,List<DicOrg> org) {
this.token = token;
this.user = user;
this.org=org;
this.org = org;
}
public String getToken() {
......
......@@ -5,5 +5,5 @@ import com.bsoft.api.model.SerDiseaseDocRs;
import java.util.List;
public interface SerDiseaseDocService {
List<SerDiseaseDocRs> getDiseaseDoc(String docCode, String mdcCode, String deptCode,String date) throws InterruptedException;
List<SerDiseaseDocRs> getDiseaseDoc(String docCode,String mdcCode,String deptCode,String date) throws InterruptedException;
}
......@@ -5,9 +5,10 @@ import com.bsoft.api.model.respmodel.SysMenuList;
import java.util.List;
public interface SysMenuService extends ServiceBase<SysMenu> {
public interface SysMenuService extends ServiceBase<SysMenu> {
//顶级菜单的父级id
final static Integer MENU_TOP_PARENT_ID =0;
final static Integer MENU_TOP_PARENT_ID = 0;
List<SysMenuList> getMenu(Long userId) throws Exception;
}
......@@ -2,5 +2,5 @@ package com.bsoft.api.service;
import com.bsoft.api.model.SysRoleMenuRs;
public interface SysRoleMenuRsService extends ServiceBase<SysRoleMenuRs> {
public interface SysRoleMenuRsService extends ServiceBase<SysRoleMenuRs> {
}
......@@ -2,5 +2,5 @@ package com.bsoft.api.service;
import com.bsoft.api.model.SysRole;
public interface SysRoleService extends ServiceBase<SysRole> {
public interface SysRoleService extends ServiceBase<SysRole> {
}
......@@ -2,5 +2,5 @@ package com.bsoft.api.service;
import com.bsoft.api.model.SysUserMenuRs;
public interface SysUserMenuRsService extends ServiceBase<SysUserMenuRs> {
public interface SysUserMenuRsService extends ServiceBase<SysUserMenuRs> {
}
......@@ -5,6 +5,6 @@ import com.bsoft.api.model.SysUserRoleRs;
import java.util.List;
public interface SysUserRoleRsService extends ServiceBase<SysUserRoleRs> {
List<SysRole> getRoleListByUser(Long userId) throws Exception;
public interface SysUserRoleRsService extends ServiceBase<SysUserRoleRs> {
List<SysRole> getRoleListByUser(Long userId) throws Exception;
}
......@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api(tags = {"维度操作"}, hidden = true)
......@@ -21,40 +22,39 @@ public class DicDimController {
private DicDimService dicDimService;
@GetMapping("list")
public Object list(){
public Object list() {
List<DicDim> list = dicDimService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<DicDim> list = dicDimService.findAll();
ListPage<DicDim> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<DicDim> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
dicDimService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(DicDim dicDim){
public Object add(DicDim dicDim) {
dicDimService.add(dicDim);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(DicDim dicDim){
public Object update(DicDim dicDim) {
dicDimService.update(dicDim);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
dicDimService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -23,40 +23,39 @@ public class DicIndController {
private DicIndService dicIndService;
@GetMapping("list")
public Object list(){
public Object list() {
List<DicInd> list = dicIndService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<DicInd> list = dicIndService.findAll();
ListPage<DicDim> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<DicDim> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
dicIndService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(DicInd dicInd){
public Object add(DicInd dicInd) {
dicIndService.add(dicInd);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(DicInd dicInd){
public Object update(DicInd dicInd) {
dicIndService.update(dicInd);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
dicIndService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -22,40 +22,39 @@ public class DicOrgController {
private DicOrgService dicOrgService;
@GetMapping("list")
public Object list(){
public Object list() {
List<DicOrg> list = dicOrgService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<DicOrg> list = dicOrgService.findAll();
ListPage<DicOrg> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<DicOrg> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
dicOrgService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(DicOrg dicOrg){
public Object add(DicOrg dicOrg) {
dicOrgService.add(dicOrg);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(DicOrg dicOrg){
public Object update(DicOrg dicOrg) {
dicOrgService.update(dicOrg);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
dicOrgService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -22,40 +22,39 @@ public class SysMenuController {
private SysMenuService sysMenuService;
@GetMapping("list")
public Object list(){
public Object list() {
List<SysMenu> list = sysMenuService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<SysMenu> list = sysMenuService.findAll();
ListPage<SysMenu> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<SysMenu> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
sysMenuService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(SysMenu sysMenu){
public Object add(SysMenu sysMenu) {
sysMenuService.add(sysMenu);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(SysMenu sysMenu){
public Object update(SysMenu sysMenu) {
sysMenuService.update(sysMenu);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
sysMenuService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -22,40 +22,39 @@ public class SysRoleController {
private SysRoleService sysRoleService;
@GetMapping("list")
public Object list(){
public Object list() {
List<SysRole> list = sysRoleService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<SysRole> list = sysRoleService.findAll();
ListPage<SysRole> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<SysRole> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
sysRoleService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(SysRole sysRole){
public Object add(SysRole sysRole) {
sysRoleService.add(sysRole);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(SysRole sysRole){
public Object update(SysRole sysRole) {
sysRoleService.update(sysRole);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
sysRoleService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -5,7 +5,6 @@ import com.bsoft.api.common.enums.RequestResultType;
import com.bsoft.api.model.SysRoleMenuRs;
import com.bsoft.api.model.respmodel.ListPage;
import com.bsoft.api.service.SysRoleMenuRsService;
import com.bsoft.api.service.SysUserOrgRsService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -23,40 +22,39 @@ public class SysRoleMenuRsController {
private SysRoleMenuRsService sysRoleMenuRsService;
@GetMapping("list")
public Object list(){
public Object list() {
List<SysRoleMenuRs> list = sysRoleMenuRsService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<SysRoleMenuRs> list = sysRoleMenuRsService.findAll();
ListPage<SysRoleMenuRs> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<SysRoleMenuRs> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
sysRoleMenuRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(SysRoleMenuRs sysRoleMenuRs){
public Object add(SysRoleMenuRs sysRoleMenuRs) {
sysRoleMenuRsService.add(sysRoleMenuRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(SysRoleMenuRs sysRoleMenuRs){
public Object update(SysRoleMenuRs sysRoleMenuRs) {
sysRoleMenuRsService.update(sysRoleMenuRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
sysRoleMenuRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -2,7 +2,6 @@ package com.bsoft.api.unusecontroller;
import com.bsoft.api.common.base.RequestResult;
import com.bsoft.api.common.enums.RequestResultType;
import com.bsoft.api.model.SysRoleMenuRs;
import com.bsoft.api.model.SysUserMenuRs;
import com.bsoft.api.model.respmodel.ListPage;
import com.bsoft.api.service.SysUserMenuRsService;
......@@ -23,40 +22,39 @@ public class SysUserMenuRsController {
private SysUserMenuRsService sysUserMenuRsService;
@GetMapping("list")
public Object list(){
public Object list() {
List<SysUserMenuRs> list = sysUserMenuRsService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<SysUserMenuRs> list = sysUserMenuRsService.findAll();
ListPage<SysUserMenuRs> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<SysUserMenuRs> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
sysUserMenuRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(SysUserMenuRs sysUserMenuRs){
public Object add(SysUserMenuRs sysUserMenuRs) {
sysUserMenuRsService.add(sysUserMenuRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(SysUserMenuRs sysUserMenuRs){
public Object update(SysUserMenuRs sysUserMenuRs) {
sysUserMenuRsService.update(sysUserMenuRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
sysUserMenuRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -22,40 +22,39 @@ public class SysUserOrgController {
private SysUserOrgRsService sysUserOrgRsService;
@GetMapping("list")
public Object list(){
public Object list() {
List<SysUserOrgRs> list = sysUserOrgRsService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<SysUserOrgRs> list = sysUserOrgRsService.findAll();
ListPage<SysUserOrgRs> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<SysUserOrgRs> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
sysUserOrgRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(SysUserOrgRs sysUserOrgRs){
public Object add(SysUserOrgRs sysUserOrgRs) {
sysUserOrgRsService.add(sysUserOrgRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(SysUserOrgRs sysUserOrgRs){
public Object update(SysUserOrgRs sysUserOrgRs) {
sysUserOrgRsService.update(sysUserOrgRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
sysUserOrgRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
......@@ -22,40 +22,39 @@ public class SysUserRoleRsController {
private SysUserRoleRsService sysUserRoleRsService;
@GetMapping("list")
public Object list(){
public Object list() {
List<SysUserRoleRs> list = sysUserRoleRsService.findAll();
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("listpage")
public Object listpage(Integer pageSize, Integer pageIndex){
public Object listpage(Integer pageSize,Integer pageIndex) {
List<SysUserRoleRs> list = sysUserRoleRsService.findAll();
ListPage<SysUserRoleRs> listPage = new ListPage(list, pageSize, pageIndex, 0);
ListPage<SysUserRoleRs> listPage = new ListPage(list,pageSize,pageIndex,0);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),list);
}
@GetMapping("info")
public Object info(Long id){
public Object info(Long id) {
sysUserRoleRsService.find(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("add")
public Object add(SysUserRoleRs sysUserRoleRs){
public Object add(SysUserRoleRs sysUserRoleRs) {
sysUserRoleRsService.add(sysUserRoleRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("update")
public Object update(SysUserRoleRs sysUserRoleRs){
public Object update(SysUserRoleRs sysUserRoleRs) {
sysUserRoleRsService.update(sysUserRoleRs);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
@PostMapping("delete")
public Object delete(Long id){
public Object delete(Long id) {
sysUserRoleRsService.delete(id);
return new RequestResult(RequestResultType.SUCCESS.getValue(),RequestResultType.SUCCESS.getDesc(),null);
}
......
#### \u5F00\u53D1\u73AF\u5883 ###################################################
jdbc.url=jdbc:mysql://192.168.18.55:3306/bsoft?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE
jdbc.username=ll
jdbc.password=123456
jdbc.url=jdbc:mysql://192.168.18.176:3306/scml_zp_cs?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE
jdbc.username=root
jdbc.password=Suvalue2016
jdbc.driverClass=com.mysql.jdbc.Driver
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
......
#### \u5F00\u53D1\u73AF\u5883 ###################################################
jdbc.url=jdbc:mysql://192.168.18.55:3306/bsoft?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE
jdbc.username=ll
jdbc.password=123456
#### \u6D4B\u8BD5\u73AF\u5883 ###################################################
jdbc.url=jdbc:mysql://192.168.18.176:3306/scml_zp_cs?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE
jdbc.username=root
jdbc.password=Suvalue2016
jdbc.driverClass=com.mysql.jdbc.Driver
spring.datasource.driver-class-name=oracle.jdbc.driver.OracleDriver
......
......@@ -3,50 +3,56 @@
<mapper namespace="com.bsoft.api.mapper.DicDimMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicDim">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="DIM_NAME" jdbcType="VARCHAR" property="dimName" />
<result column="DIM_FIELD" jdbcType="VARCHAR" property="dimField" />
<result column="DIM_TYPE" jdbcType="DECIMAL" property="dimType" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from DIC_DIM
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.DicDim">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_DIC_DIM_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into DIC_DIM (
DIM_NAME, DIM_FIELD,DIM_TYPE)
values (
#{dimName,jdbcType=VARCHAR}, #{dimField,jdbcType=VARCHAR},#{dimType,jdbcType=DECIMAL})
insert into DIC_DIM (CREATE_DATE, CREATE_USERID, "STATE",
DIM_NAME, DIM_FIELD, DIM_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{dimName,jdbcType=VARCHAR}, #{dimField,jdbcType=VARCHAR}, #{dimType,jdbcType=DECIMAL}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicDim">
update DIC_DIM
set
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
DIM_NAME = #{dimName,jdbcType=VARCHAR},
DIM_FIELD = #{dimField,jdbcType=VARCHAR},
DIM_TYPE=#{dimType,jdbcType=DECIMAL}
DIM_TYPE = #{dimType,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, DIM_NAME, DIM_FIELD,DIM_TYPE
select ID, CREATE_DATE, CREATE_USERID, "STATE", DIM_NAME, DIM_FIELD, DIM_TYPE
from DIC_DIM
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, DIM_NAME, DIM_FIELD,DIM_TYPE
select ID, CREATE_DATE, CREATE_USERID, "STATE", DIM_NAME, DIM_FIELD, DIM_TYPE
from DIC_DIM
</select>
<select id="selectByPageid" resultMap="BaseResultMap">
select dd.* from SER_PAGE_DIM_RS spdr,DIC_DIM dd
where spdr.DIM_ID=dd.ID and spdr.PAGE_ID=#{pageID,jdbcType=DECIMAL}
select dd.* from SER_PAGE_DIM_RS spdr,DIC_DIM dd
where spdr.DIM_ID=dd.ID and spdr.PAGE_ID=#{pageID,jdbcType=DECIMAL}
</select>
<select id="selectByPageCode" resultMap="BaseResultMap">
SELECT d.*
from DIC_DIM d
JOIN(
SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE =#{pageCode,jdbcType=VARCHAR}) d2
on d.ID=d2.DIM_ID
SELECT d.*
from DIC_DIM d
JOIN(
SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE =#{pageCode,jdbcType=VARCHAR}) d2
on d.ID=d2.DIM_ID
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.DicIndMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicInd">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
......@@ -10,22 +10,23 @@
<result column="IND_NAME" jdbcType="VARCHAR" property="indName" />
<result column="IND_FIELD" jdbcType="VARCHAR" property="indField" />
<result column="COMPUTE_MODE" jdbcType="DECIMAL" property="computeMode" />
<result column="COLUMN_TYPE" jdbcType="VARCHAR" property="columnType" />
<result column="EXEC_SQL" jdbcType="VARCHAR" property="execSql" />
<result column="DESCRIBE" jdbcType="VARCHAR" property="describe" />
<result column="CHECK_SQL" jdbcType="VARCHAR" property="checkSql" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from DIC_IND
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.DicInd">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_DIC_IND_ID.nextval from dual
</selectKey>
insert into DIC_IND (CREATE_DATE, CREATE_USERID, STATE,
IND_CODE, IND_NAME, COMPUTE_MODE,
EXEC_SQL, DESCRIBE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_DIC_IND_ID.nextval from dual
</selectKey>
insert into DIC_IND (CREATE_DATE, CREATE_USERID, STATE,
IND_CODE, IND_NAME, COMPUTE_MODE,
EXEC_SQL, `DESCRIBE`)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{indCode,jdbcType=VARCHAR}, #{indName,jdbcType=VARCHAR}, #{computeMode,jdbcType=DECIMAL},
#{execSql,jdbcType=VARCHAR}, #{describe,jdbcType=VARCHAR})
</insert>
......@@ -38,24 +39,24 @@
IND_NAME = #{indName,jdbcType=VARCHAR},
COMPUTE_MODE = #{computeMode,jdbcType=DECIMAL},
EXEC_SQL = #{execSql,jdbcType=VARCHAR},
DESCRIBE = #{describe,jdbcType=VARCHAR}
`DESCRIBE` = #{describe,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL,
DESCRIBE
`DESCRIBE`
from DIC_IND
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL,
DESCRIBE
select ID, CREATE_DATE, CREATE_USERID, STATE, IND_CODE, IND_NAME, COMPUTE_MODE, EXEC_SQL,
`DESCRIBE`
from DIC_IND
</select>
<select id="selectAllByFilter" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, IND_CODE, IND_NAME,IND_FIELD, COMPUTE_MODE, EXEC_SQL,
DESCRIBE
`DESCRIBE`
from DIC_IND
where IND_NAME LIKE '%'||#{filter,jdbcType=VARCHAR}||'%'
where IND_NAME LIKE CONCAT('%',#{filter,jdbcType=VARCHAR})
</select>
</mapper>
\ No newline at end of file
......@@ -3,6 +3,9 @@
<mapper namespace="com.bsoft.api.mapper.DicOrgMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.DicOrg">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="ORG_CODE" jdbcType="VARCHAR" property="orgCode" />
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" />
<result column="ORG_NO" jdbcType="VARCHAR" property="orgNo" />
......@@ -13,13 +16,13 @@
<result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" />
</resultMap>
<resultMap id="SummaryDept" type="com.bsoft.api.model.SerDepartment">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="ORG_ID" jdbcType="VARCHAR" property="orgId" />
<result column="KSBM" jdbcType="VARCHAR" property="ksbm" />
<result column="KSMC" jdbcType="VARCHAR" property="ksmc" />
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="ORG_ID" jdbcType="VARCHAR" property="orgId" />
<result column="KSBM" jdbcType="VARCHAR" property="ksbm" />
<result column="KSMC" jdbcType="VARCHAR" property="ksmc" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from DIC_ORG
......@@ -27,25 +30,22 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.DicOrg">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_DIC_ORG_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into DIC_ORG (CREATE_DATE, CREATE_USERID, STATE,
ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
insert into DIC_ORG (CREATE_DATE, CREATE_USERID, "STATE",
ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.DicOrg">
update DIC_ORG
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
ORG_CODE = #{orgCode,jdbcType=VARCHAR},
ORG_NAME = #{orgName,jdbcType=VARCHAR},
ORG_NO = #{orgNo,jdbcType=VARCHAR},
......@@ -57,13 +57,13 @@
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
from DIC_ORG
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
from DIC_ORG
</select>
......@@ -74,13 +74,13 @@
and uor.STATE = 1 and o.STATE = 1 and o.PARENT_ID = 0
</select>
<select id="selectDeptByUser" resultMap="SummaryDept">
select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC
from SYS_USER_ORG_RS rs
join DIC_ORG o on o.id = rs.ORG_ID and rs.STATE = 1
where o.STATE = 1
<if test="orgId!=null">
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL}
</if>
and rs.USER_ID = #{userId,jdbcType=DECIMAL}
select o.ID,o.ORG_CODE as KSBM,o.ORG_NAME as KSMC
from SYS_USER_ORG_RS rs
join DIC_ORG o on o.id = rs.ORG_ID and rs.STATE = 1
where o.STATE = 1
<if test="orgId!=null">
and o.PARENT_ID = #{orgId,jdbcType=DECIMAL}
</if>
and rs.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
</mapper>
\ No newline at end of file
......@@ -16,9 +16,9 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerBlock">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SER_BLOCK_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_BLOCK (CREATE_DATE, CREATE_USERID, STATE,
insert into SER_BLOCK (CREATE_DATE, CREATE_USERID, "STATE",
BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
......@@ -29,19 +29,19 @@
update SER_BLOCK
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
BLOCK_CODE = #{blockCode,jdbcType=VARCHAR},
BLOCK_NAME = #{blockName,jdbcType=VARCHAR},
RETURN_TYPE = #{returnType,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
select ID, CREATE_DATE, CREATE_USERID, "STATE", BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
from SER_BLOCK
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
select ID, CREATE_DATE, CREATE_USERID, "STATE", BLOCK_CODE, BLOCK_NAME, RETURN_TYPE
from SER_BLOCK
</select>
</mapper>
\ No newline at end of file
......@@ -16,9 +16,9 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDepartment">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DEPARTMENT_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DEPARTMENT (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_DEPARTMENT (CREATE_DATE, CREATE_USERID, "STATE",
ORG_ID, KSBM, KSMC)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgId,jdbcType=VARCHAR}, #{ksbm,jdbcType=VARCHAR}, #{ksmc,jdbcType=VARCHAR})
......@@ -41,16 +41,15 @@
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", ORG_ID, KSBM, KSMC
from SER_DEPARTMENT
where "STATE" = 1
</select>
<select id="selectSummaryDept" resultMap="BaseResultMap">
select DEPT_CODE as KSBM,DEPT_NAME as KSMC
from SER_PROJ_VALUE
where 1=1
<if test="date!=null">
and "DATE"=#{date}
</if>
GROUP BY DEPT_CODE,DEPT_NAME,SORT
order by SORT
select DEPT_CODE as KSBM,DEPT_NAME as KSMC
from SER_PROJ_VALUE
where 1=1
<if test="date!=null">
and "DATE"=#{date}
</if>
GROUP BY DEPT_CODE,DEPT_NAME,SORT
order by SORT
</select>
</mapper>
\ No newline at end of file
......@@ -19,9 +19,9 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDeptDocRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DEPT_DOC_RS_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DEPT_DOC_RS (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_DEPT_DOC_RS (CREATE_DATE, CREATE_USERID, "STATE",
ORG_ID, KSBM, KSMC,
YSBM, YSMC, YSLX)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
......
......@@ -15,9 +15,9 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDimValue">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DIM_VALUE_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DIM_VALUE (ORG_ID, ITEM_NAME, ITEM_VALUE,
insert into SER_DIM_VALUE (ORG_ID, ITEM_NAME, ITEM_VALUE,
"DATE", DIM_ID)
values (#{orgId,jdbcType=DECIMAL}, #{itemName,jdbcType=VARCHAR}, #{itemValue,jdbcType=VARCHAR},
#{date,jdbcType=DECIMAL}, #{dimId,jdbcType=DECIMAL})
......@@ -43,9 +43,9 @@
<select id="selectByDimId" resultMap="BaseResultMap">
SELECT dv.*
FROM SER_DIM_VALUE dv
LEFT JOIN ( SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr LEFT JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
ON dv.DIM_ID = d.DIM_ID
where 1=1
LEFT JOIN ( SELECT DISTINCT pdr.DIM_ID FROM SER_PAGE_DIM_RS pdr LEFT JOIN SER_PAGE p ON pdr.PAGE_ID = p.ID AND p.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}) d
ON dv.DIM_ID = d.DIM_ID
where 1=1
<if test="dimId!=null">
and dv.DIM_ID=#{dimId,jdbcType=DECIMAL}
</if>
......
......@@ -11,16 +11,15 @@
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" />
<result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_DISEASE_DOC_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DISEASE_DOC_RS_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DISEASE_DOC_RS (ORG_ID, DOC_CODE, DOC_NAME,
insert into SER_DISEASE_DOC_RS (ORG_ID, DOC_CODE, DOC_NAME,
MDC_CODE, "DATE", DEPT_CODE,
DEPT_NAME)
values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR},
......@@ -48,40 +47,40 @@
from SER_DISEASE_DOC_RS
</select>
<select id="selectByCode" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, "DATE", DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where 1=1
<if test="docCode!=null">
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if test="mdcCode!=null">
and MDC_CODE = #{mdcCode,jdbcType=VARCHAR}
</if>
<if test="deptCode!=null">
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, "DATE", DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where 1=1
<if test="docCode!=null">
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if test="mdcCode!=null">
and MDC_CODE = #{mdcCode,jdbcType=VARCHAR}
</if>
<if test="deptCode!=null">
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if test="date!=null">
and "DATE" = #{date,jdbcType=VARCHAR}
</if>
</select>
<select id="selectByRelation" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, "DATE", DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where 1=1
<if test="docCode!=null">
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if test="listMdcCode.length > 0">
and MDC_CODE in
<foreach item="item" index="index" collection="listMdcCode" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="deptCode!=null">
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if test="date!=null">
and "DATE" = #{date,jdbcType=VARCHAR}
</if>
</select>
<select id="selectByRelation" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, "DATE", DEPT_CODE, DEPT_NAME
from SER_DISEASE_DOC_RS
where 1=1
<if test="docCode!=null">
and DOC_CODE = #{docCode,jdbcType=VARCHAR}
</if>
<if test="listMdcCode.length > 0">
and MDC_CODE in
<foreach item="item" index="index" collection="listMdcCode" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
<if test="deptCode!=null">
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if test="date!=null">
and "DATE" = #{date,jdbcType=VARCHAR}
</if>
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerDiseaseMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDisease">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="MDC_CODE" jdbcType="VARCHAR" property="mdcCode" />
<result column="MDC_NAME" jdbcType="VARCHAR" property="mdcName" />
<result column="DATE" jdbcType="DECIMAL" property="date" />
......@@ -11,6 +14,7 @@
<result column="LEVEL" jdbcType="DECIMAL" property="level" />
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" />
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" />
<result column="PARENT_CODE" jdbcType="VARCHAR" property="parentCode" />
</resultMap>
<resultMap id="DiseaseLevel" type="com.bsoft.api.model.respmodel.DiseaseLevel">
<id column="ID" jdbcType="DECIMAL" property="id" />
......@@ -23,61 +27,39 @@
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" />
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_DISEASE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDisease">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DISEASE_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DISEASE (
MDC_CODE, MDC_NAME, DATE,
MDC_NUM, PARENT_ID, LEVEL,
ORG_ID, ORG_NAME)
values (
#{mdcCode,jdbcType=VARCHAR}, #{mdcName,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL},
#{mdcNum,jdbcType=DECIMAL}, #{parentId,jdbcType=DECIMAL}, #{level,jdbcType=DECIMAL},
#{orgId,jdbcType=DECIMAL}, #{orgName,jdbcType=VARCHAR})
insert into SER_DISEASE (CREATE_DATE, CREATE_USERID, "STATE",
MDC_CODE, MDC_NAME, "DATE",
MDC_NUM, PARENT_ID, "LEVEL",
ORG_ID, ORG_NAME, PARENT_CODE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{mdcCode,jdbcType=VARCHAR}, #{mdcName,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL},
#{mdcNum,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL}, #{level,jdbcType=DECIMAL},
#{orgId,jdbcType=DECIMAL}, #{orgName,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDisease">
update SER_DISEASE
set
MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
MDC_NAME = #{mdcName,jdbcType=VARCHAR},
DATE = #{date,jdbcType=DECIMAL},
MDC_NUM = #{mdcNum,jdbcType=DECIMAL},
PARENT_ID = #{parentId,jdbcType=DECIMAL},
LEVEL = #{level,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=DECIMAL},
ORG_NAME = #{orgName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, MDC_CODE, MDC_NAME, "DATE", MDC_NUM,
PARENT_ID, "LEVEL", ORG_ID, ORG_NAME
from SER_DISEASE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectByCode" resultMap="BaseResultMap">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d."DATE",d.MDC_NUM,
d.PARENT_ID, d."LEVEL", d.ORG_ID, d.ORG_NAME
from SER_DISEASE d,SER_DISEASE_DOC_RS rs
where d.STATE=1
and rs.MDC_CODE=d.MDC_CODE and rs.MDC_CODE = #{code,jdbcType=VARCHAR} and rs."DATE" = #{date,jdbcType=VARCHAR} and d."DATE" =#{date,jdbcType=VARCHAR}
<if test="docCode!=null">
and rs.DOC_CODE=#{docCode,jdbcType=VARCHAR}
</if>
<if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, MDC_CODE, MDC_NAME, DATE, MDC_NUM,
PARENT_ID, LEVEL, ORG_ID, ORG_NAME
select ID, CREATE_DATE, CREATE_USERID, "STATE", MDC_CODE, MDC_NAME, "DATE", MDC_NUM,
PARENT_ID, "LEVEL", ORG_ID, ORG_NAME, PARENT_CODE
from SER_DISEASE
</select>
<select id="selectByCode" resultMap="BaseResultMap">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d."DATE",d.MDC_NUM,
d.PARENT_ID, d."LEVEL", d.ORG_ID, d.ORG_NAME
from SER_DISEASE d,SER_DISEASE_DOC_RS rs
where d.STATE=1
and rs.MDC_CODE=d.MDC_CODE and rs.MDC_CODE = #{code,jdbcType=VARCHAR} and rs."DATE" = #{date,jdbcType=VARCHAR} and d."DATE" =#{date,jdbcType=VARCHAR}
<if test="docCode!=null">
and rs.DOC_CODE=#{docCode,jdbcType=VARCHAR}
</if>
<if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
</select>
<select id="selectByMdcName" resultMap="BaseResultMap">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d."DATE",d.MDC_NUM,
d.PARENT_ID, d."LEVEL", d.ORG_ID, d.ORG_NAME
......@@ -101,13 +83,13 @@
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d."DATE",d.MDC_NUM,
d.PARENT_ID, d."LEVEL", d.ORG_ID, d.ORG_NAME
from SER_DISEASE d,SER_DISEASE_DOC_RS rs
where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if test="date!=null">
and d."DATE" = #{date,jdbcType=VARCHAR} and rs."DATE" = #{date,jdbcType=VARCHAR}
</if>
<if test="level!=null">
and d."LEVEL" = #{level,jdbcType=DECIMAL}
</if>
where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if test="date!=null">
and d."DATE" = #{date,jdbcType=VARCHAR} and rs."DATE" = #{date,jdbcType=VARCHAR}
</if>
<if test="level!=null">
and d."LEVEL" = #{level,jdbcType=DECIMAL}
</if>
<if test="docCode!=null">
and rs.DOC_CODE = #{docCode,jdbcType=DECIMAL}
</if>
......@@ -144,8 +126,8 @@
order by d.MDC_NUM
</select>
<select id="selectParentById" resultMap="DiseaseLevel">
select *
from SER_DISEASE
select *
from SER_DISEASE
where 1 = 1 and STATE=1
<if test="date!=null">
and "DATE" = #{date,jdbcType=VARCHAR}
......@@ -153,18 +135,18 @@
<if test="diseaseId!=null">
and id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} )
</if>
</select>
</select>
<select id="selectSonById" resultMap="DiseaseLevel">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d."DATE",d.MDC_NUM,
d.PARENT_ID, d."LEVEL", d.ORG_ID, d.ORG_NAME
from SER_DISEASE d,SER_DISEASE_DOC_RS rs
where 1 = 1 and STATE=1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if test="date!=null">
and d."DATE" = #{date,jdbcType=VARCHAR} and rs."DATE" = #{date,jdbcType=VARCHAR}
</if>
<if test="diseaseId!=null">
and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}
</if>
<if test="date!=null">
and d."DATE" = #{date,jdbcType=VARCHAR} and rs."DATE" = #{date,jdbcType=VARCHAR}
</if>
<if test="diseaseId!=null">
and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}
</if>
<if test="docCode!=null">
and rs.DOC_CODE=#{docCode,jdbcType=VARCHAR}
</if>
......@@ -172,5 +154,5 @@
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by d.MDC_NUM
</select>
</select>
</mapper>
\ No newline at end of file
......@@ -17,13 +17,13 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDoctor">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DOCTOR_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_DOCTOR (CREATE_DATE, CREATE_USERID, "STATE",
ORG_ID, YSBM, YSMC,
ORG_ID, YSBM, YSMC,
YSLX)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgId,jdbcType=VARCHAR}, #{ysbm,jdbcType=VARCHAR}, #{ysmc,jdbcType=VARCHAR},
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{orgId,jdbcType=VARCHAR}, #{ysbm,jdbcType=VARCHAR}, #{ysmc,jdbcType=VARCHAR},
#{yslx,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDoctor">
......
......@@ -8,7 +8,7 @@
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="BLOCK_ID" jdbcType="DECIMAL" property="blockId" />
<result column="PAGE_ID" jdbcType="DECIMAL" property="pageId" />
<result column="WHERE_CLAUSE" jdbcType="VARCHAR" property="whereClause"></result>
<result column="WHERE_CLAUSE" jdbcType="VARCHAR" property="whereClause" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SER_PAGE_BLOCK_RS
......@@ -16,35 +16,37 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageBlockRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SER_PAGE_BLOCK_RS_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_BLOCK_RS (CREATE_DATE, CREATE_USERID, STATE,
BLOCK_ID, PAGE_ID,WHERE_CLAUSE)
insert into SER_PAGE_BLOCK_RS (CREATE_DATE, CREATE_USERID, "STATE",
BLOCK_ID, PAGE_ID, WHERE_CLAUSE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{blockId,jdbcType=DECIMAL}, #{pageId,jdbcType=DECIMAL},#{whereClause,jdbcType=DECIMAL})
#{blockId,jdbcType=DECIMAL}, #{pageId,jdbcType=DECIMAL}, #{whereClause,jdbcType=VARCHAR}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageBlockRs">
update SER_PAGE_BLOCK_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
BLOCK_ID = #{blockId,jdbcType=DECIMAL},
PAGE_ID = #{pageId,jdbcType=DECIMAL},
WHERE_CLAUSE=#{whereClause,jdbcType=DECIMAL}
WHERE_CLAUSE = #{whereClause,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_ID, PAGE_ID,WHERE_CLAUSE
select ID, CREATE_DATE, CREATE_USERID, "STATE", BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_ID, PAGE_ID,WHERE_CLAUSE
select ID, CREATE_DATE, CREATE_USERID, "STATE", BLOCK_ID, PAGE_ID, WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
</select>
<select id="selectByPageId" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_ID, PAGE_ID,WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
where PAGE_ID=#{pageID,jdbcType=DECIMAL}
</select>
<select id="selectByPageId" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, BLOCK_ID, PAGE_ID,WHERE_CLAUSE
from SER_PAGE_BLOCK_RS
where PAGE_ID=#{pageID,jdbcType=DECIMAL}
</select>
</mapper>
\ 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.bsoft.api.mapper.SerPageDimRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageDimRs">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="DIM_ID" jdbcType="DECIMAL" property="dimId" />
<result column="PAGE_ID" jdbcType="DECIMAL" property="pageId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SER_PAGE_DIM_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageDimRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SER_PAGE_DIM_RS_ID.nextval from dual
</selectKey>
insert into SER_PAGE_DIM_RS (CREATE_DATE, CREATE_USERID, STATE,
DIM_ID, PAGE_ID)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{dimId,jdbcType=DECIMAL}, #{pageId,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageDimRs">
update SER_PAGE_DIM_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
DIM_ID = #{dimId,jdbcType=DECIMAL},
PAGE_ID = #{pageId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, DIM_ID, PAGE_ID
from SER_PAGE_DIM_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, DIM_ID, PAGE_ID
from SER_PAGE_DIM_RS
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerPageFieldMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageField">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
......@@ -10,36 +10,17 @@
<result column="FIELD_NAME" jdbcType="VARCHAR" property="fieldName" />
<result column="REMARK" jdbcType="VARCHAR" property="remark" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PAGE_FIELD
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageField">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PAGE_FIELD_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_PAGE_FIELD (CREATE_DATE, CREATE_USERID, "STATE",
FIELD_CODE, FIELD_NAME, REMARK
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{fieldCode,jdbcType=VARCHAR}, #{fieldName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageField">
update SER_PAGE_FIELD
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
FIELD_CODE = #{fieldCode,jdbcType=VARCHAR},
FIELD_NAME = #{fieldName,jdbcType=VARCHAR},
REMARK = #{remark,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", FIELD_CODE, FIELD_NAME, REMARK
from SER_PAGE_FIELD
......
<?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.bsoft.api.mapper.SerPageMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPage">
<id column="ID" jdbcType="DECIMAL" property="id"/>
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate"/>
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid"/>
<result column="STATE" jdbcType="DECIMAL" property="state"/>
<result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode"/>
<result column="PAGE_NAME" jdbcType="VARCHAR" property="pageName"/>
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPage">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode" />
<result column="PAGE_NAME" jdbcType="VARCHAR" property="pageName" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SER_PAGE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPage">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SER_PAGE_ID.nextval from dual
</selectKey>
insert into SER_PAGE (CREATE_DATE, CREATE_USERID, STATE,
PAGE_CODE, PAGE_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPage">
update SER_PAGE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
PAGE_NAME = #{pageName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, PAGE_CODE, PAGE_NAME
from SER_PAGE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, PAGE_CODE, PAGE_NAME
from SER_PAGE
</select>
<select id="selectByCodeAndDim" resultMap="BaseResultMap">
select d.* from SER_PAGE d,
<if test="dimCount != 0">
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
and c.DIM_FIELD in (${inField})
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if test="dimCount != 0">
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
<select id="selectByCodeAndDimList" resultType="com.bsoft.api.model.SerPage">
select d.* from SER_PAGE d,
<if test="dimCount != 0">
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
<if test="inFields.size() > 0">
and c.DIM_FIELD in
<foreach item="item" index="index" collection="inFields" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if test="dimCount != 0">
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPage">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE (CREATE_DATE, CREATE_USERID, "STATE",
PAGE_CODE, PAGE_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{pageCode,jdbcType=VARCHAR}, #{pageName,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPage">
update SER_PAGE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
PAGE_NAME = #{pageName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PAGE_CODE, PAGE_NAME
from SER_PAGE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PAGE_CODE, PAGE_NAME
from SER_PAGE
</select>
<select id="selectByCodeAndDim" resultMap="BaseResultMap">
select d.* from SER_PAGE d,
<if test="dimCount != 0">
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
and c.DIM_FIELD in (${inField})
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if test="dimCount != 0">
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
<select id="selectByCodeAndDimList" resultType="com.bsoft.api.model.SerPage">
select d.* from SER_PAGE d,
<if test="dimCount != 0">
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
<if test="inFields.size() > 0">
and c.DIM_FIELD in
<foreach item="item" index="index" collection="inFields" open="(" separator="," close=")">
#{item,jdbcType=VARCHAR}
</foreach>
</if>
GROUP BY a.ID) e,
</if>
(select a.id,COUNT(b.ID) count
from SER_PAGE a
JOIN ser_page_dim_rs b on a.id = b.PAGE_ID and b.state = 1
JOIN DIC_DIM c on c.ID = b.DIM_ID
where a.state =1 and a.PAGE_CODE = #{pageCode,jdbcType=VARCHAR}
GROUP BY a.ID) f
where d.id = f.id
<if test="dimCount != 0">
and f.count = e.count
and d.Id = e.id
</if>
and f.count =#{dimCount,jdbcType=INTEGER}
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerPageProjFieldRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProjFieldRs">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
......@@ -12,39 +12,17 @@
<result column="REMARK" jdbcType="VARCHAR" property="remark" />
<result column="SORT" jdbcType="DECIMAL" property="sort" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PAGE_PROJ_FIELD_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageProjFieldRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PAGE_PROJ_FIELD_RS_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ_FIELD_RS (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_PAGE_PROJ_FIELD_RS (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_TYPE, PROJ_ID, FIELD_ID,
REMARK, SORT)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{remark,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageProjFieldRs">
update SER_PAGE_PROJ_FIELD_RS
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PROJ_TYPE = #{projType,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
FIELD_ID = #{fieldId,jdbcType=DECIMAL},
REMARK = #{remark,jdbcType=VARCHAR},
SORT = #{sort,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_TYPE, PROJ_ID, FIELD_ID, REMARK,
SORT
from SER_PAGE_PROJ_FIELD_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_TYPE, PROJ_ID, FIELD_ID, REMARK,
SORT
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerPageProjMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProj">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
......@@ -10,36 +10,17 @@
<result column="PROJ_CODE" jdbcType="VARCHAR" property="projCode" />
<result column="PROJ_TYPE" jdbcType="VARCHAR" property="projType" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PAGE_PROJ
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageProj">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PAGE_PROJ_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_PAGE_PROJ (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_NAME, PROJ_CODE, PROJ_TYPE
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projName,jdbcType=VARCHAR}, #{projCode,jdbcType=VARCHAR}, #{projType,jdbcType=VARCHAR}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageProj">
update SER_PAGE_PROJ
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
PROJ_NAME = #{projName,jdbcType=VARCHAR},
PROJ_CODE = #{projCode,jdbcType=VARCHAR},
PROJ_TYPE = #{projType,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_NAME, PROJ_CODE, PROJ_TYPE
from SER_PAGE_PROJ
......
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerPageProjValueMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerPageProjValue">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
......@@ -26,15 +26,11 @@
<result column="FIELD_VALUE" jdbcType="VARCHAR" property="fieldValue" />
<result column="FIELD_UNIT" jdbcType="VARCHAR" property="fieldUnit" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from SER_PAGE_PROJ_VALUE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageProjValue">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PAGE_PROJ_VALUE_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_PAGE_PROJ_VALUE (CREATE_DATE, CREATE_USERID, "STATE",
DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID,
FIELD_VALUE, FIELD_UNIT)
......@@ -43,27 +39,6 @@
#{projType,jdbcType=DECIMAL}, #{projId,jdbcType=DECIMAL}, #{fieldId,jdbcType=DECIMAL},
#{fieldValue,jdbcType=VARCHAR}, #{fieldUnit,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerPageProjValue">
update SER_PAGE_PROJ_VALUE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
DATE_FILTER = #{dateFilter,jdbcType=DECIMAL},
DATA_CATEGORY = #{dataCategory,jdbcType=VARCHAR},
PROJ_TYPE = #{projType,jdbcType=DECIMAL},
PROJ_ID = #{projId,jdbcType=DECIMAL},
FIELD_ID = #{fieldId,jdbcType=DECIMAL},
FIELD_VALUE = #{fieldValue,jdbcType=VARCHAR},
FIELD_UNIT = #{fieldUnit,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID, FIELD_VALUE, FIELD_UNIT
from SER_PAGE_PROJ_VALUE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", DEPT_CODE, DATE_FILTER, DATA_CATEGORY,
PROJ_TYPE, PROJ_ID, FIELD_ID, FIELD_VALUE, FIELD_UNIT
......
......@@ -16,9 +16,9 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerPageValueConfig">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PAGE_VALUE_CONFIG_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PAGE_VALUE_CONFIG (CREATE_DATE, CREATE_USERID, "STATE",
insert into SER_PAGE_VALUE_CONFIG (CREATE_DATE, CREATE_USERID, "STATE",
PAGE, PAGE_NAME, SQLSTR
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
......@@ -49,7 +49,7 @@
from SER_PAGE_VALUE_CONFIG
where STATE = 1 and PAGE = #{page,jdbcType=DECIMAL}
</select>
<select id="selectSqlStr" resultType="java.util.Map">
<select id="selectSqlStr" resultType="java.util.Map">
${sqlStr}
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bsoft.api.mapper.SerProjMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerProj">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
......@@ -12,9 +12,10 @@
<result column="IS_BUDGET" jdbcType="DECIMAL" property="isBudget" />
<result column="TYPE_STATE" jdbcType="DECIMAL" property="typeState" />
<result column="SORT" jdbcType="DECIMAL" property="sort" />
<result column="PARENT" jdbcType="DECIMAL" property="parent" />
</resultMap>
<resultMap id="Summary" type="com.bsoft.api.model.respmodel.Summary">
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" />
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" />
</resultMap>
<resultMap id="ProjectInfo" type="com.bsoft.api.model.respmodel.ProjectInfo">
<result column="EXPONENT_ID" jdbcType="DECIMAL" property="exponentId" />
......@@ -25,14 +26,14 @@
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerProj">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PROJ_ID.nextval from dual
</selectKey>
insert into SER_PROJ (CREATE_DATE, CREATE_USERID, "STATE",
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PROJ (CREATE_DATE, CREATE_USERID, "STATE",
"TYPE", PROJ_TYPE, PROJ_NAME,
IS_BUDGET, TYPE_STATE, SORT
)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{type,jdbcType=DECIMAL}, #{projType,jdbcType=DECIMAL}, #{projName,jdbcType=VARCHAR},
#{isBudget,jdbcType=DECIMAL}, #{typeState,jdbcType=DECIMAL}, #{sort,jdbcType=DECIMAL}
)
......@@ -51,40 +52,40 @@
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", "TYPE", PROJ_TYPE, PROJ_NAME, IS_BUDGET,
select ID, CREATE_DATE, CREATE_USERID, "STATE", "TYPE", PROJ_TYPE, PROJ_NAME, IS_BUDGET,
TYPE_STATE, SORT
from SER_PROJ
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", "TYPE", PROJ_TYPE, PROJ_NAME, IS_BUDGET,
select ID, CREATE_DATE, CREATE_USERID, "STATE", "TYPE", PROJ_TYPE, PROJ_NAME, IS_BUDGET,
TYPE_STATE, SORT
from SER_PROJ
</select>
<select id="selectState" resultMap="ProjectInfo">
select DISTINCT p.TYPE as EXPONENT_ID,e.EXPONENT_NAME,e.SORT
from ser_proj p
join DIC_EXPONENT e on e.EXPONENT_ID=p.TYPE and e.STATE = 1
where p.STATE = 1
<if test="projType!=null">
and p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
</if>
<if test="typeState!=null">
and p.TYPE_STATE = #{typeState,jdbcType=DECIMAL}
</if>
order by e.SORT
select DISTINCT p.TYPE as EXPONENT_ID,e.EXPONENT_NAME,e.SORT
from ser_proj p
join DIC_EXPONENT e on e.EXPONENT_ID=p.TYPE and e.STATE = 1
where p.STATE = 1
<if test="projType!=null">
and p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
</if>
<if test="typeState!=null">
and p.TYPE_STATE = #{typeState,jdbcType=DECIMAL}
</if>
order by e.SORT
</select>
<select id="selectDept" resultMap="Summary">
select v.DEPT_CODE
from SER_PROJ_VALUE v
join SER_PROJ p on p.ID =v.PROJ_ID and p.STATE = 1
where 1=1
<if test="date!=null">
and v."DATE"=#{date}
</if>
<if test="budgetType!=null">
and BitAnd(IS_BUDGET,#{budgetType})>0
</if>
<if test="date!=null">
and v."DATE"=#{date}
</if>
<if test="budgetType!=null">
and BitAnd(IS_BUDGET,#{budgetType})>0
</if>
GROUP BY v.DEPT_CODE,v.SORT
order by v.SORT
</select>
......
<?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.bsoft.api.mapper.SerProjValueHistoryMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerProjValueHistory">
<result column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="PROJ_ID" jdbcType="DECIMAL" property="projId" />
<result column="QNZ" jdbcType="DECIMAL" property="qnz" />
<result column="WQQS" jdbcType="DECIMAL" property="wqqs" />
<result column="LS" jdbcType="DECIMAL" property="ls" />
<result column="MB" jdbcType="DECIMAL" property="mb" />
<result column="CSYSZ" jdbcType="DECIMAL" property="csysz" />
<result column="CSYSZ_TB" jdbcType="DECIMAL" property="csyszTb" />
<result column="YSZ" jdbcType="DECIMAL" property="ysz" />
<result column="YSZ_TB" jdbcType="DECIMAL" property="yszTb" />
<result column="SZ" jdbcType="DECIMAL" property="sz" />
<result column="ZXPL" jdbcType="DECIMAL" property="zxpl" />
<result column="DATE" jdbcType="DECIMAL" property="date" />
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" />
<result column="SORT" jdbcType="DECIMAL" property="sort" />
<result column="VERSION" jdbcType="VARCHAR" property="version" />
<result column="QNZ_UNIT" jdbcType="VARCHAR" property="qnzUnit" />
<result column="CSYSZ_UNIT" jdbcType="VARCHAR" property="csyszUnit" />
<result column="YSZ_UNIT" jdbcType="VARCHAR" property="yszUnit" />
<result column="SZ_UNIT" jdbcType="VARCHAR" property="szUnit" />
<result column="WQQS_ZYPZ_JS" jdbcType="DECIMAL" property="wqqsZypzJs" />
<result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName" />
</resultMap>
<insert id="insert" parameterType="com.bsoft.api.model.SerProjValueHistory">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PROJ_VALUE_HISTORY_ID.nextval from dual
</selectKey>
insert into SER_PROJ_VALUE_HISTORY (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_ID, QNZ, WQQS,
LS, MB, CSYSZ, CSYSZ_TB,
YSZ, YSZ_TB, SZ, ZXPL,
"DATE", DEPT_CODE, SORT,
VERSION, QNZ_UNIT, CSYSZ_UNIT,
YSZ_UNIT, SZ_UNIT, WQQS_ZYPZ_JS,
DEPT_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{qnz,jdbcType=DECIMAL}, #{wqqs,jdbcType=DECIMAL},
#{ls,jdbcType=DECIMAL}, #{mb,jdbcType=DECIMAL}, #{csysz,jdbcType=DECIMAL}, #{csyszTb,jdbcType=DECIMAL},
#{ysz,jdbcType=DECIMAL}, #{yszTb,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL},
#{date,jdbcType=DECIMAL}, #{deptCode,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL},
#{version,jdbcType=VARCHAR}, #{qnzUnit,jdbcType=VARCHAR}, #{csyszUnit,jdbcType=VARCHAR},
#{yszUnit,jdbcType=VARCHAR}, #{szUnit,jdbcType=VARCHAR}, #{wqqsZypzJs,jdbcType=DECIMAL},
#{deptName,jdbcType=VARCHAR})
</insert>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, "STATE", PROJ_ID, QNZ, WQQS, LS, MB, CSYSZ,
CSYSZ_TB, YSZ, YSZ_TB, SZ, ZXPL, "DATE", DEPT_CODE, SORT, VERSION, QNZ_UNIT, CSYSZ_UNIT,
YSZ_UNIT, SZ_UNIT, WQQS_ZYPZ_JS, DEPT_NAME
from SER_PROJ_VALUE_HISTORY
</select>
<update id="copyValue">
insert into SER_PROJ_VALUE_HISTORY("ID","STATE", "PROJ_ID", "QNZ", "WQQS", "LS", "MB", "CSYSZ", "CSYSZ_TB", "YSZ",
"YSZ_TB", "SZ", "ZXPL", "DATE", "DEPT_CODE", "SORT", "VERSION", "QNZ_UNIT", "CSYSZ_UNIT", "YSZ_UNIT", "SZ_UNIT",
"WQQS_ZYPZ_JS", "DEPT_NAME")
select SEQ_SER_PROJ_VALUE_HISTORY_ID.NEXTVAL,"STATE", "PROJ_ID", "QNZ", "WQQS", "LS", "MB", "CSYSZ", "CSYSZ_TB",
"YSZ", "YSZ_TB", "SZ", "ZXPL", "DATE", "DEPT_CODE", "SORT", "VERSION", "QNZ_UNIT", "CSYSZ_UNIT", "YSZ_UNIT",
"SZ_UNIT", "WQQS_ZYPZ_JS", "DEPT_NAME"
from SER_PROJ_VALUE;
</update>
</mapper>
\ No newline at end of file
......@@ -19,13 +19,13 @@
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerProjValueSz">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_PROJ_VALUE_SZ_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PROJ_VALUE_SZ (CREATE_DATE, CREATE_USERID, "STATE",
PROJ_ID, SZ, ZXPL, "DATE",
PROJ_ID, SZ, ZXPL, "DATE",
DEPT_CODE, HOSCODE)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{projId,jdbcType=DECIMAL}, #{sz,jdbcType=DECIMAL}, #{zxpl,jdbcType=DECIMAL}, #{date,jdbcType=DECIMAL},
#{deptCode,jdbcType=VARCHAR}, #{hoscode,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerProjValueSz">
......@@ -56,7 +56,7 @@
select *
from SER_PROJ_VALUE_SZ
where STATE = 1 and PROJ_ID = #{projId,jdbcType=DECIMAL}
and TO_NUMBER(SUBSTR("DATE", 1, 4)) = #{date,jdbcType=DECIMAL}
and LEFT("DATE",4) = #{date,jdbcType=DECIMAL}
and DEPT_CODE = #{deptCode,jdbcType=VARCHAR} and HOSCODE = #{hosCode,jdbcType=VARCHAR}
order by "DATE" desc
</select>
......
......@@ -3,6 +3,9 @@
<mapper namespace="com.bsoft.api.mapper.SysMenuMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysMenu">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATA" jdbcType="TIMESTAMP" property="createData" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="MENU_NAME" jdbcType="VARCHAR" property="menuName" />
<result column="MENU_URL" jdbcType="VARCHAR" property="menuUrl" />
<result column="MENU_IMAGE" jdbcType="VARCHAR" property="menuImage" />
......@@ -10,61 +13,65 @@
<result column="PAGE_CODE" jdbcType="VARCHAR" property="pageCode" />
<result column="SORT" jdbcType="DECIMAL" property="sort" />
</resultMap>
<resultMap id="sysMenuResultMap" type="com.bsoft.api.model.respmodel.SysMenuList" extends="BaseResultMap"/>
<resultMap id="sysMenuResultMap" type="com.bsoft.api.model.respmodel.SysMenuList" extends="BaseResultMap"/>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_MENU
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysMenu">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SYS_MENU_ID.nextval from dual
SELECT LAST_INSERT_ID()
</selectKey>
insert into SYS_MENU (
MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID,PAGE_CODE,SORT)
values (
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
#{parentId,jdbcType=DECIMAL},#{pageCode,jdbcType=VARCHAR},#{sort,jdbcType=DECIMAL})
insert into SYS_MENU (CREATE_DATA, CREATE_USERID, "STATE",
MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
)
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{menuName,jdbcType=VARCHAR}, #{menuUrl,jdbcType=VARCHAR}, #{menuImage,jdbcType=VARCHAR},
#{parentId,jdbcType=DECIMAL}, #{pageCode,jdbcType=VARCHAR}, #{sort,jdbcType=DECIMAL}
)
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysMenu">
update SYS_MENU
set
set CREATE_DATA = #{createData,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
"STATE" = #{state,jdbcType=DECIMAL},
MENU_NAME = #{menuName,jdbcType=VARCHAR},
MENU_URL = #{menuUrl,jdbcType=VARCHAR},
MENU_IMAGE = #{menuImage,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL},
PAGE_CODE=#{pageCode,jdbcType=VARCHAR},
SORT=#{sort,jdbcType=DECIMAL}
PAGE_CODE = #{pageCode,jdbcType=VARCHAR},
SORT = #{sort,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID,MENU_NAME, MENU_URL, MENU_IMAGE, PARENT_ID,PAGE_CODE,SORT
select ID, CREATE_DATA, CREATE_USERID, "STATE", MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
from SYS_MENU
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID,MENU_NAME, MENU_URL, MENU_IMAGE, PARENT_ID
select ID, CREATE_DATA, CREATE_USERID, "STATE", MENU_NAME, MENU_URL, MENU_IMAGE,
PARENT_ID, PAGE_CODE, SORT
from SYS_MENU
</select>
<select id="selectMenuByUser" resultMap="sysMenuResultMap">
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT
from
SYS_ROLE_MENU_RS rmr
LEFT JOIN
SYS_MENU m on rmr.MENU_ID = m.ID
LEFT JOIN
SYS_USER_ROLE_RS urr on rmr.ROLE_ID = urr.Role_ID
where rmr.STATE=1 and m.STATE=1 and urr.STATE=1 and urr.USER_ID = #{userId,jdbcType=DECIMAL}
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT
from
SYS_ROLE_MENU_RS rmr
LEFT JOIN
SYS_MENU m on rmr.MENU_ID = m.ID
LEFT JOIN
SYS_USER_ROLE_RS urr on rmr.ROLE_ID = urr.Role_ID
where rmr.STATE=1 and m.STATE=1 and urr.STATE=1 and urr.USER_ID = #{userId,jdbcType=DECIMAL}
union
union
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT
from
SYS_USER_MENU_RS umr
LEFT JOIN
SYS_MENU m on umr.MENU_ID = m.ID
where umr.STATE=1 and m.STATE=1 and umr.USER_ID = #{userId,jdbcType=DECIMAL}
select DISTINCT m.ID,m.MENU_NAME,m.MENU_URL,m.MENU_IMAGE,m.PARENT_ID,m.PAGE_CODE,m.SORT
from
SYS_USER_MENU_RS umr
LEFT JOIN
SYS_MENU m on umr.MENU_ID = m.ID
where umr.STATE=1 and m.STATE=1 and umr.USER_ID = #{userId,jdbcType=DECIMAL}
</select>
</mapper>
\ 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.bsoft.api.mapper.SysOrgMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SysOrg">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATA" jdbcType="TIMESTAMP" property="createData" />
<result column="CREATE_USERID" jdbcType="VARCHAR" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="ORG_CODE" jdbcType="VARCHAR" property="orgCode" />
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" />
<result column="ORG_NO" jdbcType="VARCHAR" property="orgNo" />
<result column="ORG_SHORT_NAME" jdbcType="VARCHAR" property="orgShortName" />
<result column="ORG_GROUP" jdbcType="VARCHAR" property="orgGroup" />
<result column="ORG_TYPE" jdbcType="VARCHAR" property="orgType" />
<result column="ORG_ADDRESS" jdbcType="VARCHAR" property="orgAddress" />
<result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from SYS_ORG
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SysOrg">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
select SEQ_SYS_ORG_ID.nextval from dual
</selectKey>
insert into SYS_ORG (CREATE_DATA, CREATE_USERID, STATE,
ORG_CODE, ORG_NAME, ORG_NO,
ORG_SHORT_NAME, ORG_GROUP, ORG_TYPE,
ORG_ADDRESS, PARENT_ID)
values (#{createData,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=VARCHAR}, #{state,jdbcType=DECIMAL},
#{orgCode,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, #{orgNo,jdbcType=VARCHAR},
#{orgShortName,jdbcType=VARCHAR}, #{orgGroup,jdbcType=VARCHAR}, #{orgType,jdbcType=VARCHAR},
#{orgAddress,jdbcType=VARCHAR}, #{parentId,jdbcType=DECIMAL})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SysOrg">
update SYS_ORG
set CREATE_DATA = #{createData,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=VARCHAR},
STATE = #{state,jdbcType=DECIMAL},
ORG_CODE = #{orgCode,jdbcType=VARCHAR},
ORG_NAME = #{orgName,jdbcType=VARCHAR},
ORG_NO = #{orgNo,jdbcType=VARCHAR},
ORG_SHORT_NAME = #{orgShortName,jdbcType=VARCHAR},
ORG_GROUP = #{orgGroup,jdbcType=VARCHAR},
ORG_TYPE = #{orgType,jdbcType=VARCHAR},
ORG_ADDRESS = #{orgAddress,jdbcType=VARCHAR},
PARENT_ID = #{parentId,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select ID, CREATE_DATA, CREATE_USERID, STATE, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
from SYS_ORG
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATA, CREATE_USERID, STATE, ORG_CODE, ORG_NAME, ORG_NO, ORG_SHORT_NAME,
ORG_GROUP, ORG_TYPE, ORG_ADDRESS, PARENT_ID
from SYS_ORG
</select>
</mapper>
\ No newline at end of file
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