diff --git a/bcms.iml b/bcms.iml index d8f3936..1d22ce6 100644 --- a/bcms.iml +++ b/bcms.iml @@ -1,5 +1,5 @@ - + @@ -10,225 +10,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/net/mingsoft/cms/action/web/YlsjlAction.java b/src/main/java/net/mingsoft/cms/action/web/YlsjlAction.java new file mode 100644 index 0000000..07c7416 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/action/web/YlsjlAction.java @@ -0,0 +1,68 @@ +package net.mingsoft.cms.action.web; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import net.mingsoft.base.entity.ResultData; +import net.mingsoft.basic.bean.EUListBean; +import net.mingsoft.basic.util.BasicUtil; +import net.mingsoft.cms.biz.IYlsjlBiz; +import net.mingsoft.cms.entity.YlsjlEntity; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Random; + +/** + * 添加数据管理控制层 + * + * @author D + * 创建日期:2024-6-4 14:21:20
+ * 历史修订:
+ */ +@Api(tags = "前台-数据接口") +@Controller("ylsjlWebAction") +@RequestMapping("/ylsjl") +public class YlsjlAction extends net.mingsoft.cms.action.BaseAction { + + + /** + * 注入添加数据业务层 + */ + @Autowired + private IYlsjlBiz ylsjlBiz; + + @RequestMapping(value = "/getSjl", method = {RequestMethod.GET, RequestMethod.POST}) + @ResponseBody + public ResultData getSjl() { + Random random = new Random(); + YlsjlEntity ylsjl = new YlsjlEntity(); + List ylsjlList = null; + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(ylsjl).orderByDesc(YlsjlEntity::getCreateDate); + ylsjlList = ylsjlBiz.list(wrapper); + if (CollectionUtils.isNotEmpty(ylsjlList)) { + ylsjl = ylsjlList.get(0); + int start = ylsjl.getHbcpdysjlks(); + int end = ylsjl.getHbcpdysjljs(); + int count = ylsjl.getHbcpdysjl(); + count = count + random.nextInt(3) + 3; + if(count < start || count > end){ + count = start; + } + ylsjl.setHbcpdysjl(count); + ylsjlBiz.updateById(ylsjl); + } + return ResultData.build().success(ylsjl); + } + +} \ No newline at end of file diff --git a/src/main/java/net/mingsoft/cms/biz/IYlsjlBiz.java b/src/main/java/net/mingsoft/cms/biz/IYlsjlBiz.java new file mode 100644 index 0000000..36ac91d --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/IYlsjlBiz.java @@ -0,0 +1,16 @@ +package net.mingsoft.cms.biz; + +import net.mingsoft.base.biz.IBaseBiz; +import net.mingsoft.cms.entity.YlsjlEntity; + + +/** + * 添加数据业务 + * @author D + * 创建日期:2024-6-4 14:21:20
+ * 历史修订:
+ */ +public interface IYlsjlBiz extends IBaseBiz { + + +} diff --git a/src/main/java/net/mingsoft/cms/biz/impl/YlsjlBizImpl.java b/src/main/java/net/mingsoft/cms/biz/impl/YlsjlBizImpl.java new file mode 100644 index 0000000..53b55db --- /dev/null +++ b/src/main/java/net/mingsoft/cms/biz/impl/YlsjlBizImpl.java @@ -0,0 +1,34 @@ +package net.mingsoft.cms.biz.impl; + +import net.mingsoft.cms.biz.IYlsjlBiz; +import net.mingsoft.cms.dao.IYlsjlDao; +import net.mingsoft.cms.entity.YlsjlEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import net.mingsoft.base.biz.impl.BaseBizImpl; +import net.mingsoft.base.dao.IBaseDao; +import java.util.*; + +/** +* 添加数据管理持久化层 +* @author D +* 创建日期:2024-6-4 14:21:20
+* 历史修订:
+*/ +@Service("ylsjlBizImpl") +public class YlsjlBizImpl extends BaseBizImpl implements IYlsjlBiz { + + + @Autowired + private IYlsjlDao ylsjlDao; + + + @Override + protected IBaseDao getDao() { + // TODO Auto-generated method stub + return ylsjlDao; + } + + + +} diff --git a/src/main/java/net/mingsoft/cms/dao/IYlsjlDao.java b/src/main/java/net/mingsoft/cms/dao/IYlsjlDao.java new file mode 100644 index 0000000..9630b31 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/IYlsjlDao.java @@ -0,0 +1,15 @@ +package net.mingsoft.cms.dao; + +import net.mingsoft.base.dao.IBaseDao; +import net.mingsoft.cms.entity.YlsjlEntity; + +import java.util.*; + +/** + * 添加数据持久层 + * @author D + * 创建日期:2024-6-4 14:21:20
+ * 历史修订:
+ */ +public interface IYlsjlDao extends IBaseDao { +} diff --git a/src/main/java/net/mingsoft/cms/dao/IYlsjlDao.xml b/src/main/java/net/mingsoft/cms/dao/IYlsjlDao.xml new file mode 100644 index 0000000..5eeb2b1 --- /dev/null +++ b/src/main/java/net/mingsoft/cms/dao/IYlsjlDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/net/mingsoft/cms/entity/YlsjlEntity.java b/src/main/java/net/mingsoft/cms/entity/YlsjlEntity.java new file mode 100644 index 0000000..ceecafc --- /dev/null +++ b/src/main/java/net/mingsoft/cms/entity/YlsjlEntity.java @@ -0,0 +1,414 @@ +package net.mingsoft.cms.entity; + + +import org.springframework.format.annotation.DateTimeFormat; +import com.fasterxml.jackson.annotation.JsonFormat; +import net.mingsoft.base.entity.BaseEntity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.SqlCondition; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableLogic; + +import java.util.Date; +/** +* 添加数据实体 +* @author D +* 创建日期:2024-6-4 14:21:20
+* 历史修订:
+*/ +@TableName("MDIY_MODEL_YLSJL") +public class YlsjlEntity extends BaseEntity { + +private static final long serialVersionUID = 1717482080237L; + + + + + /** + * 展示标题 + */ + @TableField(condition = SqlCondition.LIKE) + private String sjmllabel; + + /** + * 数量 + */ + + private Integer sjml; + + /** + * 单位 + */ + @TableField(condition = SqlCondition.LIKE) + private String sjmlunit; + + /** + * 展示标题 + */ + @TableField(condition = SqlCondition.LIKE) + private String sjcplabel; + + /** + * 数量 + */ + + private Integer sjcp; + + /** + * 单位 + */ + @TableField(condition = SqlCondition.LIKE) + private String sjcpunit; + + /** + * 展示标题 + */ + @TableField(condition = SqlCondition.LIKE) + private String bxgslabel; + + /** + * 数量 + */ + + private Integer bxgs; + + /** + * 单位 + */ + @TableField(condition = SqlCondition.LIKE) + private String bxgsunit; + + /** + * 展示标题 + */ + @TableField(condition = SqlCondition.LIKE) + private String yqlabel; + + /** + * 数量 + */ + + private Integer yq; + + /** + * 单位 + */ + @TableField(condition = SqlCondition.LIKE) + private String yqunit; + + /** + * 展示标题 + */ + @TableField(condition = SqlCondition.LIKE) + private String yljksjhjllabel; + + /** + * 数量 + */ + + private Integer yljksjhjl; + + /** + * 单位 + */ + @TableField(condition = SqlCondition.LIKE) + private String yljksjhjlunit; + + /** + * 展示标题 + */ + @TableField(condition = SqlCondition.LIKE) + private String hbcpdysjllabel; + + /** + * 开始值 + */ + + private Integer hbcpdysjlks; + + /** + * 结束值 + */ + + private Integer hbcpdysjljs; + + /** + * 单位 + */ + @TableField(condition = SqlCondition.LIKE) + private String hbcpdysjlunit; + + /** + * 核保产品调用数据量 + */ + + private Integer hbcpdysjl; + + + /** + * 设置展示标题 + */ + public void setSjmllabel(String sjmllabel) { + this.sjmllabel = sjmllabel; + } + + /** + * 获取展示标题 + */ + public String getSjmllabel() { + return this.sjmllabel; + } + /** + * 设置数量 + */ + public void setSjml(Integer sjml) { + this.sjml = sjml; + } + + /** + * 获取数量 + */ + public Integer getSjml() { + return this.sjml; + } + /** + * 设置单位 + */ + public void setSjmlunit(String sjmlunit) { + this.sjmlunit = sjmlunit; + } + + /** + * 获取单位 + */ + public String getSjmlunit() { + return this.sjmlunit; + } + /** + * 设置展示标题 + */ + public void setSjcplabel(String sjcplabel) { + this.sjcplabel = sjcplabel; + } + + /** + * 获取展示标题 + */ + public String getSjcplabel() { + return this.sjcplabel; + } + /** + * 设置数量 + */ + public void setSjcp(Integer sjcp) { + this.sjcp = sjcp; + } + + /** + * 获取数量 + */ + public Integer getSjcp() { + return this.sjcp; + } + /** + * 设置单位 + */ + public void setSjcpunit(String sjcpunit) { + this.sjcpunit = sjcpunit; + } + + /** + * 获取单位 + */ + public String getSjcpunit() { + return this.sjcpunit; + } + /** + * 设置展示标题 + */ + public void setBxgslabel(String bxgslabel) { + this.bxgslabel = bxgslabel; + } + + /** + * 获取展示标题 + */ + public String getBxgslabel() { + return this.bxgslabel; + } + /** + * 设置数量 + */ + public void setBxgs(Integer bxgs) { + this.bxgs = bxgs; + } + + /** + * 获取数量 + */ + public Integer getBxgs() { + return this.bxgs; + } + /** + * 设置单位 + */ + public void setBxgsunit(String bxgsunit) { + this.bxgsunit = bxgsunit; + } + + /** + * 获取单位 + */ + public String getBxgsunit() { + return this.bxgsunit; + } + /** + * 设置展示标题 + */ + public void setYqlabel(String yqlabel) { + this.yqlabel = yqlabel; + } + + /** + * 获取展示标题 + */ + public String getYqlabel() { + return this.yqlabel; + } + /** + * 设置数量 + */ + public void setYq(Integer yq) { + this.yq = yq; + } + + /** + * 获取数量 + */ + public Integer getYq() { + return this.yq; + } + /** + * 设置单位 + */ + public void setYqunit(String yqunit) { + this.yqunit = yqunit; + } + + /** + * 获取单位 + */ + public String getYqunit() { + return this.yqunit; + } + /** + * 设置展示标题 + */ + public void setYljksjhjllabel(String yljksjhjllabel) { + this.yljksjhjllabel = yljksjhjllabel; + } + + /** + * 获取展示标题 + */ + public String getYljksjhjllabel() { + return this.yljksjhjllabel; + } + /** + * 设置数量 + */ + public void setYljksjhjl(Integer yljksjhjl) { + this.yljksjhjl = yljksjhjl; + } + + /** + * 获取数量 + */ + public Integer getYljksjhjl() { + return this.yljksjhjl; + } + /** + * 设置单位 + */ + public void setYljksjhjlunit(String yljksjhjlunit) { + this.yljksjhjlunit = yljksjhjlunit; + } + + /** + * 获取单位 + */ + public String getYljksjhjlunit() { + return this.yljksjhjlunit; + } + /** + * 设置展示标题 + */ + public void setHbcpdysjllabel(String hbcpdysjllabel) { + this.hbcpdysjllabel = hbcpdysjllabel; + } + + /** + * 获取展示标题 + */ + public String getHbcpdysjllabel() { + return this.hbcpdysjllabel; + } + /** + * 设置开始值 + */ + public void setHbcpdysjlks(Integer hbcpdysjlks) { + this.hbcpdysjlks = hbcpdysjlks; + } + + /** + * 获取开始值 + */ + public Integer getHbcpdysjlks() { + return this.hbcpdysjlks; + } + /** + * 设置结束值 + */ + public void setHbcpdysjljs(Integer hbcpdysjljs) { + this.hbcpdysjljs = hbcpdysjljs; + } + + /** + * 获取结束值 + */ + public Integer getHbcpdysjljs() { + return this.hbcpdysjljs; + } + /** + * 设置单位 + */ + public void setHbcpdysjlunit(String hbcpdysjlunit) { + this.hbcpdysjlunit = hbcpdysjlunit; + } + + /** + * 获取单位 + */ + public String getHbcpdysjlunit() { + return this.hbcpdysjlunit; + } + /** + * 设置核保产品调用数据量 + */ + public void setHbcpdysjl(Integer hbcpdysjl) { + this.hbcpdysjl = hbcpdysjl; + } + + /** + * 获取核保产品调用数据量 + */ + public Integer getHbcpdysjl() { + return this.hbcpdysjl; + } + + +} \ No newline at end of file diff --git a/src/main/webapp/html/web/compantDesc/index.html b/src/main/webapp/html/web/compantDesc/index.html index b1615cd..eeec8c5 100644 --- a/src/main/webapp/html/web/compantDesc/index.html +++ b/src/main/webapp/html/web/compantDesc/index.html @@ -3,6 +3,7 @@ + 包头市数据运营平台 @@ -13,111 +14,156 @@
- - - +