| | |
| | | <div class="company"> |
| | | 员工:<span> {{ item.userName }} / {{item.companyName}}</span> |
| | | <div style="display: block" >时间:<span>{{item.createDate}}</span></div> |
| | | <div class="dealinfo" v-if="item.param2||item.remark||(item.multifileList !=null && item.multifileList.length)"> |
| | | <div class="dealinfo" v-if="item.param2 || item.remark || (item.multifileList !=null && item.multifileList.length)"> |
| | | <div style="display: block" v-if="item.param2" >处理人:<span>{{item.param2}}</span></div> |
| | | <div style="display: block" v-if="item.remark" >说明:<span>{{item.remark}}</span></div> |
| | | <div style="display: block;margin-top:10px" v-if="item.multifileList !=null && item.multifileList.length"> |
| | |
| | | // 未登录 |
| | | if (response.data.code === 401) { |
| | | if (response.config.autoLogin !== false) { |
| | | window.location.href = process.env.VUE_APP_ROUTER_MODE === 'history' ? (process.env.VUE_APP_CONTEXT_PATH + '/#/login') : (process.env.VUE_APP_CONTEXT_PATH + '/login') |
| | | window.location.href = process.env.VUE_APP_ROUTER_MODE === 'hash' ? (process.env.VUE_APP_CONTEXT_PATH + '/#/login') : (process.env.VUE_APP_CONTEXT_PATH + '/login') |
| | | } |
| | | return Promise.reject(response.data) |
| | | } |
| | |
| | | <div class="df mb50" > |
| | | <div class="wrap static1"> |
| | | <div class="header" style="text-align: center"> |
| | | <div class="home_title" style="text-align: center;width: 100%">各类型工单占比统计</div> |
| | | <div class="home_title" style="text-align: center;width: 80%">各类型工单占比统计({{searchForm.timeName}})</div> |
| | | <div style="text-align: right;width: 150px;font-size: 12px;height: 25px"> |
| | | <el-form :model="searchForm" label-width="100px" inline > |
| | | <el-select v-model="searchForm.timeType" :popper-append-to-body="true" clearable placeholder="时间范围" @change="reloadDataByType()"> |
| | | <el-option value="0" label="本周"/> |
| | | <el-option value="1" label="本月"/> |
| | | <el-option value="2" label="本季度"/> |
| | | <el-option value="3" label="本年"/> |
| | | </el-select> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | <div class="echart" style="height: 400px" > |
| | | <div id="circleChart0"></div> |
| | |
| | | }, |
| | | data () { |
| | | return { |
| | | searchForm: { |
| | | timeType: null, |
| | | timeName: '全部' |
| | | }, |
| | | colors, |
| | | nowDate: '', |
| | | nowWeek: '', |
| | | headerData: {}, |
| | | headerData1: {}, |
| | | staticData0: {}, |
| | | staticData01: {}, |
| | | staticData1: {}, |
| | |
| | | this.getWorkBody2() |
| | | this.getWorkBody3() |
| | | // this.getWorkBody() |
| | | }, |
| | | reloadDataByType () { |
| | | getIndexData({timeType: this.searchForm.timeType }).then(res => { |
| | | if (this.searchForm.timeType == '0') { |
| | | this.searchForm.timeName = '本周' |
| | | } else if (this.searchForm.timeType =='1') { |
| | | this.searchForm.timeName = '本月' |
| | | } else if (this.searchForm.timeType =='2') { |
| | | this.searchForm.timeName = '本季度' |
| | | } else if (this.searchForm.timeType == '3') { |
| | | this.searchForm.timeName = '本年' |
| | | } else { |
| | | this.searchForm.timeName = '全部' |
| | | } |
| | | this.headerData1 =res || [] |
| | | this.initAllData() |
| | | }) |
| | | }, |
| | | getWorkBody0 () { |
| | | getWorkOrderData({ queryType: 0, orderType: 0 }).then(res => { |
| | |
| | | getWorkHead () { |
| | | getIndexData({ }).then(res => { |
| | | this.headerData = res || {} |
| | | var cdata = [] |
| | | cdata.push({ name: '跌绊滑事件', value: res.dbhNum || 0 }) |
| | | cdata.push({ name: 'DCA事件', value: res.dcaChildNum || 0 }) |
| | | cdata.push({ name: 'SHE事件', value: res.sheNum || 0 }) |
| | | this.initEchartCircleDo('circleChart0', '各类型事件工单上报统计', '', cdata) |
| | | var xdata = ['SHE事件', '跌绊滑事件', 'DCA事件'] |
| | | var ydata = [] |
| | | ydata.push({ name: '已解决', stack: 'cateNum', type: 'bar', unit: '项', color: '#f07e6f', data: [res.sheNum || 0, res.dbhYesNum || 0, res.dcaChildYesNum || 0] }) |
| | | ydata.push({ name: '未解决', stack: 'cateNum', type: 'bar', unit: '项', color: '#8383ff', data: [0, res.dbhNoNum || 0, res.dcaChildNoNum || 0] }) |
| | | ydata.push({ name: '总单量', type: 'bar', unit: '次', color: '#29aeff', data: [res.sheNum || 0, res.dbhNum || 0, res.dcaChildNum || 0] }) |
| | | this.initEchartDataDo('各类型事件状态统计', 'circleChart1', xdata, ydata) |
| | | this.headerData1 = res || {} |
| | | this.initAllData() |
| | | }) |
| | | }, |
| | | initAllData(){ |
| | | var cdata = [] |
| | | cdata.push({ name: '跌绊滑事件', value: this.headerData1.dbhNum || 0 }) |
| | | cdata.push({ name: 'DCA事件', value: this.headerData1.dcaChildNum || 0 }) |
| | | cdata.push({ name: 'SHE事件', value: this.headerData1.sheNum || 0 }) |
| | | this.initEchartCircleDo('circleChart0', '各类型事件工单上报统计', '', cdata) |
| | | var xdata = ['SHE事件', '跌绊滑事件', 'DCA事件'] |
| | | var ydata = [] |
| | | ydata.push({ name: '已解决', stack: 'cateNum', type: 'bar', unit: '项', color: '#f07e6f', data: [this.headerData1.sheNum || 0, this.headerData1.dbhYesNum || 0, this.headerData1.dcaChildYesNum || 0] }) |
| | | ydata.push({ name: '未解决', stack: 'cateNum', type: 'bar', unit: '项', color: '#8383ff', data: [0, this.headerData1.dbhNoNum || 0, this.headerData1.dcaChildNoNum || 0] }) |
| | | ydata.push({ name: '总单量', type: 'bar', unit: '次', color: '#29aeff', data: [this.headerData1.sheNum || 0, this.headerData1.dbhNum || 0, this.headerData1.dcaChildNum || 0] }) |
| | | this.initEchartDataDo('各类型事件状态统计', 'circleChart1', xdata, ydata) |
| | | }, |
| | | updateDate () { |
| | | this.nowDate = dayjs().format('YYYY年M月D日') |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | |
| | | ::v-deep .el-input--small .el-input__inner { |
| | | height: 30px !important; // 这里就是修改默认高度 |
| | | width: 120px; |
| | | } |
| | | div { |
| | | box-sizing: border-box; |
| | | } |
| | |
| | | } |
| | | index = index + 1; |
| | | } |
| | | |
| | | } |
| | | // while (it.hasNext()) { |
| | | // MultipartFile file = multipartRequest.getFile(it.next()); |
| | | // String originname = file.getOriginalFilename(); |
| | | // is = file.getInputStream(); |
| | | // String endType = originname.substring(originname.lastIndexOf("."),originname.length()); |
| | | // String date = DateUtil.getNowShortDate(); |
| | | // String fName = date+"/"+ UUID.randomUUID()+endType; |
| | | // String fileName = folder+"/"+fName; |
| | | // boolean r = ftp.uploadInputstream(is,fileName); |
| | | // if(r){ |
| | | // JSONObject fileJSON = new JSONObject(); |
| | | // fileJSON.put("url", prefixPath+fileName); |
| | | // fileJSON.put("imgaddr", fName); |
| | | // fileJSON.put("imgname", fileName); |
| | | // fileJSON.put("originname", originname); |
| | | // jsonArray.add(fileJSON); |
| | | // } |
| | | // } |
| | | context.put("data",jsonArray); |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | cal.set(Calendar.DATE, 1); |
| | | return getDayStartTime(cal.getTime()); |
| | | } |
| | | public static Date getBeginDayOfSeason(int addYears) { |
| | | Integer nowMonth = getNowMonth(); |
| | | int month = Calendar.JANUARY; |
| | | Integer quarter = (nowMonth - 1) / 3 + 1;//季度 |
| | | if(quarter == 2){ |
| | | month = Calendar.APRIL; |
| | | }else if(quarter == 3){ |
| | | month = Calendar.JUNE; |
| | | }else if(quarter == 4){ |
| | | month = Calendar.OCTOBER; |
| | | } |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.set(Calendar.YEAR, getNowYearNum()+addYears); |
| | | cal.set(Calendar.MONTH, month); |
| | | cal.set(Calendar.DATE, 1); |
| | | return getDayStartTime(cal.getTime()); |
| | | } |
| | | |
| | | // 获取本年的结束时间 |
| | | public static Date getEndDayOfYear(int addYears){ |
| | |
| | | @ApiModelProperty("文件路径前缀") |
| | | @TableField(exist = false) |
| | | private String path; |
| | | @ApiModelProperty("时间选项 0本周 1本月 2本季度 3本年") |
| | | @TableField(exist = false) |
| | | private Integer timeType; |
| | | |
| | | @ApiModelProperty(value = "不符合问题列表") |
| | | @TableField(exist = false) |
| | |
| | | @Override |
| | | public WorkorderIndexNumVO getIndexData(Workorder workorder) { |
| | | WorkorderIndexNumVO model = new WorkorderIndexNumVO(); |
| | | Date startdate = getStartDateByType(workorder.getTimeType()); |
| | | //查询今年所有的数据 |
| | | List<Workorder> list = workorderMapper.selectJoinList(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("type,count(id) as num") |
| | | .eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .ge(startdate!=null,Workorder::getCreateDate,startdate) |
| | | // .lt(endDate!=null,Workorder::getCreateDate,endDate) |
| | | .groupBy(Workorder::getType )); |
| | | if(list !=null){ |
| | | for(Workorder w : list){ |
| | |
| | | } |
| | | } |
| | | } |
| | | List<Workorder> todays = workorderMapper.selectJoinList(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("type,count(id) as num") |
| | | .eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now())") |
| | | .groupBy(Workorder::getType )); |
| | | if(todays !=null){ |
| | | for(Workorder w : todays){ |
| | | if(Constants.equalsInteger(w.getType(),Constants.ZERO)){ |
| | | //SHE |
| | | model.setTodaySheNum(Constants.formatLongNum(w.getNum())); |
| | | }else if(Constants.equalsInteger(w.getType(),Constants.ONE)){ |
| | | //DCA提交数 |
| | | model.setTodayDcaNum(Constants.formatLongNum(w.getNum())); |
| | | }else if(Constants.equalsInteger(w.getType(),Constants.TWO)){ |
| | | //DCA子工单 |
| | | model.setTodayDcaChildNum(Constants.formatLongNum(w.getNum())); |
| | | }else if(Constants.equalsInteger(w.getType(),Constants.THREE)){ |
| | | //跌绊滑 |
| | | model.setTodayDbhNum(Constants.formatLongNum(w.getNum())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | List<Workorder> yeslist = workorderMapper.selectJoinList(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("type,count(id) as num") |
| | | .eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .in(Workorder::getStatus,Constants.THREE,Constants.FOUR,Constants.FIVE) |
| | | .in(Workorder::getType,Constants.THREE,Constants.TWO) |
| | | .ge(startdate!=null,Workorder::getCreateDate,startdate) |
| | | .groupBy(Workorder::getType )); |
| | | if(yeslist !=null){ |
| | | for(Workorder w : yeslist){ |
| | |
| | | } |
| | | } |
| | | } |
| | | Workorder dcaList = workorderMapper.selectJoinOne(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("sum(dca_yes_num) as dcaYesNum,sum(dca_no_num) as dcaNoNum") |
| | | .eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .eq(Workorder::getType,Constants.ONE) ); |
| | | if(dcaList !=null){ |
| | | //DCA符合项和不符合项统计 |
| | | model.setDcaYesNum((long)Constants.formatIntegerNum(dcaList.getDcaYesNum())); |
| | | model.setDcaNoNum((long)Constants.formatIntegerNum(dcaList.getDcaNoNum())); |
| | | if(workorder.getTimeType() == null){ |
| | | List<Workorder> todays = workorderMapper.selectJoinList(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("type,count(id) as num") |
| | | .eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .apply("to_days(create_date)=to_days(now())") |
| | | .groupBy(Workorder::getType )); |
| | | if(todays !=null){ |
| | | for(Workorder w : todays){ |
| | | if(Constants.equalsInteger(w.getType(),Constants.ZERO)){ |
| | | //SHE |
| | | model.setTodaySheNum(Constants.formatLongNum(w.getNum())); |
| | | }else if(Constants.equalsInteger(w.getType(),Constants.ONE)){ |
| | | //DCA提交数 |
| | | model.setTodayDcaNum(Constants.formatLongNum(w.getNum())); |
| | | }else if(Constants.equalsInteger(w.getType(),Constants.TWO)){ |
| | | //DCA子工单 |
| | | model.setTodayDcaChildNum(Constants.formatLongNum(w.getNum())); |
| | | }else if(Constants.equalsInteger(w.getType(),Constants.THREE)){ |
| | | //跌绊滑 |
| | | model.setTodayDbhNum(Constants.formatLongNum(w.getNum())); |
| | | } |
| | | } |
| | | } |
| | | Workorder dcaList = workorderMapper.selectJoinOne(Workorder.class,new MPJLambdaWrapper<Workorder>() |
| | | .select("sum(dca_yes_num) as dcaYesNum,sum(dca_no_num) as dcaNoNum") |
| | | .eq(Workorder::getIsdeleted,Constants.ZERO) |
| | | .eq(Workorder::getType,Constants.ONE) ); |
| | | if(dcaList !=null){ |
| | | //DCA符合项和不符合项统计 |
| | | model.setDcaYesNum((long)Constants.formatIntegerNum(dcaList.getDcaYesNum())); |
| | | model.setDcaNoNum((long)Constants.formatIntegerNum(dcaList.getDcaNoNum())); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | private Date getStartDateByType(Integer timeType) { |
| | | Date date = null; |
| | | if(timeType == null){ |
| | | return null; |
| | | } else if (timeType == 0) { |
| | | //本周 |
| | | date = DateUtil.getBeginDayOfWeek(0); |
| | | }else if (timeType == 1) { |
| | | //本月 |
| | | date = DateUtil.getBeginDayOfMonth(0); |
| | | }else if (timeType == 2) { |
| | | //本季度 |
| | | date = DateUtil.getBeginDayOfSeason(0); |
| | | }else if (timeType == 3) { |
| | | //本年 |
| | | date = DateUtil.getBeginDayOfYear(0); |
| | | } |
| | | |
| | | return date; |
| | | } |
| | | |
| | | } |
| | |
| | | time-zone: GMT+8 |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | mail: |
| | | host: smtp.exmail.qq.com |
| | | username: jp@doumee.com |
| | | password: 2Jz9HFW2U7vRnCRu |
| | | default-encoding: UTF-8 |
| | | host: smtp.163.com |
| | | port: 465 |
| | | username: your-email@163.com |
| | | password: your-authorization-code |
| | | protocol: smtps |
| | | properties: |
| | | mail: |
| | | smtp: |
| | | auth: true |
| | | starttls: |
| | | enable: true |
| | | required: true |
| | | starttls: |
| | | enable: true |
| | | ssl: |
| | | trust: smtp.163.com |
| | | socketFactory: |
| | | class: javax.net.ssl.SSLSocketFactory |
| | | port: 465 |
| | | |
| | | debug_model: true |
| | | |