瀏覽代碼

附件接口调整

Perperon 1 月之前
父節點
當前提交
f73f053c9f

+ 1 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/RptContMapper.java

@@ -48,7 +48,7 @@ public interface RptContMapper {
     @Insert("INSERT INTO sub_rpt_cont (id, kind, begin_date, end_date, content, reason, amt_last, amt_rt, year, week, num_bl, sub_id, sub_plan_id, amt, create_time, logic_delete_flag, create_user_id, kj_month) VALUES (#{r.id}, #{r.kind}, #{r.beginDate}, #{r.endDate}, #{r.content}, #{r.reason}, #{r.amtLast}, #{r.amtRt}, #{r.year}, #{r.week}, #{r.numBl}, #{r.subId}, #{r.subPlanId}, #{r.amt}, #{r.createTime}, #{r.logicDeleteFlag}, #{r.createUserId}, #{r.kjMonth})")
     void save(@Param("r") RptCont rptCont);
 
-    @Update("UPDATE sub_rpt_cont SET reason = #{r.reason}, content = #{r.content}, amt_last = #{r.amtLast}, num_bl = #{r.numBl}, amt = #{r.amt}, sub_plan_id = #{r.subPlanId}, last_update_time = #{r.lastUpdateTime}, last_update_userId = #{r.lastUpdateUserId} WHERE id = #{r.id}")
+    @Update("UPDATE sub_rpt_cont SET reason = #{r.reason}, week = #{r.week}, content = #{r.content}, amt_last = #{r.amtLast}, num_bl = #{r.numBl}, amt = #{r.amt}, sub_plan_id = #{r.subPlanId}, last_update_time = #{r.lastUpdateTime}, last_update_userId = #{r.lastUpdateUserId} WHERE id = #{r.id}")
     void update(@Param("r") RptCont rptCont);
 
     @Select("select " +

+ 1 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubRptContServiceImpl.java

@@ -485,6 +485,7 @@ public class SubRptContServiceImpl implements SubRptContService {
 			old.setAmtLast(vo.getAmtLast());
 			old.setNumBl(bl);
 			old.setAmt(vo.getAmt());
+			old.setWeek(week);
 			old.setSubPlanId(vo.getSubPlanId());
 			old.setLastUpdateTime(new Date());
 			old.setLastUpdateUserId(loginUserVO.getId());

+ 21 - 1
projects/src/main/java/com/rtrh/projects/web/controller/projects/api/ProWeekReportApiController.java

@@ -52,6 +52,8 @@ public class ProWeekReportApiController extends BaseController {
 	private RptContDao rptContDao;
 	@Autowired
 	private WeekAndMonthFileService weekAndMonthFileService;
+	@Autowired
+	private SubRptContService rptContService;
 
 	/*@PostMapping(value="/queryReport")
 	public ListMessage queryReport(@RequestBody Page page, @RequestBody RptContQueryVO queryVO) {
@@ -87,7 +89,7 @@ public class ProWeekReportApiController extends BaseController {
 	public Message saveReport(@RequestBody WeekContentVO vo) {
 		Message res = new Message();
 		try {
-			subRptContService.saveReport(vo, getCurUser().getLoginUser(), RptContKindEnum.WEEK);
+			subRptContService.saveFgwReport(vo, getCurUser().getLoginUser(), RptContKindEnum.WEEK);
 		} catch (Exception e) {
 			logger.error("",e);
 			res.addError(e.getMessage());
@@ -135,6 +137,24 @@ public class ProWeekReportApiController extends BaseController {
 		return res;
 	}
 
+	@PostMapping("getByInfoFgw")
+	public Message getByInfoFgw(@RequestBody ReportInfoGetVO getVO) {
+		Message res = new Message();
+
+		try {
+			String week = String.valueOf(DateUtil.weekOfYear(getVO.getStartDate()));
+			RptCont old = rptContService.getBySubIdAndMonthFgw(getVO.getSubId(), getVO.getYear(), week, RptContKindEnum.WEEK);
+			if (old!=null){
+				List<WeekAndMonthFile> list=weekAndMonthFileService.listByMainIdFgw(old.getId());
+				res.setData(list);
+			}
+		} catch (Exception e) {
+			logger.error("",e);
+			res.addError(e.getMessage());
+		}
+		return res;
+	}
+
 
 	/**
 	 * 获取周报信息

+ 6 - 6
projects/src/main/webapp/vmodules/project/weekReport.jsp

@@ -308,7 +308,7 @@
                 var endWeek = self.genTime(0);
                 self.endMonth = endWeek.split(" ~ ")[0];
 
-                App.common.utils.uploadFile('#addPic', App.getUrl('/static/file/upload'), {
+                App.common.utils.uploadFile('#addPic', App.getUrl('/static/file/uploadFgw'), {
                     acceptMime: 'image/png,video/mp4,image/jpg,image/jpeg,application/pdf,application/msword,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
                     , exts: 'png|jpg|jpeg|pdf|xls|xlsx|doc|docx|mp4'
                 }, null, function (res) {
@@ -393,10 +393,10 @@
                 var realUrl = "";
                 var mp4Url = "";
                 if (type == 8) {
-                    imageUrl = "${domain}/static/file/" + fileId + "/showfile";
+                    imageUrl = "${domain}/static/file/" + fileId + "/showfileFgw";
                 } else if (type == null || type == "") {
                 } else if (type == 101 || type == 102 || type == 103 || type == 104 || type == 105) {
-                    imageUrl = "${domain}/static/file/" + fileId + "/showfile";
+                    imageUrl = "${domain}/static/file/" + fileId + "/showfileFgw";
                 } else if (type == 4 || type == 5) {
                     imageUrl = "${WebSite.asset}/css/images/excel.png";
                     realUrl = "/static/file/download/" + fileId + "";
@@ -458,7 +458,7 @@
                     return "${WebSite.asset}/css/images/pdf.png";
                 } else if (type == null || type == "") {
                 } else if (type == 101 || type == 102 || type == 103 || type == 104 || type == 105) {
-                    return "${domain}/static/file/" + fileId + "/showfile";
+                    return "${domain}/static/file/" + fileId + "/showfileFgw";
                 } else if (type == 4 || type == 5) {
                     return "${WebSite.asset}/css/images/excel.png";
                 } else if (type == 2 || type == 3) {
@@ -469,7 +469,7 @@
 
             },
             picShow1(fileId) {
-                return "${domain}/static/file/" + fileId + "/showfile";
+                return "${domain}/static/file/" + fileId + "/showfileFgw";
             },
             setTimeData(value, ele) {
                 if (value != "" && value.length > 0) {
@@ -817,7 +817,7 @@
                 var subId = row.sub_id;
                 var year = row.year;
                 var beginDate = row.begin_date;
-                App.postJson("/api/weekReport/getByInfo", {
+                App.postJson("/api/weekReport/getByInfoFgw", {
                     subId: subId,
                     year: year,
                     startDate: beginDate