Browse Source

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

huangx 7 years ago
parent
commit
468d88322a

+ 2 - 2
applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml

@@ -8,7 +8,7 @@
         <result column="wh_description" property="wh_description" jdbcType="VARCHAR" />
         <result column="wh_statuscode" property="wh_statuscode" jdbcType="VARCHAR" />
         <result column="wh_status" property="wh_status" jdbcType="TIMESTAMP" />
-        <result column="wh_recordid" property="wh_recordid" jdbcType="INTEGER" />
+        <result column="wh_recordid" property="wh_recorderid" jdbcType="INTEGER" />
         <result column="wh_recorder" property="wh_recorder" jdbcType="INTEGER" />
         <result column="wh_date" property="wh_date" jdbcType="INTEGER" />
         <result column="companyId" property="companyId" jdbcType="INTEGER" />
@@ -316,7 +316,7 @@
         select count(*) from WAREHOUSE where WH_CODE = #{code} and WH_ID != #{id} and companyId =#{companyId}
     </select>
 
-    <select id="selectWarehouseListByCondition">
+    <select id="selectWarehouseListByCondition" resultMap="WarehouseResultMapper">
         select  *  from warehouse
         <where>
             <if test="con != null">

+ 52 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/config/WebConfig.java

@@ -0,0 +1,52 @@
+package com.usoftchina.saas.sale.config;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.StringHttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+
+import java.nio.charset.Charset;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+
+/**
+ * @author: guq
+ * @create: 2018-10-30 11:20
+ **/
+
+@Configuration
+public class WebConfig extends WebMvcConfigurationSupport{
+    @Bean
+    public HttpMessageConverter<String> responseBodyConverter() {
+        StringHttpMessageConverter converter = new StringHttpMessageConverter(Charset.forName("UTF-8"));
+        return converter;
+    }
+
+    @Bean
+    public MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter(){
+        MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
+        converter.setObjectMapper(objectMapper);
+        return converter;
+    }
+
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        super.configureMessageConverters(converters);
+        converters.add(responseBodyConverter());
+        converters.add(MappingJacksonHttpMessageConverter());
+    }
+
+    @Override
+    public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
+        configurer.favorPathExtension(false);
+    }
+
+}
+

+ 2 - 2
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -439,7 +439,7 @@ public class SaleServiceImpl implements SaleService{
         String pi_inoutno = maxnumberService.getMaxnumber(BillCodeSeq.SALEOUT.getCaller(),
                 true).getData();
         prodInOut.setPi_inoutno(pi_inoutno);
-        prodInOut.setPi_class("出货单");
+        prodInOut.setPi_class(BillCodeSeq.SALEOUT.getName());
         prodInOut.setPi_date(new Date());
         prodInOut.setPi_status(Status.UNAUDITED.getDisplay());
         prodInOut.setPi_statuscode(Status.UNAUDITED.name());
@@ -461,7 +461,7 @@ public class SaleServiceImpl implements SaleService{
             ProdIODetail prodIODetail = new ProdIODetail();
             prodIODetail.setPd_piid(pi_id);
             prodIODetail.setPd_inoutno(pi_inoutno);
-            prodIODetail.setPd_piclass("出货单");
+            prodIODetail.setPd_piclass(BillCodeSeq.SALEOUT.getName());
             prodIODetail.setPd_pdno(i);
             prodIODetail.setPd_orderid(sale.getId());
             prodIODetail.setPd_ordercode(sale.getSa_code());

+ 1 - 0
applications/sale/sale-server/src/main/resources/mapper/SaledetailMapper.xml

@@ -16,6 +16,7 @@
     <result column="sd_delivery" property="sd_delivery" jdbcType="TIMESTAMP" />
     <result column="sd_sendqty" property="sd_sendqty" jdbcType="DOUBLE" />
     <result column="sd_pdqty" property="sd_pdqty" jdbcType="DOUBLE" />
+    <result column="sd_yqty" property="sd_yqty" jdbcType="DOUBLE" />
     <result column="sd_remark" property="sd_remark" jdbcType="VARCHAR" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
     <result column="updaterId" property="updaterId" jdbcType="INTEGER" />

+ 0 - 1
frontend/saas-web/app/util/BaseUtil.js

@@ -15,7 +15,6 @@ Ext.define('saas.util.BaseUtil', {
                 'Access-Control-Allow-Origin': '*',
                 "Content-Type": 'application/json;charset=UTF-8' 
             };
-
         return new Ext.Promise(function (resolve, reject) {
             Ext.Ajax.request({
                 url: url,

+ 11 - 0
frontend/saas-web/app/view/document/kind/ChildForm.js

@@ -108,6 +108,17 @@ Ext.define('KitchenSink.view.binding.ChildForm', {
                 fieldLabel:'类型'
             }]
         },
+        address:{
+            items:[{
+                xtype:'hidden',
+                name:'id'
+            },{
+                xtype:'textfield',
+                name:'ad_address',
+                allowBlank:false,
+                fieldLabel:'地址详情'
+            }]
+        },
         warehouse:{
             items:[{
                 xtype:'hidden',

+ 10 - 0
frontend/saas-web/app/view/document/kind/Kind.js

@@ -144,6 +144,16 @@ Ext.define('saas.view.document.kind.Kind', {
             reqUrl: '/api/document/fundinouttype/save',
             delUrl: '/api/document/fundinouttype/delete'
         },
+        address:{
+            columns: [{
+                text: '地址名称',
+                dataIndex: 'ad_address',
+                flex: 1
+            }],
+            keyField:'id',
+            reqUrl: '/api/document/address/save',
+            delUrl: '/api/document/address/delete'
+        },
         warehouse:{
             columns: [{
                 text: '仓库编号',

+ 20 - 0
frontend/saas-web/app/view/document/kind/KindModel.js

@@ -149,6 +149,26 @@ Ext.define('saas.view.document.kind.KindModel', {
             },
             pageSize: null,
             autoLoad: false
+        },
+        address: {
+            fields:[
+                {name: 'id', type: 'int'},
+                {name: 'ad_address',  type: 'string'},
+                {name: 'ad_recorddate',  type: 'date'}
+            ],
+            proxy: {
+                type: 'ajax',
+                url: '/api/document/address/list',
+                actionMethods: {
+                    read: 'GET'
+                },
+                reader: {
+                    type: 'json',
+                    rootProperty: 'data.list'
+                }
+            },
+            pageSize: null,
+            autoLoad: false
         }
     }
 });

+ 25 - 0
frontend/saas-web/app/view/document/other/Address.js

@@ -0,0 +1,25 @@
+/**
+ * Created by zhouy on 2018/10/18.
+ */
+Ext.define('saas.view.document.other.Address', {
+    extend: 'saas.view.document.kind.Kind',
+    xtype: 'other-address',
+    autoScroll: true,
+    layout:'fit',
+    defaultType:'address',
+    tbar: ['->',{
+        xtype:'button',
+        text:'新增',
+        listeners: {
+            click: 'onAdd'
+        }
+    },{
+        xtype:'button',
+        text:'刷新',
+        listeners: {
+            click: 'onRefresh'
+        }
+    }]
+})
+
+

+ 2 - 1
frontend/saas-web/resources/json/navigation.json

@@ -211,8 +211,9 @@
             "viewType": "document-kind",
             "leaf": true
         }, {
+            "id":"other-address",
             "text": "采购交货地址",
-            "viewType": "document-kind",
+            "viewType": "other-address",
             "leaf": true
         }, {
             "id":"document-kind",