Эх сурвалжийг харах

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

hy 7 жил өмнө
parent
commit
4d3adae757

+ 5 - 5
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/dto/ListReqDTO.java

@@ -112,22 +112,22 @@ public class ListReqDTO implements Serializable {
                     }
                     if ("between".equals(operation)) {
                         String[] vals = value.toString().split(",");
-                        con = " " + field + " " + operation + " '" + vals[0] + "' and '" + vals[1] + "' and";
+                        con = " ( " + field + " " + operation + " '" + vals[0] + "' and '" + vals[1] + "' ) and";
                     } else if ("startsWith".equals(operation)) {
                         con = " " + field + "  like '" + value + "%' and";
                     } else if ("endsWith".equals(operation)) {
                         con = " " + field + " like '%" + value + "' and";
                     } else if ("in".equals(operation) || "not in".equals(operation)) {
-                        con = " " + field + " " + operation + " (" + value + ") and";
+                        con = " ( " + field + " " + operation + " (" + value + ") ) and";
                     } else {
                         //字符串默认是模糊查询
                         if ("string".equals(type)) {
-                            con = " " + field + " like '%" + value + "%' and";
+                            con = " (" + field + " like '%" + value + "%') and";
                         } else if ("condition".equals(type)) {
                             //type为condition为前端拼的条件
-                            con = " " + value + " and";
+                            con = " (" + value + ") and";
                         } else {
-                            con = " " + field + " " + operation + " '" + value + "' and";
+                            con = " (" + field + " " + operation + " '" + value + "') and";
                         }
 
                     }

+ 2 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/VerificationMapper.java

@@ -40,4 +40,6 @@ public interface VerificationMapper extends CommonBaseMapper<Verification> {
     String validateResAudit(@Param("id") Long id);
 
     int validateSetAcount(@Param("detno") int detno,@Param("companyid")Long companyid);
+
+    void updateAuditMsg (@Param("id") Long id,@Param("userName")String userName);
 }

+ 2 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -543,8 +543,6 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         formData.getMain().setVc_auditdate(new Date());
         baseDTO = this.saveFormData(formData);
         Long id = baseDTO.getId();
-
-
             VerificationDTO verificationDTO = formData.getMain();
             Subledger subledger = changSubledgerUntil(verificationDTO);
             subledgerMapper.insertSelective(subledger);
@@ -573,7 +571,8 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
 
         //更新出入库状态
         this.updateProdInoutStatus(id);
-
+        //更新审核人和审核日期
+        verificationMapper.updateAuditMsg(id,BaseContextHolder.getUserName());
         baseDTO.setId(id);
         baseDTO.setName(BillCodeSeq.VERIFICATION.getCaller());
         baseDTO.setCode(formData.getMain().getVc_code());

+ 3 - 3
applications/money/money-server/src/main/resources/mapper/VerificationMapper.xml

@@ -619,7 +619,7 @@
     select count(1) from periodsdetail where pd_detno = #{detno} and IFNULL(pd_status,0)=99
     and companyid= #{companyid}
   </select>
-  <select id="checkStatus" resultType="int">
-    select count(1) from Verification where ifnull(vc_statuscode,'')='AUDITED' and vc_id= #{id,jdbcType=INTEGER}
-  </select>
+  <update id="updateAuditMsg">
+    update verification set vc_auditman  = #{userName},vc_auditdate = NOW() where vc_id = #{id}
+  </update>
 </mapper>

+ 2 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/po/report/SaleProfitView.java

@@ -58,4 +58,6 @@ public class SaleProfitView {
     private Double pd_profitpresent;
 
     private Double pw_costprice;
+
+    private Date pi_date;
 }

+ 2 - 1
applications/sale/sale-server/src/main/resources/mapper/SaleProfitViewMapper.xml

@@ -7,6 +7,7 @@
     <result column="sa_sellercode" property="sa_sellercode" jdbcType="VARCHAR" />
     <result column="sa_seller" property="sa_seller" jdbcType="VARCHAR" />
     <result column="sa_date" property="sa_date" jdbcType="TIMESTAMP" />
+    <result column="pi_date" property="pi_date" jdbcType="TIMESTAMP" />
     <result column="pd_inoutno" property="pd_inoutno" jdbcType="VARCHAR" />
     <result column="pd_piclass" property="pd_piclass" jdbcType="VARCHAR" />
     <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
@@ -37,7 +38,7 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by sa_date desc
+    order by pi_date desc
   </select>
 
   <select id="selectCalculateFields" resultType="string">

+ 0 - 1
applications/storage/storage-server/src/main/resources/mapper/ProdInOutReportMapper.xml

@@ -55,7 +55,6 @@
         and  companyid = #{companyId}
       </if>
     </where>
-    order by pi_date desc
   </select>
 
 

+ 16 - 0
frontend/saas-web/app/view/money/verification/FormPanelController.js

@@ -533,6 +533,8 @@ Ext.define('saas.view.money.verification.FormPanelController', {
         })
         store.removeAll();
         store.add(datas);
+        // 不写该方法合计列会错位,这里触发afterEdit事件用来刷新grid
+        store.getAt(0) ? store.afterEdit(store.getAt(0), ['']) : null;
     },
 
     onSave: function() {
@@ -668,4 +670,18 @@ Ext.define('saas.view.money.verification.FormPanelController', {
             form.fireEvent('afteraudit', false, form, res);
         });
     },
+    myInitCopyData: function(formData) {
+        var me = this,
+        form = me.getView();
+        //录入人,录入日期,审核人,审核日期清空
+        formData.main['creatorId'] = saas.util.BaseUtil.getCurrentUser().id;
+        formData.main['creatorName'] = saas.util.BaseUtil.getCurrentUser().realname;
+        formData.main['createTime'] = Ext.Date.format(new Date(), 'Y-m-d H:i:s');
+        formData.main['updaterId'] = undefined;
+        formData.main['updaterName'] = undefined;
+        formData.main['updateTime'] = undefined;
+        formData.main[form._auditmanField] = undefined;
+        formData.main[form._auditdateField] = undefined;
+        return formData;
+    }
 });

+ 1 - 1
frontend/saas-web/app/view/sale/report/SaleProfit.js

@@ -25,7 +25,7 @@ Ext.define('saas.view.sale.report.SaleProfit', {
         columnWidth: 0.2
     }, {
         xtype: 'condatefield',
-        name: 'sa_date',
+        name: 'pi_date',
         fieldLabel: '时间',
         columnWidth: 0.4
     }],

+ 2 - 0
frontend/saas-web/app/view/stock/report/DataList.js

@@ -114,6 +114,8 @@ Ext.define('saas.view.stock.report.DataList', {
             var format = '0,000.' + xr.join();
             return Ext.util.Format.number(v, format);
         }
+    }, {
+        flex: 1
     }],
 
     reportColumns: [{