修改 展示看板

master
wangh 4 years ago
parent c61b302001
commit b2a334b510

@ -6,8 +6,8 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:oracle:thin:@124.70.0.226:1521:ORCL
username: C##USERNAME
url: jdbc:oracle:thin:@10.100.70.5:1521:aucma
username: haiwei
password: 123456
# 从库数据源
slave:
@ -17,11 +17,11 @@ spring:
username: imos
password: imos
# 初始连接数
initialSize: 5
initialSize: 3
# 最小连接池数量
minIdle: 10
minIdle: 3
# 最大连接池数量
maxActive: 20
maxActive: 6
# 配置获取连接等待超时的时间
maxWait: 60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增箱壳计划数量维护')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-base_plan-add">
<div class="form-group">
<label class="col-sm-3 control-label">计划数量:</label>
<div class="col-sm-8">
<input name="planNumber" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/base_plan"
$("#form-base_plan-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-base_plan-add').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('箱壳计划数量维护列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>计划数量:</label>
<input type="text" name="planNumber"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:base_plan:add">-->
<!-- <i class="fa fa-plus"></i> 添加-->
<!-- </a>-->
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:base_plan:edit">
<i class="fa fa-edit"></i> 修改
</a>
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:base_plan:remove">-->
<!-- <i class="fa fa-remove"></i> 删除-->
<!-- </a>-->
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:base_plan:export">-->
<!-- <i class="fa fa-download"></i> 导出-->
<!-- </a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:base_plan:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:base_plan:remove')}]];
var prefix = ctx + "system/base_plan";
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "箱壳计划数量维护",
columns: [{
checkbox: true
},
{
field: 'id',
title: '主键',
visible: false
},
{
field: 'planNumber',
title: '计划数量'
},
{
field: 'createTime',
title: '创建时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改箱壳计划数量维护')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-base_plan-edit" th:object="${baseBoxPlan}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">计划数量:</label>
<div class="col-sm-8">
<input name="planNumber" th:field="*{planNumber}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "system/base_plan";
$("#form-base_plan-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-base_plan-edit').serialize());
}
}
</script>
</body>
</html>

@ -0,0 +1,127 @@
package com.ruoyi.system.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.BaseBoxPlan;
import com.ruoyi.system.service.IBaseBoxPlanService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* Controller
*
* @author ruoyi
* @date 2022-07-15
*/
@Controller
@RequestMapping("/system/base_plan")
public class BaseBoxPlanController extends BaseController
{
private String prefix = "system/base_plan";
@Autowired
private IBaseBoxPlanService baseBoxPlanService;
@RequiresPermissions("system:base_plan:view")
@GetMapping()
public String base_plan()
{
return prefix + "/base_plan";
}
/**
*
*/
@RequiresPermissions("system:base_plan:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BaseBoxPlan baseBoxPlan)
{
startPage();
List<BaseBoxPlan> list = baseBoxPlanService.selectBaseBoxPlanList(baseBoxPlan);
return getDataTable(list);
}
/**
*
*/
@RequiresPermissions("system:base_plan:export")
@Log(title = "箱壳计划数量维护", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BaseBoxPlan baseBoxPlan)
{
List<BaseBoxPlan> list = baseBoxPlanService.selectBaseBoxPlanList(baseBoxPlan);
ExcelUtil<BaseBoxPlan> util = new ExcelUtil<BaseBoxPlan>(BaseBoxPlan.class);
return util.exportExcel(list, "箱壳计划数量维护数据");
}
/**
*
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
*
*/
@RequiresPermissions("system:base_plan:add")
@Log(title = "箱壳计划数量维护", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BaseBoxPlan baseBoxPlan)
{
return toAjax(baseBoxPlanService.insertBaseBoxPlan(baseBoxPlan));
}
/**
*
*/
@RequiresPermissions("system:base_plan:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
BaseBoxPlan baseBoxPlan = baseBoxPlanService.selectBaseBoxPlanById(id);
mmap.put("baseBoxPlan", baseBoxPlan);
return prefix + "/edit";
}
/**
*
*/
@RequiresPermissions("system:base_plan:edit")
@Log(title = "箱壳计划数量维护", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BaseBoxPlan baseBoxPlan)
{
return toAjax(baseBoxPlanService.updateBaseBoxPlan(baseBoxPlan));
}
/**
*
*/
@RequiresPermissions("system:base_plan:remove")
@Log(title = "箱壳计划数量维护", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(baseBoxPlanService.deleteBaseBoxPlanByIds(ids));
}
}

@ -0,0 +1,52 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* base_box_plan
*
* @author ruoyi
* @date 2022-07-15
*/
public class BaseBoxPlan extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 计划数量 */
@Excel(name = "计划数量")
private String planNumber;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPlanNumber(String planNumber)
{
this.planNumber = planNumber;
}
public String getPlanNumber()
{
return planNumber;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("planNumber", getPlanNumber())
.append("createTime", getCreateTime())
.toString();
}
}

@ -5,8 +5,8 @@ package com.ruoyi.system.domain;
* @date 2022/7/14 16:06
*/
public class FPStationHourInfo {
private String name, station_no, plan_number, qty, rate, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12;
private String name, station_no, plan_number, qty, rate, h1, h2, h3, h4, h5, h6, h7, h8, h9, h10, h11, h12,status;
private int target;
public String getName() {
return name;
}
@ -19,6 +19,22 @@ public class FPStationHourInfo {
return station_no;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public int getTarget() {
return target;
}
public void setTarget(int target) {
this.target = target;
}
public void setStation_no(String station_no) {
this.station_no = station_no;
}

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.BaseBoxPlan;
/**
* Mapper
*
* @author ruoyi
* @date 2022-07-15
*/
public interface BaseBoxPlanMapper
{
/**
*
*
* @param id
* @return
*/
public BaseBoxPlan selectBaseBoxPlanById(Long id);
/**
*
*
* @param baseBoxPlan
* @return
*/
public List<BaseBoxPlan> selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan);
/**
*
*
* @param baseBoxPlan
* @return
*/
public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan);
/**
*
*
* @param baseBoxPlan
* @return
*/
public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan);
/**
*
*
* @param id
* @return
*/
public int deleteBaseBoxPlanById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseBoxPlanByIds(String[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.BaseBoxPlan;
/**
* Service
*
* @author ruoyi
* @date 2022-07-15
*/
public interface IBaseBoxPlanService
{
/**
*
*
* @param id
* @return
*/
public BaseBoxPlan selectBaseBoxPlanById(Long id);
/**
*
*
* @param baseBoxPlan
* @return
*/
public List<BaseBoxPlan> selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan);
/**
*
*
* @param baseBoxPlan
* @return
*/
public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan);
/**
*
*
* @param baseBoxPlan
* @return
*/
public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan);
/**
*
*
* @param ids
* @return
*/
public int deleteBaseBoxPlanByIds(String ids);
/**
*
*
* @param id
* @return
*/
public int deleteBaseBoxPlanById(Long id);
}

@ -0,0 +1,96 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseBoxPlanMapper;
import com.ruoyi.system.domain.BaseBoxPlan;
import com.ruoyi.system.service.IBaseBoxPlanService;
import com.ruoyi.common.core.text.Convert;
/**
* Service
*
* @author ruoyi
* @date 2022-07-15
*/
@Service
public class BaseBoxPlanServiceImpl implements IBaseBoxPlanService
{
@Autowired
private BaseBoxPlanMapper baseBoxPlanMapper;
/**
*
*
* @param id
* @return
*/
@Override
public BaseBoxPlan selectBaseBoxPlanById(Long id)
{
return baseBoxPlanMapper.selectBaseBoxPlanById(id);
}
/**
*
*
* @param baseBoxPlan
* @return
*/
@Override
public List<BaseBoxPlan> selectBaseBoxPlanList(BaseBoxPlan baseBoxPlan)
{
return baseBoxPlanMapper.selectBaseBoxPlanList(baseBoxPlan);
}
/**
*
*
* @param baseBoxPlan
* @return
*/
@Override
public int insertBaseBoxPlan(BaseBoxPlan baseBoxPlan)
{
baseBoxPlan.setCreateTime(DateUtils.getNowDate());
return baseBoxPlanMapper.insertBaseBoxPlan(baseBoxPlan);
}
/**
*
*
* @param baseBoxPlan
* @return
*/
@Override
public int updateBaseBoxPlan(BaseBoxPlan baseBoxPlan)
{
return baseBoxPlanMapper.updateBaseBoxPlan(baseBoxPlan);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteBaseBoxPlanByIds(String ids)
{
return baseBoxPlanMapper.deleteBaseBoxPlanByIds(Convert.toStrArray(ids));
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteBaseBoxPlanById(Long id)
{
return baseBoxPlanMapper.deleteBaseBoxPlanById(id);
}
}

@ -0,0 +1,65 @@
<?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.ruoyi.system.mapper.BaseBoxPlanMapper">
<resultMap type="BaseBoxPlan" id="BaseBoxPlanResult">
<result property="id" column="id" />
<result property="planNumber" column="plan_number" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectBaseBoxPlanVo">
select id, plan_number, create_time from base_box_plan
</sql>
<select id="selectBaseBoxPlanList" parameterType="BaseBoxPlan" resultMap="BaseBoxPlanResult">
<include refid="selectBaseBoxPlanVo"/>
<where>
<if test="planNumber != null and planNumber != ''"> and plan_number = #{planNumber}</if>
</where>
</select>
<select id="selectBaseBoxPlanById" parameterType="Long" resultMap="BaseBoxPlanResult">
<include refid="selectBaseBoxPlanVo"/>
where id = #{id}
</select>
<insert id="insertBaseBoxPlan" parameterType="BaseBoxPlan">
<selectKey keyProperty="id" resultType="long" order="BEFORE">
SELECT seq_base_box_plan.NEXTVAL as id FROM DUAL
</selectKey>
insert into base_box_plan
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="planNumber != null">plan_number,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="planNumber != null">#{planNumber},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateBaseBoxPlan" parameterType="BaseBoxPlan">
update base_box_plan
<trim prefix="SET" suffixOverrides=",">
<if test="planNumber != null">plan_number = #{planNumber},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBaseBoxPlanById" parameterType="Long">
delete from base_box_plan where id = #{id}
</delete>
<delete id="deleteBaseBoxPlanByIds" parameterType="String">
delete from base_box_plan where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -76,20 +76,7 @@
<select id="getUHullPlanInfo" resultType="com.ruoyi.system.domain.OrderInfo">
select PLAN_NO as plan_code,
substr(MATERIAL_NAME,
case
when instr(MATERIAL_NAME, '/', 1, 1) = 0 then instr(MATERIAL_NAME, ',', 1, 1) + 1
else instr(MATERIAL_NAME, '/', 1, 1) + 1
end,
case
when instr(MATERIAL_NAME, ',', 1, 2) = 0 then Length(MATERIAL_NAME) + 1
else instr(MATERIAL_NAME, ',', 1, 2)
end
-
case
when instr(MATERIAL_NAME, '/', 1, 1) = 0 then instr(MATERIAL_NAME, ',', 1, 1) + 1
else instr(MATERIAL_NAME, '/', 1, 1) + 1
end) as name,
substr(MATERIAL_NAME,6,Length(MATERIAL_NAME)) as name,
PLAN_QTY as plan_number,
ACTUAL_QTY as actual_number,
round(ACTUAL_QTY / PLAN_QTY * 100,2) as rate,
@ -237,7 +224,11 @@
when instr(MATERIAL_NAME, '/', 1, 1) = 0 then instr(MATERIAL_NAME, ',', 1, 1) + 1
else instr(MATERIAL_NAME, '/', 1, 1) + 1
end) as name,
STATION_NO ,
STATION_NO,
0 as target,
case
when PRODUCT_STATUS = 0 then '未生产'
else '生产中' end as status,
CURRENTPLAN_QTY as plan_number,
PRODUCT_QTY as qty,
round(PRODUCT_QTY / CURRENTPLAN_QTY * 100, 2) as rate,

Loading…
Cancel
Save