Browse Source

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

zhuth 7 years ago
parent
commit
46ac7942fa
18 changed files with 504 additions and 186 deletions
  1. 78 0
      applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Address.java
  2. 38 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java
  3. 24 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java
  4. 11 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/AddressService.java
  5. 50 0
      applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/AddressServiceImpl.java
  6. 182 0
      applications/document/document-server/src/main/resources/mapper/AddressMapper.xml
  7. 1 108
      applications/document/document-server/src/main/resources/mapper/WarehouseMapper.xml
  8. 5 1
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java
  9. 2 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java
  10. 4 2
      applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java
  11. 7 7
      applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml
  12. 42 42
      applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml
  13. 6 1
      frontend/saas-web/app/view/main/Navigation.js
  14. 21 1
      frontend/saas-web/app/view/purchase/purchase/FormController.js
  15. 9 10
      frontend/saas-web/app/view/purchase/purchase/FormPanel.js
  16. 20 1
      frontend/saas-web/app/view/purchase/purchaseIn/FormController.js
  17. 3 4
      frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js
  18. 1 7
      frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

+ 78 - 0
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Address.java

@@ -0,0 +1,78 @@
+package com.usoftchina.saas.document.entities;
+
+import com.usoftchina.saas.base.entity.CommonBaseEntity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Address extends CommonBaseEntity implements Serializable {
+    private Date ad_recorddate;
+
+    private String ad_text1;
+
+    private String ad_text2;
+
+    private String ad_text3;
+
+    private String ad_text4;
+
+    private String ad_text5;
+
+    private String ad_address;
+
+    public Date getAd_recorddate() {
+        return ad_recorddate;
+    }
+
+    public void setAd_recorddate(Date ad_recorddate) {
+        this.ad_recorddate = ad_recorddate;
+    }
+
+    public String getAd_text1() {
+        return ad_text1;
+    }
+
+    public void setAd_text1(String ad_text1) {
+        this.ad_text1 = ad_text1 == null ? null : ad_text1.trim();
+    }
+
+    public String getAd_text2() {
+        return ad_text2;
+    }
+
+    public void setAd_text2(String ad_text2) {
+        this.ad_text2 = ad_text2 == null ? null : ad_text2.trim();
+    }
+
+    public String getAd_text3() {
+        return ad_text3;
+    }
+
+    public void setAd_text3(String ad_text3) {
+        this.ad_text3 = ad_text3 == null ? null : ad_text3.trim();
+    }
+
+    public String getAd_text4() {
+        return ad_text4;
+    }
+
+    public void setAd_text4(String ad_text4) {
+        this.ad_text4 = ad_text4 == null ? null : ad_text4.trim();
+    }
+
+    public String getAd_text5() {
+        return ad_text5;
+    }
+
+    public void setAd_text5(String ad_text5) {
+        this.ad_text5 = ad_text5 == null ? null : ad_text5.trim();
+    }
+
+    public String getAd_address() {
+        return ad_address;
+    }
+
+    public void setAd_address(String ad_address) {
+        this.ad_address = ad_address == null ? null : ad_address.trim();
+    }
+}

+ 38 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/controller/AddressController.java

@@ -0,0 +1,38 @@
+package com.usoftchina.saas.document.controller;
+
+
+import com.sun.org.apache.regexp.internal.RE;
+import com.usoftchina.saas.base.Result;
+import com.usoftchina.saas.document.entities.Address;
+import com.usoftchina.saas.document.service.AddressService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/address")
+public class AddressController {
+
+    @Autowired
+    private AddressService addressService;
+
+    @PostMapping("/save")
+    public Result save(Address address){
+        addressService.save(address);
+        return Result.success();
+    }
+
+    @PostMapping("/delete/{id}")
+    public Result deleteById(Long id){
+        addressService.removeByPrimaryKey(id);
+        return Result.success();
+    }
+
+    @PostMapping("/batchDelete")
+    public Result deleteByIds(String ids){
+        addressService.removeByIds(ids);
+        return Result.success();
+    }
+
+}

+ 24 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/AddressMapper.java

@@ -0,0 +1,24 @@
+package com.usoftchina.saas.document.mapper;
+
+import com.usoftchina.saas.base.mapper.CommonBaseMapper;
+import com.usoftchina.saas.document.entities.Address;
+import java.util.List;
+
+public interface AddressMapper extends CommonBaseMapper<Address> {
+
+    int deleteByPrimaryKey(Long ad_id);
+
+    int insert(Address record);
+
+    int insertSelective(Address record);
+
+    Address selectByPrimaryKey(Long ad_id);
+
+    int updateByPrimaryKeySelective(Address record);
+
+    int updateByPrimaryKeyWithBLOBs(Address record);
+
+    int updateByPrimaryKey(Address record);
+
+    int deleteByIds(String ids);
+}

+ 11 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/AddressService.java

@@ -0,0 +1,11 @@
+package com.usoftchina.saas.document.service;
+
+import com.usoftchina.saas.base.service.CommonBaseService;
+import com.usoftchina.saas.document.entities.Address;
+import com.usoftchina.saas.document.mapper.AddressMapper;
+
+public interface AddressService extends CommonBaseService<AddressMapper, Address>  {
+
+    void removeByIds(String ids);
+
+}

+ 50 - 0
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/AddressServiceImpl.java

@@ -0,0 +1,50 @@
+package com.usoftchina.saas.document.service.impl;
+
+import com.usoftchina.saas.base.service.CommonBaseServiceImpl;
+import com.usoftchina.saas.document.entities.Address;
+import com.usoftchina.saas.document.mapper.AddressMapper;
+import com.usoftchina.saas.document.service.AddressService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class AddressServiceImpl extends CommonBaseServiceImpl<AddressMapper, Address> implements AddressService {
+
+    @Autowired
+    private AddressMapper addressMapper;
+
+    /**
+     * 保存
+     * @param address
+     * @return
+     */
+    @Override
+    public boolean save(Address address){
+        addressMapper.insertSelective(address);
+        return true;
+    }
+
+    /**
+     * 通过主键删除
+     * @param id
+     * @return
+     */
+    @Override
+    public boolean removeByPrimaryKey(Long id){
+        if(id != null && id > 0){
+            addressMapper.deleteByPrimaryKey(id);
+        }
+        return true;
+    }
+
+    /**
+     * 批量删除
+     * @param ids
+     */
+    @Override
+    public void removeByIds(String ids) {
+        if(ids != null && ids.length() > 0){
+            addressMapper.deleteByIds(ids);
+        }
+    }
+}

+ 182 - 0
applications/document/document-server/src/main/resources/mapper/AddressMapper.xml

@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.usoftchina.saas.document.mapper.AddressMapper">
+  <resultMap id="BaseResultMap" type="com.usoftchina.saas.document.entities.Address">
+    <id column="ad_id" jdbcType="INTEGER" property="ad_id" />
+    <result column="ad_recorddate" jdbcType="TIMESTAMP" property="ad_recorddate" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="ad_text1" jdbcType="VARCHAR" property="ad_text1" />
+    <result column="ad_text2" jdbcType="VARCHAR" property="ad_text2" />
+    <result column="ad_text3" jdbcType="VARCHAR" property="ad_text3" />
+    <result column="ad_text4" jdbcType="VARCHAR" property="ad_text4" />
+    <result column="ad_text5" jdbcType="VARCHAR" property="ad_text5" />
+  </resultMap>
+  <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Address">
+    <result column="ad_address" jdbcType="LONGVARCHAR" property="ad_address" />
+  </resultMap>
+  <sql id="Base_Column_List">
+    ad_id, ad_recorddate, companyId, updaterId, updateTime, ad_text1, ad_text2, ad_text3, 
+    ad_text4, ad_text5
+  </sql>
+  <sql id="Blob_Column_List">
+    ad_address
+  </sql>
+
+  <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Address">
+    insert into address (ad_id, ad_recorddate, companyId, 
+      updaterId, updateTime, ad_text1, 
+      ad_text2, ad_text3, ad_text4, 
+      ad_text5, ad_address)
+    values (#{ad_id,jdbcType=INTEGER}, #{ad_recorddate,jdbcType=TIMESTAMP}, #{companyId,jdbcType=INTEGER}, 
+      #{updaterId,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP}, #{ad_text1,jdbcType=VARCHAR}, 
+      #{ad_text2,jdbcType=VARCHAR}, #{ad_text3,jdbcType=VARCHAR}, #{ad_text4,jdbcType=VARCHAR}, 
+      #{ad_text5,jdbcType=VARCHAR}, #{ad_address,jdbcType=LONGVARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.document.entities.Address">
+    insert into address
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="ad_id != null">
+        ad_id,
+      </if>
+      <if test="ad_recorddate != null">
+        ad_recorddate,
+      </if>
+      <if test="companyId != null">
+        companyId,
+      </if>
+      <if test="updaterId != null">
+        updaterId,
+      </if>
+      <if test="updateTime != null">
+        updateTime,
+      </if>
+      <if test="ad_text1 != null">
+        ad_text1,
+      </if>
+      <if test="ad_text2 != null">
+        ad_text2,
+      </if>
+      <if test="ad_text3 != null">
+        ad_text3,
+      </if>
+      <if test="ad_text4 != null">
+        ad_text4,
+      </if>
+      <if test="ad_text5 != null">
+        ad_text5,
+      </if>
+      <if test="ad_address != null">
+        ad_address,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="ad_id != null">
+        #{ad_id,jdbcType=INTEGER},
+      </if>
+      <if test="ad_recorddate != null">
+        #{ad_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null">
+        #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ad_text1 != null">
+        #{ad_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text2 != null">
+        #{ad_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text3 != null">
+        #{ad_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text4 != null">
+        #{ad_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text5 != null">
+        #{ad_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_address != null">
+        #{ad_address,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Address">
+    update address
+    <set>
+      <if test="ad_recorddate != null">
+        ad_recorddate = #{ad_recorddate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="companyId != null">
+        companyId = #{companyId,jdbcType=INTEGER},
+      </if>
+      <if test="updaterId != null">
+        updaterId = #{updaterId,jdbcType=INTEGER},
+      </if>
+      <if test="updateTime != null">
+        updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="ad_text1 != null">
+        ad_text1 = #{ad_text1,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text2 != null">
+        ad_text2 = #{ad_text2,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text3 != null">
+        ad_text3 = #{ad_text3,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text4 != null">
+        ad_text4 = #{ad_text4,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_text5 != null">
+        ad_text5 = #{ad_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="ad_address != null">
+        ad_address = #{ad_address,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where ad_id = #{ad_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.document.entities.Address">
+    update address
+    set ad_recorddate = #{ad_recorddate,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      ad_text1 = #{ad_text1,jdbcType=VARCHAR},
+      ad_text2 = #{ad_text2,jdbcType=VARCHAR},
+      ad_text3 = #{ad_text3,jdbcType=VARCHAR},
+      ad_text4 = #{ad_text4,jdbcType=VARCHAR},
+      ad_text5 = #{ad_text5,jdbcType=VARCHAR},
+      ad_address = #{ad_address,jdbcType=LONGVARCHAR}
+    where ad_id = #{ad_id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.saas.document.entities.Address">
+    update address
+    set ad_recorddate = #{ad_recorddate,jdbcType=TIMESTAMP},
+      companyId = #{companyId,jdbcType=INTEGER},
+      updaterId = #{updaterId,jdbcType=INTEGER},
+      updateTime = #{updateTime,jdbcType=TIMESTAMP},
+      ad_text1 = #{ad_text1,jdbcType=VARCHAR},
+      ad_text2 = #{ad_text2,jdbcType=VARCHAR},
+      ad_text3 = #{ad_text3,jdbcType=VARCHAR},
+      ad_text4 = #{ad_text4,jdbcType=VARCHAR},
+      ad_text5 = #{ad_text5,jdbcType=VARCHAR}
+    where ad_id = #{ad_id,jdbcType=INTEGER}
+  </update>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from address
+    where ad_id = #{ad_id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByIds" parameterType="java.lang.String">
+    delete from address
+    where ad_id in (#{ids,jdbcType=VARCHAR})
+  </delete>
+
+</mapper>

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

@@ -98,20 +98,6 @@
         wh_recorder, wh_date, companyid, updaterId, updatetime, wh_text1, wh_text2, wh_text3,
         wh_text4, wh_text5
     </sql>
-    <select id="selectByExample" parameterType="com.usoftchina.saas.document.entities.WarehouseExample" resultMap="BaseResultMap">
-        select
-        <if test="distinct">
-            distinct
-        </if>
-        <include refid="Base_Column_List" />
-        from warehouse
-        <if test="_parameter != null">
-            <include refid="Example_Where_Clause" />
-        </if>
-        <if test="orderByClause != null">
-            order by ${orderByClause}
-        </if>
-    </select>
     <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
         select
         <include refid="Base_Column_List" />
@@ -122,12 +108,7 @@
         delete from warehouse
         where wh_id = #{wh_id,jdbcType=INTEGER}
     </delete>
-    <delete id="deleteByExample" parameterType="com.usoftchina.saas.document.entities.WarehouseExample">
-        delete from warehouse
-        <if test="_parameter != null">
-            <include refid="Example_Where_Clause" />
-        </if>
-    </delete>
+
     <insert id="insert" parameterType="com.usoftchina.saas.document.entities.Warehouse">
         insert into warehouse (wh_id, wh_code, wh_type,
         wh_description, wh_statuscode, wh_status,
@@ -251,94 +232,6 @@
             </if>
         </trim>
     </insert>
-    <select id="countByExample" parameterType="com.usoftchina.saas.document.entities.WarehouseExample" resultType="java.lang.Integer">
-        select count(*) from warehouse
-        <if test="_parameter != null">
-            <include refid="Example_Where_Clause" />
-        </if>
-    </select>
-    <update id="updateByExampleSelective" parameterType="map">
-        update warehouse
-        <set>
-            <if test="record.wh_id != null">
-                wh_id = #{record.wh_id,jdbcType=INTEGER},
-            </if>
-            <if test="record.wh_code != null">
-                wh_code = #{record.wh_code,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_type != null">
-                wh_type = #{record.wh_type,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_description != null">
-                wh_description = #{record.wh_description,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_statuscode != null">
-                wh_statuscode = #{record.wh_statuscode,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_status != null">
-                wh_status = #{record.wh_status,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_recorderid != null">
-                wh_recorderid = #{record.wh_recorderid,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_recorder != null">
-                wh_recorder = #{record.wh_recorder,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_date != null">
-                wh_date = #{record.wh_date,jdbcType=TIMESTAMP},
-            </if>
-            <if test="record.companyid != null">
-                companyid = #{record.companyid,jdbcType=INTEGER},
-            </if>
-            <if test="record.updaterId != null">
-                updaterId = #{record.updaterId,jdbcType=INTEGER},
-            </if>
-            <if test="record.updatetime != null">
-                updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-            </if>
-            <if test="record.wh_text1 != null">
-                wh_text1 = #{record.wh_text1,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_text2 != null">
-                wh_text2 = #{record.wh_text2,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_text3 != null">
-                wh_text3 = #{record.wh_text3,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_text4 != null">
-                wh_text4 = #{record.wh_text4,jdbcType=VARCHAR},
-            </if>
-            <if test="record.wh_text5 != null">
-                wh_text5 = #{record.wh_text5,jdbcType=VARCHAR},
-            </if>
-        </set>
-        <if test="_parameter != null">
-            <include refid="Update_By_Example_Where_Clause" />
-        </if>
-    </update>
-    <update id="updateByExample" parameterType="map">
-        update warehouse
-        set wh_id = #{record.wh_id,jdbcType=INTEGER},
-        wh_code = #{record.wh_code,jdbcType=VARCHAR},
-        wh_type = #{record.wh_type,jdbcType=VARCHAR},
-        wh_description = #{record.wh_description,jdbcType=VARCHAR},
-        wh_statuscode = #{record.wh_statuscode,jdbcType=VARCHAR},
-        wh_status = #{record.wh_status,jdbcType=VARCHAR},
-        wh_recorderid = #{record.wh_recorderid,jdbcType=VARCHAR},
-        wh_recorder = #{record.wh_recorder,jdbcType=VARCHAR},
-        wh_date = #{record.wh_date,jdbcType=TIMESTAMP},
-        companyid = #{record.companyid,jdbcType=INTEGER},
-        updaterId = #{record.updaterId,jdbcType=INTEGER},
-        updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
-        wh_text1 = #{record.wh_text1,jdbcType=VARCHAR},
-        wh_text2 = #{record.wh_text2,jdbcType=VARCHAR},
-        wh_text3 = #{record.wh_text3,jdbcType=VARCHAR},
-        wh_text4 = #{record.wh_text4,jdbcType=VARCHAR},
-        wh_text5 = #{record.wh_text5,jdbcType=VARCHAR}
-        <if test="_parameter != null">
-            <include refid="Update_By_Example_Where_Clause" />
-        </if>
-    </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.document.entities.Warehouse">
         update warehouse
         <set>

+ 5 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -147,7 +147,11 @@ public class ProdInOutController {
         return Result.success();
     }
 
-
+    @GetMapping("/turnProdOut/{id}")
+    public Result turnProdin(@PathVariable("id") Long id){
+        prodInOutService.turnProdOut(id);
+        return Result.success();
+    };
 
 
 

+ 2 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -159,8 +159,8 @@ public class PurchaseController {
         return Result.success();
     }
 
-    @GetMapping("/turnProdin")
-    public Result turnProdin(Long id){
+    @GetMapping("/turnProdin/{id}")
+    public Result turnProdin(@PathVariable("id") Long id){
         purchaseService.turnProdin(id);
         return Result.success();
     };

+ 4 - 2
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -310,11 +310,13 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         //插入验收单主表
         ProdInOut prodInOut = new ProdInOut();
         //生成单号
-        String piInoutno ="test0001";
+        String piInoutno ="YS0001";
 
         prodInOut.setPi_inoutno(piInoutno);
         prodInOut.setPi_class("采购验收单");
-//        prodInOut.setPiDate(new Date());
+        prodInOut.setPi_date(new Date());
+        prodInOut.setPi_status("未审核");
+        prodInOut.setPi_statuscode("UNAUDITED");
         prodInOut.setPi_recorddate(new Date());
         prodInOut.setPi_vendid(purchase.getPu_vendid());
         prodInOut.setPi_vendcode(purchase.getPu_vendcode());

+ 7 - 7
applications/purchase/purchase-server/src/main/resources/mapper/ProdIODetailMapper.xml

@@ -734,14 +734,14 @@
       <if test="pd_status != null">
         pd_status = #{pd_status,jdbcType=INTEGER},
       </if>
-      <if test="companyid != null">
-        companyid = #{companyid,jdbcType=INTEGER},
+      <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},
+      <if test="updateTime != null">
+        updatetime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
       <if test="pd_text1 != null">
         pd_text1 = #{pd_text1,jdbcType=VARCHAR},
@@ -768,7 +768,7 @@
         pd_remark = #{pd_remark,jdbcType=LONGVARCHAR},
       </if>
     </set>
-    where pd_id = #{pd_id,jdbcType=INTEGER}
+    where pd_id = #{id,jdbcType=INTEGER}
   </update>
   <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.saas.purchase.po.ProdIODetail">
     update prodiodetail

+ 42 - 42
applications/purchase/purchase-server/src/main/resources/mapper/PurchasedetailMapper.xml

@@ -248,50 +248,50 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.purchase.po.PurchaseDetail" >
     update purchasedetail
     <set >
-      <if test="pdPuid != null" >
-        PD_PUID = #{pdPuid,jdbcType=INTEGER},
+      <if test="pd_puid != null" >
+        PD_PUID = #{pd_puid,jdbcType=INTEGER},
       </if>
-      <if test="pdCode != null" >
-        PD_CODE = #{pdCode,jdbcType=VARCHAR},
+      <if test="pd_code != null" >
+        PD_CODE = #{pd_code,jdbcType=VARCHAR},
       </if>
-      <if test="pdDetno != null" >
-        PD_DETNO = #{pdDetno,jdbcType=INTEGER},
+      <if test="pd_detno != null" >
+        PD_DETNO = #{pd_detno,jdbcType=INTEGER},
       </if>
-      <if test="pdProdid != null" >
-        PD_PRODID = #{pdProdid,jdbcType=INTEGER},
+      <if test="pd_prodid != null" >
+        PD_PRODID = #{pd_prodid,jdbcType=INTEGER},
       </if>
-      <if test="pdProdcode != null" >
-        PD_PRODCODE = #{pdProdcode,jdbcType=VARCHAR},
+      <if test="pd_prodcode != null" >
+        PD_PRODCODE = #{pd_prodcode,jdbcType=VARCHAR},
       </if>
-      <if test="pdUnit != null" >
-        PD_UNIT = #{pdUnit,jdbcType=VARCHAR},
+      <if test="pd_unit != null" >
+        PD_UNIT = #{pd_unit,jdbcType=VARCHAR},
       </if>
-      <if test="pdQty != null" >
-        PD_QTY = #{pdQty,jdbcType=DOUBLE},
+      <if test="pd_qty != null" >
+        PD_QTY = #{pd_qty,jdbcType=DOUBLE},
       </if>
-      <if test="pdPrice != null" >
-        PD_PRICE = #{pdPrice,jdbcType=DOUBLE},
+      <if test="pd_price != null" >
+        PD_PRICE = #{pd_price,jdbcType=DOUBLE},
       </if>
-      <if test="pdTotal != null" >
-        PD_TOTAL = #{pdTotal,jdbcType=DOUBLE},
+      <if test="pd_total != null" >
+        PD_TOTAL = #{pd_total,jdbcType=DOUBLE},
       </if>
-      <if test="pdTaxtotal != null" >
-        PD_TAXTOTAL = #{pdTaxtotal,jdbcType=DOUBLE},
+      <if test="pd_taxtotal != null" >
+        PD_TAXTOTAL = #{pd_taxtotal,jdbcType=DOUBLE},
       </if>
-      <if test="pdAcceptqty != null" >
-        PD_ACCEPTQTY = #{pdAcceptqty,jdbcType=DOUBLE},
+      <if test="pd_acceptqty != null" >
+        PD_ACCEPTQTY = #{pd_acceptqty,jdbcType=DOUBLE},
       </if>
-      <if test="pdDelivery != null" >
-        PD_DELIVERY = #{pdDelivery,jdbcType=DOUBLE},
+      <if test="pd_delivery != null" >
+        PD_DELIVERY = #{pd_delivery,jdbcType=DOUBLE},
       </if>
-      <if test="pdSalecode != null" >
-        PD_SALECODE = #{pdSalecode,jdbcType=VARCHAR},
+      <if test="pd_salecode != null" >
+        PD_SALECODE = #{pd_salecode,jdbcType=VARCHAR},
       </if>
-      <if test="pdSaledetno != null" >
-        PD_SALEDETNO = #{pdSaledetno,jdbcType=INTEGER},
+      <if test="pd_saledetno != null" >
+        PD_SALEDETNO = #{pd_saledetno,jdbcType=INTEGER},
       </if>
-      <if test="pdSdid != null" >
-        PD_SDID = #{pdSdid,jdbcType=INTEGER},
+      <if test="pd_sdid != null" >
+        PD_SDID = #{pd_sdid,jdbcType=INTEGER},
       </if>
       <if test="companyId != null" >
         companyId = #{companyId,jdbcType=INTEGER},
@@ -302,23 +302,23 @@
       <if test="updateTime != null" >
         updateTime = #{updateTime,jdbcType=TIMESTAMP},
       </if>
-      <if test="pdText1 != null" >
-        pd_text1 = #{pdText1,jdbcType=VARCHAR},
+      <if test="pd_text1 != null" >
+        pd_text1 = #{pd_text1,jdbcType=VARCHAR},
       </if>
-      <if test="pdText2 != null" >
-        pd_text2 = #{pdText2,jdbcType=VARCHAR},
+      <if test="pd_text2 != null" >
+        pd_text2 = #{pd_text2,jdbcType=VARCHAR},
       </if>
-      <if test="pdText3 != null" >
-        pd_text3 = #{pdText3,jdbcType=VARCHAR},
+      <if test="pd_text3 != null" >
+        pd_text3 = #{pd_text3,jdbcType=VARCHAR},
       </if>
-      <if test="pdText4 != null" >
-        pd_text4 = #{pdText4,jdbcType=VARCHAR},
+      <if test="pd_text4 != null" >
+        pd_text4 = #{pd_text4,jdbcType=VARCHAR},
       </if>
-      <if test="pdText5 != null" >
-        pd_text5 = #{pdText5,jdbcType=VARCHAR},
+      <if test="pd_text5 != null" >
+        pd_text5 = #{pd_text5,jdbcType=VARCHAR},
       </if>
-      <if test="pdYqty != null" >
-        pd_yqty = #{pdYqty,jdbcType=DOUBLE},
+      <if test="pd_yqty != null" >
+        pd_yqty = #{pd_yqty,jdbcType=DOUBLE},
       </if>
     </set>
     where PD_ID = #{id,jdbcType=INTEGER}

+ 6 - 1
frontend/saas-web/app/view/main/Navigation.js

@@ -28,7 +28,12 @@ Ext.define('saas.view.main.Navigation', {
                             text: '采购验收单',
                             formType:'purchase-purchase-formpanel',
                             queryType: 'purchase-purchaseIn-querypanel'
-                        }, {
+                        },{
+                            id: 'purchaseOut',
+                            text: '采购验退单',
+                            formType:'purchase-purchaseOut-formpanel',
+                            queryType: 'purchase-purchaseOut-querypanel'
+                        },{
                             id: 'form1',
                             text: '测试-采购单明细界面',
                             formType: 'test-order-formpanel'

+ 21 - 1
frontend/saas-web/app/view/purchase/purchase/FormController.js

@@ -133,5 +133,25 @@ Ext.define('saas.view.purchase.purchase.FormController', {
             renderTo:this.ownerCmp.ownerCt.getEl()
         }).show();
 
-    }
+    },
+
+    turnIn: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnInUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+              
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
 });

+ 9 - 10
frontend/saas-web/app/view/purchase/purchase/FormPanel.js

@@ -13,19 +13,18 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
      _statusCodeField: 'pu_statuscode',
      _detnoColumn:  'pd_detno',
      _relationColumn: 'pd_puid',
-     _readUrl:'http://192.168.253.58:8800/purchase/read/',
-     _saveUrl:'http://192.168.253.58:8800/purchase/save',
-     _auditUrl:'http://192.168.253.58:8800/purchase/audit',
-     _deleteUrl:'http://192.168.253.58:8800/purchase/delete/',
-     _deleteDetailUrl:'http://192.168.253.58:8800/purchase/deleteItem/',
+     _readUrl:'http://localhost:8800/purchase/read/',
+     _saveUrl:'http://localhost:8800/purchase/save',
+     _auditUrl:'http://localhost:8800/purchase/audit',
+     _deleteUrl:'http://localhost:8800/purchase/delete/',
+     _deleteDetailUrl:'http://localhost:8800/purchase/deleteItem/',
+     _turnInUrl:'http://localhost:8800/purchase/turnProdin/',
      initId:0,
  
      toolBtns: [{
          xtype: 'button',
-         text: '转单按钮',
-         handler: function() {
-             console.log('11');
-         }
+         text: '转验收单按钮',
+         handler: 'turnIn'
      }],
 
     defaultItems: [{
@@ -159,7 +158,7 @@ Ext.define('saas.view.purchase.purchase.FormPanel', {
             },
             {
                 text : "数量", 
-                dataIndex : "pd_yqty", 
+                dataIndex : "pd_qty", 
                 editor : {
                     xtype : "numberfield"
                 },

+ 20 - 1
frontend/saas-web/app/view/purchase/purchaseIn/FormController.js

@@ -143,5 +143,24 @@ Ext.define('saas.view.purchase.purchaseIn.FormController', {
             renderTo:this.ownerCmp.ownerCt.getEl()
         }).show();
 
-    }
+    },
+    turnOut: function() {
+        var me = this,
+        form = me.getView(),
+        id = form.getForm().findField(form._idField);
+        form.BaseUtil.request({
+            url: form._turnOutUrl+id.value,
+            method: 'GET',
+        })
+        .then(function(res) {
+            var localJson = new Ext.decode(res.responseText);
+            if(localJson.success){
+                Ext.Msg.alert('提示','转单成功');
+              
+            }
+        })
+        .catch(function() {
+            Ext.Msg.alert('提示','转单失败');
+        });
+     }
 });

+ 3 - 4
frontend/saas-web/app/view/purchase/purchaseIn/FormPanel.js

@@ -18,14 +18,13 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanel', {
     _deleteUrl:'http://192.168.253.228:8800/prodinout/delete/',
     _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
    _baseVastUrl:'http://192.168.253.228:8800/prodinout/',
+   _turnOutUrl:'http://localhost:8800/prodinout/turnProdOut/',
     initId:11,
 
     toolBtns: [{
         xtype: 'button',
-        text: '转单按钮',
-        handler: function() {
-            console.log('11');
-        }
+        text: '转验退单按钮',
+        handler: 'turnOut'
     }],
 
     defaultItems: [{

+ 1 - 7
frontend/saas-web/app/view/purchase/purchaseOut/FormPanel.js

@@ -19,13 +19,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanel', {
     _deleteDetailUrl:'http://192.168.253.228:8800/prodinout/deleteItem/',
     initId:11,
 
-    toolBtns: [{
-        xtype: 'button',
-        text: '转单按钮',
-        handler: function() {
-            console.log('11');
-        }
-    }],
+    toolBtns: [],
 
     defaultItems: [{
         xtype: 'hidden',