Browse Source

修改bug

v6
Chendy 1 year ago
parent
commit
774788bdd6
  1. 129
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html
  2. 2
      lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/nonRegistration/nonRegistrationView.html
  3. 37
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java
  4. 12
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

129
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/code/statistical/staticProgram.html

@ -38,12 +38,12 @@
<input type="text" name="bureauDeptName"/>
</li>
<li>
<p>时段:</p>
<p>发布时段:</p>
<select id="year" name="year">
<!--<option value="2024">2024</option>-->
<option th:each="y:${yearList}" th:text="${y}" th:value="${y}"></option>
</select>
<select id="dateSearch" name="dateSearch" onchange="timeType()">
<select id="dateSearch" name="dateSearch" onchange="timeChange()">
<option value="year">年度</option>
<option value="quarter">季度</option>
<option value="month">月度</option>
@ -152,23 +152,13 @@
var echarts2 = echarts.init(document.getElementById('echars3'));
var echarts3 = echarts.init(document.getElementById('echars4'));
window.onload = function () {
// selectDate();
staticAllProgram();
/*staticProgramWithAll();*/
/*staticProgramWithYear();
staticProgramWithQuarter();
staticProgramWithMonth();*/
//初始化默认隐藏
/*$("#yearDom").hide();
$("#quarterDom").hide();
$("#monthDom").hide();*/
$("#quarter").hide();
$("#month").hide();
$("#day").hide();
// $("#select-time").hide();
$("#chart-box-1").hide();
$("#chart-box-2").hide();
$("#chart-box-3").hide();
staticAllProgram();
echartsTotal();
$(".fixed-table-toolbar").hide();
$("#detail").hide();
@ -359,39 +349,6 @@
});
}
/**
*
*/
/*function changeSelect(){
var options = $("#timeType option:selected");
if("year" == options.val()){
$("#yearDom").show();
$("#quarterDom").hide();
$("#monthDom").hide();
document.getElementById("quarter").selectedIndex = -1;
$("input[name='month']").val("")
}else if("quarter" == options.val()){
$("#yearDom").hide();
$("#quarterDom").show();
$("#monthDom").hide();
$("input[name='year']").val("");
document.getElementById("quarter").selectedIndex = -1;
$("input[name='month']").val("")
}else if("month" == options.val()){
$("#yearDom").hide();
$("#quarterDom").hide();
$("#monthDom").show();
$("input[name='year']").val("");
document.getElementById("quarter").selectedIndex = -1;
$("input[name='month']").val("")
}
if("year" != options.val()){
$("input[name='year']").val("");
var date = new Date();
$("#yearDate").text(date.getFullYear());
}
}*/
$(function() {
var options = {
@ -485,7 +442,7 @@
},
{
field : 'enforcementTime',
title : '上传时间',
title : '发布时间',
align : 'center'
},
{
@ -585,79 +542,35 @@
function query() {
var params = $("#formId").bootstrapTable('getOptions');
console.log(params);
$("#bootstrap-table").bootstrapTable('refresh', params);
/*this.changeEcharts();*/
staticAllProgram();
$("#detail").hide();
}
function queryP2() {
echartsTotal();
}
function timeType() {
var dateSearch = document.getElementById("dateSearch");
console.log(dateSearch.value);
/* if(dateSearch.value=="quarter"){
$("#quarter").show();
$("#month").hide();
document.getElementById("month").value="";
}else if(dateSearch.value=="month"){
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").show();
}else {
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").hide();
document.getElementById("month").value="";
}*/
if(dateSearch.value=="quarter"){
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=document.getElementById("year").options[0].value;
}
$("#day").hide();
document.getElementById("beginTime").value="";
document.getElementById("endTime").value="";
$("#quarter").show();
$("#month").hide();
document.getElementById("month").value="";
}else if(dateSearch.value=="month"){
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=document.getElementById("year").options[0].value;
}
$("#day").hide();
document.getElementById("beginTime").value="";
document.getElementById("endTime").value="";
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").show();
}else if(dateSearch.value=="day"){
$("#day").show();
function timeChange() {
$("#quarter option:first").prop("selected",true);
$("#month option:first").prop("selected",true);
$("#quarter").hide();
$("#month").hide();
$("#day").hide();
var type = $("#dateSearch option:selected").val();
if(type==="year")$("#year").show();
if(type==="quarter") $("#quarter").show();
if(type==="month") $("#month").show();
if(type==="day"){
$("#year").hide();
document.getElementById("year").value="";
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").hide();
document.getElementById("month").value="";
}else {
$("#year").show();
if(document.getElementById("year").value==''){
document.getElementById("year").value=document.getElementById("year").options[0].value;
}
$("#day").hide();
document.getElementById("beginTime").value="";
document.getElementById("endTime").value="";
$("#quarter").hide();
document.getElementById("quarter").value="";
$("#month").hide();
document.getElementById("month").value="";
$("#day").show();
}
}
function resetP(){
$("#year").show();
$("#quarter").hide();
$("#month").hide();
$("#day").hide();
$('form').eq(0).trigger("reset");
query();
timeType();
}
function resetP2(){
$('form').eq(1).trigger("reset");

2
lib/EmergencyService/zdxtEmergencyBootStart/src/main/resources/templates/project/nonRegistration/nonRegistrationView.html

@ -201,6 +201,8 @@
// 时间选择
function timeChange() {
$("#quarter option:first").prop("selected",true);
$("#month option:first").prop("selected",true);
$("#quarter").hide();
$("#month").hide();
$("#selectTime").hide();

37
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/java/com/zdxt/code/service/impl/EnforcementInspectionProgramServiceImpl.java

@ -17,6 +17,7 @@ import com.zdxt.auth.project.system.notice.mapper.NoticeMapper;
import com.zdxt.code.domain.dto.EnforcementInspectionProgramDto;
import com.zdxt.common.annotation.DataScope;
import com.zdxt.common.util.DateUtils;
import com.zdxt.common.util.StringUtils;
import com.zdxt.common.zdxtFile.ZdxtFileCommon;
import org.apache.commons.collections.CollectionUtils;
import org.apache.pdfbox.Loader;
@ -280,7 +281,41 @@ public class EnforcementInspectionProgramServiceImpl implements IEnforcementInsp
@DataScope(deptField = "enforcement_department_id")
public List<EnforcementInspectionProgram> getPlanInfo(EnforcementInspectionProgramDto dto) {
getPublish(dto);
return enforcementInspectionProgramMapper.getPlanInfo(dto);
List<EnforcementInspectionProgram> list= enforcementInspectionProgramMapper.getPlanInfo(dto);
if(CollectionUtils.isNotEmpty(list)){
list.forEach(li->{
StringBuilder title=new StringBuilder();
if(StringUtils.isNotEmpty(li.getBureauDeptName()))title.append(li.getBureauDeptName());
title.append(li.getPlanYear());
title.append("年");
if(li.getTimeType().equals("year")){
title.append(li.getPlanName());
}else if(li.getTimeType().equals("quarter")){
title.append(getQurText(li.getQuarter()));
}else if(li.getTimeType().equals("month")){
title.append(li.getMouth().length()==1?"0"+li.getMouth():li.getMouth());
title.append("月");
}
title.append(li.getPlanName());
li.setPlanName(title.toString());
});
}
return list;
}
// 季度text
private String getQurText(String qua){
switch (qua){
case "1":
return "第一季度";
case "2":
return "第二季度";
case "3":
return "第三季度";
case "4":
return "第四季度";
}
return "";
}
/**

12
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementInspectionProgramMapper.xml

@ -452,7 +452,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getPlanInfo" parameterType="EnforcementInspectionProgramDto" resultType="EnforcementInspectionProgram">
SELECT
id,plan_name,bureau_dept_name,enforcement_area,enforcement_time
id,plan_name,bureau_dept_name,enforcement_area,enforcement_time,time_type,mouth,plan_year,quarter
FROM
enforcement_inspection_program
<where>
@ -460,19 +460,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and bureau_dept_name like concat('%', #{bureauDeptName}, '%')
</if>
<if test="beginTime != null and beginTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') >= #{beginTime}
and DATE_FORMAT(enforcement_time,'%Y-%m-%d') >= #{beginTime}
</if>
<if test="endTime != null and endTime != ''">
and #{endTime} >= DATE_FORMAT(create_time,'%Y-%m-%d')
and #{endTime} >= DATE_FORMAT(enforcement_time,'%Y-%m-%d')
</if>
<if test="year != null and year != ''">
and YEAR(create_time) = #{year}
and YEAR(enforcement_time) = #{year}
</if>
<if test="quarter != null and quarter != '' ">
and QUARTER(create_time) = #{quarter}
and QUARTER(enforcement_time) = #{quarter}
</if>
<if test="month != null and month != '' ">
and DATE_FORMAT(create_time, '%m') = #{month}
and DATE_FORMAT(enforcement_time, '%m') = #{month}
</if>
<if test="params.dataScope != null and params.dataScope != ''">
${params.dataScope}

Loading…
Cancel
Save