user5 4 роки тому
батько
коміт
50d109648c

+ 1 - 0
src/main/java/com/jeeplus/modules/oa/service/OaNotifyService.java

@@ -299,6 +299,7 @@ public class OaNotifyService extends CrudService<OaNotifyDao, OaNotify> {
         if (StringUtils.isBlank(oaNotify.getNumber())){
             oaNotify.setNumber(serialNumTplService.genSerialNum(UserUtils.getSelectCompany(), "17"));
         }
+        oaNotify.setCloseStatus(0);
         super.save(oaNotify);
         //保存附件
         this.saveAttachments(oaNotify);

+ 2 - 2
src/main/java/com/jeeplus/modules/workinvoice/web/WorkInvoiceController.java

@@ -527,11 +527,11 @@ public class WorkInvoiceController extends BaseController {
 			workInvoiceService.save(t);//保存
 		}else{//新增表单保存
 			WorkClientInfo workClientInfo =workClientInfoService.get(workInvoice.getClient().getId());
-			ProjectRecords workProject =projectRecordsService.get(workInvoice.getProject().getId());
+			ProjectRecords workProject =projectRecordsService.getRuralProjectRecodes(workInvoice.getProject().getId());
 			workInvoice.setClient(workClientInfo);
 			workInvoice.setProject(workProject);
 			workInvoice.setCompanyId(UserUtils.getSelectCompany().getId());
-			workInvoice.setOfficeId(UserUtils.getSelectOffice().getId());
+			workInvoice.setOffice(UserUtils.getSelectOffice());
 			workInvoice.setInvoiceState("1");
 			workInvoiceService.save(workInvoice);//保存
 		}

+ 8 - 3
src/main/java/com/jeeplus/modules/workreimbursement/service/WorkReimbursementService.java

@@ -66,6 +66,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * 财务报销Service
@@ -224,9 +226,12 @@ public class WorkReimbursementService extends CrudService<WorkReimbursementDao,
 
     public Page<WorkReimbursement> findPage(Page<WorkReimbursement> page, WorkReimbursement workReimbursement) {
         workReimbursement.getSqlMap().put("dsf", dataScopeFilter(workReimbursement.getCurrentUser(), "o", "u","s", MenuStatusEnum.WORK_REIMBURSEMENT.getValue()));
-        if(StringUtils.isNotBlank(workReimbursement.getSqlMap().get("dsf"))){
-            String newDsf = workReimbursement.getSqlMap().get("dsf").replace("and","");
-            workReimbursement.getSqlMap().put("dsf",newDsf);
+
+        //获取权限数据并删除第一个and字符
+        String str = workReimbursement.getSqlMap().get("dsf");
+        Matcher matcher = Pattern.compile("and").matcher(str);
+        if (matcher.find()) {
+            workReimbursement.getSqlMap().put("dsf",str.substring(0,matcher.start()) + str.substring(matcher.start()+3));
         }
         workReimbursement.setCreateBy(UserUtils.getUser());
         int count = dao.queryCount(workReimbursement);

+ 2 - 2
src/main/resources/mappings/modules/oa/OaNotifyDao.xml

@@ -134,7 +134,7 @@
 		<if test="isSelf">
 			JOIN oa_notify_record r ON r.oa_notify_id = a.id AND r.user_id = #{currentUser.id,jdbcType=VARCHAR}
 		</if>
-
+		left join work_oa_notify_view wo on a.id =wo.affiche_id and wo.user_id = #{currentUser.id,jdbcType=VARCHAR}
 		WHERE a.del_flag = #{DEL_FLAG_NORMAL} and close_status = 0
 		<!-- 未读0,已读1 -->
 		<if test="readFlag != null and readFlag != ''">
@@ -192,7 +192,7 @@
 			AND a.start_date &lt;= #{nowDate} AND a.end_date &gt;= #{nowDate}
 		</if>
 		and a.end_date &gt;= now()
-		ORDER BY a.update_date DESC
+		ORDER BY wo.id asc,a.update_date DESC
 	</select>
 
 	<select id="findReadList" resultType="OaNotify">

+ 3 - 0
src/main/webapp/webpage/modules/oa/oaNotifyForm.jsp

@@ -13,6 +13,9 @@
         function doSubmit(i){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             //var remarks = CKEDITOR.instances.content.getData();
             var content = CKEDITOR.instances.contents.document.getBody().getText();
+            while (content.indexOf("img{max-width:100%!important;") != -1){
+                content = content.replace("img{max-width:100%!important;}","");
+            }
             $("#content").val(content);
             console.log(content+","+(content == null)+(content == undefined)+(content == ""));
             if(content == null || content == undefined || content == "" || content == "\n"){

+ 3 - 0
src/main/webapp/webpage/modules/oa/oaNotifyModifyApply.jsp

@@ -12,6 +12,9 @@
         var validateForm;
         function doSubmit(){//回调函数,在编辑和保存动作时,供openDialog调用提交表单。
             var content = CKEDITOR.instances.contents.document.getBody().getText();
+            while (content.indexOf("img{max-width:100%!important;") != -1){
+                content = content.replace("img{max-width:100%!important;}","");
+            }
             $("#content").val(content);
             if(content == null || content == undefined || content == "" || content == "\n"){
                 parent.layer.msg('公告内容不能为空',{icon:5});

+ 1 - 1
src/main/webapp/webpage/modules/sys/gridinvoiceproject.jsp

@@ -114,7 +114,7 @@
 						</c:when>
 						<c:otherwise>
 							<tr>
-								<td colspan="5" align="center">
+								<td colspan="6" align="center">
 								暂无数据
 								</td>
 							</tr>