ysh преди 3 години
родител
ревизия
7dda61d991

+ 4 - 4
src/main/java/net/chenlin/dp/common/openapi4j/examples/voucher/VoucherAdd.java

@@ -340,7 +340,7 @@ public class VoucherAdd {
                             //当报销科目为火车,飞机时,税率自动计算(税额=未税金额*9%)
                             BigDecimal lv = new BigDecimal("0.09");
                             BigDecimal lv2 = new BigDecimal("1.09");
-                            BigDecimal multiply = jinE.multiply(sl).divide(lv2).multiply(lv);
+                            BigDecimal multiply = jinE.multiply(sl).divide(lv2,2,BigDecimal.ROUND_HALF_UP).multiply(lv);
                             multiply = multiply.setScale(2,BigDecimal.ROUND_HALF_UP);
                             entryDebitMap.put("natural_debit_currency", multiply);//(税额*数量) 本币贷方发生额*与本币借方发生额不能同时为空
 
@@ -368,7 +368,7 @@ public class VoucherAdd {
                     BigDecimal natural_debit_currency = new BigDecimal("0");// jinE.multiply(sl);
                     if("飞机、火车".contains(bxKm)){
                         BigDecimal lv = new BigDecimal("1.09");
-                        natural_debit_currency = jinE.multiply(sl).divide(lv);
+                        natural_debit_currency = jinE.multiply(sl).divide(lv,2,BigDecimal.ROUND_HALF_UP);
                     }else{
                         natural_debit_currency = jinE.multiply(sl);
                     }
@@ -445,7 +445,7 @@ public class VoucherAdd {
                             //当报销科目为火车,飞机时,税率自动计算(税额=未税金额*9%)
                             BigDecimal lv = new BigDecimal("0.03");
                             BigDecimal lv2 = new BigDecimal("1.03");
-                            BigDecimal multiply = jinE.multiply(sl).divide(lv2).multiply(lv);
+                            BigDecimal multiply = jinE.multiply(sl).divide(lv2,2,BigDecimal.ROUND_HALF_UP).multiply(lv);
                             multiply = multiply.setScale(2,BigDecimal.ROUND_HALF_UP);
                             entryDebitMap.put("natural_debit_currency", multiply);//(税额*数量) 本币贷方发生额*与本币借方发生额不能同时为空
 
@@ -473,7 +473,7 @@ public class VoucherAdd {
                     BigDecimal natural_debit_currency = new BigDecimal("0");// jinE.multiply(sl);
                     if("高速通行费".contains(bxKm)){
                         BigDecimal lv = new BigDecimal("1.03");
-                        natural_debit_currency = jinE.multiply(sl).divide(lv);
+                        natural_debit_currency = jinE.multiply(sl).divide(lv,2,BigDecimal.ROUND_HALF_UP);
                     }else{
                         natural_debit_currency = jinE.multiply(sl);
                     }

+ 3 - 3
src/main/java/net/chenlin/dp/common/xss/XssFilter.java

@@ -24,9 +24,9 @@ public class XssFilter implements Filter {
 
 	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
             throws IOException, ServletException {
-		if (!ProductAuthUtil.verify()) {
-			throw new IOException("程序异常,请联系供应商");
-		}
+//		if (!ProductAuthUtil.verify()) {
+//			throw new IOException("程序异常,请联系供应商");
+//		}
 		HttpServletRequest httpServletRequest = (HttpServletRequest) request;
 		String servletPath = httpServletRequest.getServletPath();
 		httpServletRequest.getParameterMap();

+ 5 - 5
src/main/java/net/chenlin/dp/modules/TaskDemo.java

@@ -30,12 +30,12 @@ public class TaskDemo {
      * 定时任务 银行回单 同步至 u8凭证(江苏)
      */
     public static void  autoReimbursementNew(String upTime) throws Exception {
-
+        System.out.println("=================================="+upTime);
         if(StringUtils.isNullOrEmpty(upTime) || upTime.equals("无")){
            throw new RRException("参数不能为空");
         }
         upTime = upTime.trim();
-        if(DateUtils.isValidDate(upTime)){
+        if(!DateUtils.isValidDate(upTime)){
             throw new RRException("日期格式不正确");
         }
 
@@ -282,10 +282,10 @@ public class TaskDemo {
     }
 
 
-    public static void main(String[] args) throws OpenAPIException, ParseException {
-
+    public static void main(String[] args) throws Exception {
+        autoReimbursementNew("2022-01-21");
         String aa = "2021-11-12";
-
+//        2022-01-21
         String[] aaa = aa.split("-");
         System.out.println(aaa[0]);
         System.out.println(aaa[1]);

+ 3 - 2
src/main/java/net/chenlin/dp/modules/api/service/PettyCashService.java

@@ -129,7 +129,7 @@ public class PettyCashService {
         String userid = prop.getProperty("userid");
         String agentid = prop.getProperty("agentid");
         String deptid = prop.getProperty("deptid");
-        List<String> list = dingdingOpenInterface.getOrderIdList2(PROC,-20);
+        List<String> list = dingdingOpenInterface.getOrderIdList2(PROC,-22);
         System.out.println("备用金:"+list);
         List<SyViewEntity> listIdError = u8Service.selectViewByError("备用金至银行凭证");
         List<SyViewEntity> listIdTrue = u8Service.selectViewByTrue("备用金至银行凭证");
@@ -171,7 +171,8 @@ public class PettyCashService {
                         continue;
                     }
 
-                    if (!work_place.equals("昆山") && !work_place.equals("潍坊")){
+//                    if (!work_place.equals("昆山") && !work_place.equals("潍坊")){
+                    if (!work_place.equals("昆山")){
                         continue;
                     }
                 }else{

+ 21 - 5
src/main/java/net/chenlin/dp/modules/api/service/ReimbursementService.java

@@ -246,6 +246,7 @@ public class ReimbursementService {
                     }else if(work_place.equals("潍坊")){
                         dept_code = getPerson(job_number,"3");
                         type = "3";
+                        continue;
                     }else{
                         continue;
                     }
@@ -309,7 +310,12 @@ public class ReimbursementService {
                 }else{
                     continue ;
                 }
-                entity.setSyMessage(mess);
+                if(mess.length() > 1000){
+                    entity.setSyMessage(mess.substring(0,1000));
+                }else{
+                    entity.setSyMessage(mess);
+                }
+
                 u8Service.saveSyView(entity);
 
 
@@ -338,7 +344,7 @@ public class ReimbursementService {
         String agentid = prop.getProperty("agentid");
         String deptid = prop.getProperty("deptid");
         String userid = prop.getProperty("userid");
-        List<String> list = dingdingOpenInterface.getOrderIdList2(PROC,-20);
+        List<String> list = dingdingOpenInterface.getOrderIdList2(PROC,-22);
 //        List<String> list = dingdingOpenInterface.getOrderIdList("PROC-DD8FF68E-B90E-4885-8C17-F69E53BE5C81");
         System.out.println("报销申请:"+list);
         List<SyViewEntity> listIdError = u8Service.selectViewByError("报销单至银行凭证");
@@ -380,7 +386,8 @@ public class ReimbursementService {
                         continue;
                     }
 
-                    if (!work_place.equals("昆山") && !work_place.equals("潍坊")){
+//                    if (!work_place.equals("昆山") && !work_place.equals("潍坊")){
+                    if (!work_place.equals("昆山") ){
                         continue;
                     }
                 }else{
@@ -702,7 +709,12 @@ public class ReimbursementService {
                 entity.setDeptName(map.get("originator_dept_name").toString());
                 entity.setJobNumber(map.get("title").toString());
                 entity.setTableType("报销单至银行凭证");
-                entity.setSyMessage(rsp.getErrmsg());
+                if(rsp.getErrmsg().length() > 1000){
+                    entity.setSyMessage(rsp.getErrmsg().substring(0,1000));
+                }else{
+                    entity.setSyMessage(rsp.getErrmsg());
+                }
+//                entity.setSyMessage(rsp.getErrmsg());
                 if(rsp.isSuccess()){
                     entity.setSyState("true");
                 }else{
@@ -1252,7 +1264,11 @@ public class ReimbursementService {
 //        System.out.println("========2======");
 //        System.out.println(list1);
 
-
+        String a = "aaaa啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊";
+        System.out.println(a.length());
+        if(a.length() > 5){
+            System.out.println(a.substring(0,5));
+        }
     }
 
 

+ 1 - 1
src/main/java/net/chenlin/dp/modules/sys/mapper/testU8.xml

@@ -70,7 +70,7 @@
 
 	<select id="selectViewByTrue" resultType="net.chenlin.dp.modules.sys.entity.SyViewEntity">
 		select oa_Id as oaId from sy_view
-		where DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 10 DAY),'%Y-%m-%d')
+		where DATE_FORMAT(create_time,'%Y-%m-%d') >= DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 22 DAY),'%Y-%m-%d')
 		and sy_state = "true" and table_type = #{tableType}
 	</select>