| | |
| | | String message = tubLogService.importTubLog(projectId,file,updateSupport); |
| | | return AjaxResult.success(message); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计 |
| | | */ |
| | | @GetMapping("/countTubLogDate") |
| | | @ResponseBody |
| | | public AjaxResult countTubLogDate() { |
| | | return tubLogService.countTubLogDate(); |
| | | } |
| | | |
| | | } |
| | |
| | | @Excel(name = "时间", width = 30, dateFormat = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | /** 出入库数量统计 */ |
| | | private Double outboundNumber; |
| | | private Double inboundNumber; |
| | | |
| | | public void setId(Integer id) |
| | | { |
| | | this.id = id; |
| | |
| | | return createDate; |
| | | } |
| | | |
| | | public Double getOutboundNumber() { |
| | | return outboundNumber; |
| | | } |
| | | |
| | | public void setOutboundNumber(Double outboundNumber) { |
| | | this.outboundNumber = outboundNumber; |
| | | } |
| | | |
| | | public Double getInboundNumber() { |
| | | return inboundNumber; |
| | | } |
| | | |
| | | public void setInboundNumber(Double inboundNumber) { |
| | | this.inboundNumber = inboundNumber; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | |
| | | * @return |
| | | */ |
| | | Integer selectMaxTubLogId(@Param("projectId") String projectId); |
| | | |
| | | /** |
| | | * 统计 |
| | | */ |
| | | List<TubLog> countTubLogDate(); |
| | | } |
| | |
| | | package com.javaweb.geo.service; |
| | | |
| | | import com.javaweb.common.core.domain.AjaxResult; |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | * 导入管材出入库记录 |
| | | */ |
| | | String importTubLog(String projectId, MultipartFile file, boolean updateSupport); |
| | | |
| | | /** |
| | | * 统计 |
| | | */ |
| | | AjaxResult countTubLogDate(); |
| | | } |
| | |
| | | import cn.hutool.poi.excel.ExcelReader; |
| | | import cn.hutool.poi.excel.ExcelUtil; |
| | | import com.javaweb.common.config.Global; |
| | | import com.javaweb.common.core.domain.AjaxResult; |
| | | import com.javaweb.common.utils.DateUtils; |
| | | import com.javaweb.geo.domain.TubLog; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 统计 |
| | | */ |
| | | @Override |
| | | public AjaxResult countTubLogDate() { |
| | | List<TubLog> list = tubLogMapper.countTubLogDate(); |
| | | return AjaxResult.success("查询成功!",list); |
| | | } |
| | | |
| | | /** |
| | | * 导入管材出入库记录 |
| | | */ |
| | | @Override |
| | |
| | | <result property="unit" column="unit" /> |
| | | <result property="createDate" column="create_date" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="outboundNumber" column="outbound_number" /> |
| | | <result property="inboundNumber" column="inbound_number" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTubLogVo"> |
| | |
| | | SELECT MAX(id) FROM js_tub_log where project_id = #{projectId} |
| | | </select> |
| | | |
| | | <select id="countTubLogDate" resultMap="TubLogResult"> |
| | | SELECT |
| | | a.tub_name, |
| | | b.inbound_number, |
| | | a.outbound_number |
| | | FROM |
| | | ( SELECT tub_name, SUM( number ) AS outbound_number FROM js_tub_log WHERE outbound_date IS NOT NULL GROUP BY tub_name ) a |
| | | LEFT JOIN ( SELECT tub_name, SUM( number ) AS inbound_number FROM js_tub_log WHERE inbound_date IS NOT NULL GROUP BY tub_name ) b ON a.tub_name = b.tub_name |
| | | </select> |
| | | |
| | | <insert id="insertTubLog" parameterType="TubLog" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into js_tub_log |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <input name="tubName" class="form-control" type="text" placeholder="请填写材料名称" required> |
| | | </div> |
| | | </div> |
| | | <!-- <div class="form-group"> --> |
| | | <!-- <label class="col-sm-3 control-label">类型:</label>--> |
| | | <!-- <div class="col-sm-8">--> |
| | | <!-- <select name="type" class="form-control m-b">--> |
| | | <!-- <option value="">所有</option>--> |
| | | <!-- </select>--> |
| | | <!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">出库时间:</label> |
| | | <div class="col-sm-8"> |
| | | <div class="input-group date"> |
| | |
| | | var prefix = ctx + "geo/TubLog" |
| | | var projectId = [[${projectId}]]; |
| | | var code = [[${code}]]; |
| | | |
| | | |
| | | $("#form-TubLog-add").validate({ |
| | | focusCleanup: true |