zhoudw 7 éve
szülő
commit
1605a462b8

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomerMapper.java

@@ -10,7 +10,7 @@ public interface CustomerMapper extends CommonBaseMapper<Customer> {
 
     int insertSelective(Customer record);
 
-    Customer selectByPrimaryKey(Integer cu_id);
+    Customer selectByPrimaryKey(Long cu_id);
 
     int updateByPrimaryKeySelective(Customer record);
 

+ 4 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomeraddressMapper.java

@@ -4,6 +4,8 @@ import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customer;
 import com.usoftchina.saas.document.entities.Customeraddress;
 
+import java.util.List;
+
 public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
     int deleteByPrimaryKey(Integer ca_id);
 
@@ -18,4 +20,6 @@ public interface CustomeraddressMapper extends CommonBaseMapper<Customer> {
     int updateByPrimaryKeyWithBLOBs(Customeraddress record);
 
     int updateByPrimaryKey(Customeraddress record);
+
+    List<Customeraddress> selectByFK(Long fk_i);
 }

+ 6 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/CustomercontactMapper.java

@@ -4,6 +4,8 @@ package com.usoftchina.saas.document.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 import com.usoftchina.saas.document.entities.Customercontact;
 
+import java.util.List;
+
 public interface CustomercontactMapper extends CommonBaseMapper<Customercontact> {
     int deleteByPrimaryKey(Integer cc_id);
 
@@ -16,4 +18,8 @@ public interface CustomercontactMapper extends CommonBaseMapper<Customercontact>
     int updateByPrimaryKeySelective(Customercontact record);
 
     int updateByPrimaryKey(Customercontact record);
+
+    List<Customercontact> selectByFK(Long fk_i);
+
+
 }

+ 14 - 6
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/CustomerServiceImpl.java

@@ -8,8 +8,12 @@ import com.usoftchina.saas.commons.dto.ListReqDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.dto.CustomerDTO;
 import com.usoftchina.saas.document.dto.CustomerFormDTO;
+import com.usoftchina.saas.document.dto.CustomeraddressDTO;
+import com.usoftchina.saas.document.dto.CustomercontactDTO;
 import com.usoftchina.saas.document.entities.Customer;
 import com.usoftchina.saas.document.entities.CustomerList;
+import com.usoftchina.saas.document.entities.Customeraddress;
+import com.usoftchina.saas.document.entities.Customercontact;
 import com.usoftchina.saas.document.mapper.CustomerListMapper;
 import com.usoftchina.saas.document.mapper.CustomerMapper;
 import com.usoftchina.saas.document.mapper.CustomeraddressMapper;
@@ -63,17 +67,21 @@ public class CustomerServiceImpl extends CommonBaseServiceImpl<CustomerMapper, C
         if (null == id || "0".equals(id)) {
             return null;
         }
-        CustomerFormDTO purchaseFormDTO = new CustomerFormDTO();
+        CustomerFormDTO customerFormDTO = new CustomerFormDTO();
         //查询主表信息
         Customer customer = getMapper().selectByPrimaryKey(id);
+
         //将Customer实体对象转化成传输对象
         CustomerDTO main = BeanMapper.map(customer, CustomerDTO.class);
         //查询从表
-//        List<PurchaseDetail> purchaseDetails = purchasedetailMapper.selectByFK(id);
-//        List<PurchaseDetailDTO> items = BeanMapper.mapList(purchaseDetails, PurchaseDetailDTO.class);
-//        purchaseFormDTO.setMain(main);
-//        purchaseFormDTO.setItems(items);
-        return purchaseFormDTO;
+        List<Customercontact> customercontacts = customercontactMapper.selectByFK(id);
+        List<CustomercontactDTO> items1 = BeanMapper.mapList(customercontacts, CustomercontactDTO.class);
+        List<Customeraddress> customeraddresses = customeraddressMapper.selectByFK(id);
+        List<CustomeraddressDTO> items2 = BeanMapper.mapList(customeraddresses, CustomeraddressDTO.class);
+        customerFormDTO.setMain(main);
+        customerFormDTO.setItems1(items1);
+        customerFormDTO.setItems2(items2);
+        return customerFormDTO;
     }
 
     @Override

+ 7 - 6
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductbrandServiceImpl.java

@@ -1,20 +1,21 @@
 package com.usoftchina.saas.document.service.impl;
 
 import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
-import com.usoftchina.saas.commons.api.MessageLogService;
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
 import com.usoftchina.saas.context.BaseContextHolder;
 import com.usoftchina.saas.document.entities.Productbrand;
 import com.usoftchina.saas.document.mapper.ProductbrandMapper;
 import com.usoftchina.saas.document.service.ProductbrandService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
+@Service
 public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandMapper, Productbrand> implements ProductbrandService {
 
     @Autowired
     private ProductbrandMapper productbrandMapper;
-    @Autowired
-    private MessageLogService messageLogService;
+//    @Autowired
+//    private MessageLogService messageLogService;
 
     private final String LOG_NAME = "物料品牌";
 
@@ -25,12 +26,12 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
             productbrandMapper.insertSelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
-            messageLogService.save(docBaseDTO);
+//            messageLogService.save(docBaseDTO);
         }else{
             productbrandMapper.updateByPrimaryKeySelective(productbrand);
             //记录日志
             DocBaseDTO docBaseDTO = new DocBaseDTO(productbrand.getId(), null, LOG_NAME);
-            messageLogService.update(docBaseDTO);
+//            messageLogService.update(docBaseDTO);
         }
         return true;
     }
@@ -40,7 +41,7 @@ public class ProductbrandServiceImpl extends CommonBaseServiceImpl<ProductbrandM
         productbrandMapper.deleteByPrimaryKey(id);
         //记录日志
         DocBaseDTO docBaseDTO = new DocBaseDTO(id, null, LOG_NAME);
-        messageLogService.delete(docBaseDTO);
+//        messageLogService.delete(docBaseDTO);
         return true;
     }
 

+ 11 - 11
applications/document/document-server/src/main/resources/mapper/CustomerMapper.xml

@@ -22,7 +22,7 @@
     <result column="cu_recordman" jdbcType="VARCHAR" property="cu_recordman" />
     <result column="cu_recorddate" jdbcType="TIMESTAMP" property="cu_recorddate" />
     <result column="companyid" jdbcType="INTEGER" property="companyId" />
-    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updaterid" jdbcType="INTEGER" property="updaterId" />
     <result column="updatetime" jdbcType="TIMESTAMP" property="updateTime" />
     <result column="cu_text1" jdbcType="VARCHAR" property="cu_text1" />
     <result column="cu_text2" jdbcType="VARCHAR" property="cu_text2" />
@@ -36,7 +36,7 @@
     cu_id, cu_code, cu_name, cu_uu, cu_type, cu_begindate, cu_beginaramount, cu_beginprerecamount, 
     cu_promisedays, cu_taxrate, cu_sellerid, cu_sellercode, cu_sellername, cu_credit, 
     cu_status, cu_statuscode, cu_recordmanid, cu_recordman, cu_recorddate, companyid, 
-    updaterId, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount, 
+    updaterid, updatetime, cu_text1, cu_text2, cu_text3, cu_text4, cu_text5, cu_leftamount, 
     cu_recamount
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
@@ -56,7 +56,7 @@
       cu_taxrate, cu_sellerid, cu_sellercode, 
       cu_sellername, cu_credit, cu_status, 
       cu_statuscode, cu_recordmanid, cu_recordman, 
-      cu_recorddate, companyid, updaterId, 
+      cu_recorddate, companyid, updaterid, 
       updatetime, cu_text1, cu_text2, 
       cu_text3, cu_text4, cu_text5, 
       cu_leftamount, cu_recamount)
@@ -66,7 +66,7 @@
       #{cu_taxrate,jdbcType=DOUBLE}, #{cu_sellerid,jdbcType=INTEGER}, #{cu_sellercode,jdbcType=VARCHAR}, 
       #{cu_sellername,jdbcType=VARCHAR}, #{cu_credit,jdbcType=DOUBLE}, #{cu_status,jdbcType=VARCHAR}, 
       #{cu_statuscode,jdbcType=VARCHAR}, #{cu_recordmanid,jdbcType=INTEGER}, #{cu_recordman,jdbcType=VARCHAR}, 
-      #{cu_recorddate,jdbcType=TIMESTAMP}, #{companyid,jdbcType=INTEGER}, #{updaterId,jdbcType=INTEGER}, 
+      #{cu_recorddate,jdbcType=TIMESTAMP}, #{companyid,jdbcType=INTEGER}, #{updaterid,jdbcType=INTEGER}, 
       #{updatetime,jdbcType=TIMESTAMP}, #{cu_text1,jdbcType=VARCHAR}, #{cu_text2,jdbcType=VARCHAR}, 
       #{cu_text3,jdbcType=VARCHAR}, #{cu_text4,jdbcType=VARCHAR}, #{cu_text5,jdbcType=VARCHAR}, 
       #{cu_leftamount,jdbcType=DOUBLE}, #{cu_recamount,jdbcType=DOUBLE})
@@ -134,8 +134,8 @@
       <if test="companyid != null">
         companyid,
       </if>
-      <if test="updaterId != null">
-        updaterId,
+      <if test="updaterid != null">
+        updaterid,
       </if>
       <if test="updatetime != null">
         updatetime,
@@ -223,8 +223,8 @@
       <if test="companyid != null">
         #{companyid,jdbcType=INTEGER},
       </if>
-      <if test="updaterId != null">
-        #{updaterId,jdbcType=INTEGER},
+      <if test="updaterid != null">
+        #{updaterid,jdbcType=INTEGER},
       </if>
       <if test="updatetime != null">
         #{updatetime,jdbcType=TIMESTAMP},
@@ -312,8 +312,8 @@
       <if test="companyid != null">
         companyid = #{companyid,jdbcType=INTEGER},
       </if>
-      <if test="updaterId != null">
-        updaterId = #{updaterId,jdbcType=INTEGER},
+      <if test="updaterid != null">
+        updaterid = #{updaterid,jdbcType=INTEGER},
       </if>
       <if test="updatetime != null">
         updatetime = #{updatetime,jdbcType=TIMESTAMP},
@@ -363,7 +363,7 @@
       cu_recordman = #{cu_recordman,jdbcType=VARCHAR},
       cu_recorddate = #{cu_recorddate,jdbcType=TIMESTAMP},
       companyid = #{companyid,jdbcType=INTEGER},
-      updaterId = #{updaterId,jdbcType=INTEGER},
+      updaterid = #{updaterid,jdbcType=INTEGER},
       updatetime = #{updatetime,jdbcType=TIMESTAMP},
       cu_text1 = #{cu_text1,jdbcType=VARCHAR},
       cu_text2 = #{cu_text2,jdbcType=VARCHAR},

+ 12 - 3
applications/document/document-server/src/main/resources/mapper/CustomeraddressMapper.xml

@@ -29,9 +29,7 @@
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="ResultMapWithBLOBs">
     select 
-    <include refid="Base_Column_List" />
-    ,
-    <include refid="Blob_Column_List" />
+   *
     from customeraddress
     where ca_id = #{ca_id,jdbcType=INTEGER}
   </select>
@@ -233,4 +231,15 @@
       ca_text5 = #{ca_text5,jdbcType=VARCHAR}
     where ca_id = #{ca_id,jdbcType=INTEGER}
   </update>
+
+  <select id="selectByFK" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs">
+    select
+    <include refid="Base_Column_List" />
+    ,
+    <include refid="Blob_Column_List" />
+    from customeraddress
+    where ca_cuid = #{fk_i,jdbcType=INTEGER}
+  </select>
+
+
 </mapper>

+ 10 - 0
applications/document/document-server/src/main/resources/mapper/CustomercontactMapper.xml

@@ -209,4 +209,14 @@
       cc_text5 = #{cc_text5,jdbcType=VARCHAR}
     where cc_id = #{cc_id,jdbcType=INTEGER}
   </update>
+
+  <select id="selectByFK" parameterType="java.lang.Long" resultMap="BaseResultMap">
+    select
+    <include refid="Base_Column_List" />
+    from customercontact
+    where cc_cuid = #{fk_i,jdbcType=INTEGER}
+  </select>
+
+
+
 </mapper>

+ 1 - 1
frontend/saas-web/app/util/FormUtil.js

@@ -115,7 +115,7 @@ Ext.define('saas.util.FormUtil', {
         }else{
             //取后台编号
             me.BaseUtil.request({
-                url: 'http://192.168.253.58:8900/number/getMaxnumber',
+                url: 'http://192.168.253.228:8900/number/getMaxnumber',
                 params: {
                     caller:form.caller
                 },