|
@@ -13,14 +13,18 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
|
|
|
import com.minpay.common.format.IFormatService;
|
|
|
+import com.minpay.common.service.IReportService;
|
|
|
import com.minpay.common.util.CommonUtil;
|
|
|
import com.minpay.common.util.DateUtil;
|
|
|
import com.minpay.common.util.ExportExcelUtil;
|
|
|
import com.minpay.db.table.mapper.DwFileDetail00Mapper;
|
|
|
import com.minpay.db.table.mapper.DwReportInfMapper;
|
|
|
+import com.minpay.db.table.mapper.PubAppparMapper;
|
|
|
import com.minpay.db.table.model.DwFileDetail00;
|
|
|
import com.minpay.db.table.model.DwFileDetail00Example;
|
|
|
import com.minpay.db.table.model.DwReportInf;
|
|
|
+import com.minpay.db.table.model.PubApppar;
|
|
|
+import com.minpay.db.table.model.PubAppparExample;
|
|
|
import com.minpay.db.table.own.mapper.ReportServiceMapper;
|
|
|
import com.startup.minpay.frame.business.IMINAction;
|
|
|
import com.startup.minpay.frame.business.res.MINActionResult;
|
|
@@ -44,6 +48,12 @@ public class TQTDReportAction implements IMINAction {
|
|
|
/** 台区停电月报附件 */
|
|
|
public final static String REPORT_INF_FUJIAN = "reportInfFujian";
|
|
|
|
|
|
+ /** 台区数量管理 */
|
|
|
+ public final static String AREA_NUM_MANAGE = "areaNumManage";
|
|
|
+
|
|
|
+ /** 台区数量编辑 */
|
|
|
+ public final static String AREA_NUM_UPDATE = "areaNumUpdate";
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 台区停电穿透数据
|
|
@@ -287,4 +297,53 @@ public class TQTDReportAction implements IMINAction {
|
|
|
|
|
|
return response;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 台区数量管理
|
|
|
+ * @param session
|
|
|
+ * @return
|
|
|
+ * @throws MINBusinessException
|
|
|
+ */
|
|
|
+ @MINAction(value = AREA_NUM_MANAGE)
|
|
|
+ public MINActionResult areaNumManage(
|
|
|
+ MINSession session
|
|
|
+ ) throws MINBusinessException {
|
|
|
+ MINActionResult res = new MINActionResult();
|
|
|
+ db = Service.lookup(IMINDataBaseService.class);
|
|
|
+ PubAppparExample appparExample = new PubAppparExample();
|
|
|
+ appparExample.createCriteria().andCodeEqualTo("tqtd_num");
|
|
|
+ List<PubApppar> appparList = db.selectByExample(PubAppparMapper.class, appparExample);
|
|
|
+ List<Map<String, String>> resList = new ArrayList<Map<String, String>>();
|
|
|
+ Map<String, String> resMap = new HashMap<String, String>();
|
|
|
+ resList.add(resMap);
|
|
|
+ String hejiNum = "0";
|
|
|
+ for (PubApppar pub : appparList) {
|
|
|
+ resMap.put(pub.getValue(), pub.getShowmsg());
|
|
|
+ hejiNum = CommonUtil.add(hejiNum, pub.getShowmsg());
|
|
|
+ }
|
|
|
+ resMap.put("合计", hejiNum);
|
|
|
+ res.set(IMINBusinessConstant.F_PAGING_LAY, resList);
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ @MINAction(value = AREA_NUM_UPDATE)
|
|
|
+ public MINActionResult areaNumUpdate(
|
|
|
+ @MINParam(key = "field") String field,
|
|
|
+ @MINParam(key = "value") String value,
|
|
|
+ MINSession session
|
|
|
+ ) throws MINBusinessException {
|
|
|
+ MINActionResult res = new MINActionResult();
|
|
|
+ // 修改数据库数据
|
|
|
+ db = Service.lookup(IMINDataBaseService.class);
|
|
|
+ PubApppar apppar = new PubApppar();
|
|
|
+ apppar.setCode("tqtd_num");
|
|
|
+ apppar.setValue(field);
|
|
|
+ apppar.setShowmsg(value);
|
|
|
+ db.updateByPrimaryKeySelective(PubAppparMapper.class, apppar);
|
|
|
+
|
|
|
+ // 更新值
|
|
|
+ Service.lookup(IReportService.class).reflush();
|
|
|
+
|
|
|
+ return res;
|
|
|
+ }
|
|
|
}
|