Browse Source

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

hy 7 years ago
parent
commit
bc1c158b50

+ 1 - 1
applications/commons/commons-dto/src/main/java/com/usoftchina/saas/commons/exception/BizExceptionCode.java

@@ -58,7 +58,7 @@ public enum BizExceptionCode implements BaseExceptionCode {
     PURCHASE_UNAUDIT_ERROR(71001,"采购订单已转采购验收单,无法反审核"),
     PURCHASE_DETAIL_OVERNUM(70001, "明细行数量超过来源采购验收单明细行数量"),
     PURCHASE_ORDER_HASAUDIT(70002, "存在已审核单据,单据编号:%s"),
-
+    PURCHASE_ORDER_HASUNAUDIT(70003, "存在未审核单据,单据编号:%s"),
 
     //销售
     SALE_ALL_TURNOUT(72000, "该销售单已全部转出货,无法转出货单"),

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

@@ -404,7 +404,7 @@
 
   <select id="validNameAndCodeWhenRelated" parameterType="com.usoftchina.saas.document.entities.Customer" resultType="int">
     select count(1) from customer where (cu_code != #{cu_code,jdbcType=VARCHAR} or cu_name != #{cu_name,jdbcType=VARCHAR})
-    and cu_id != #{id} and companyId =#{companyId}
+    and cu_id = #{id} and companyId =#{companyId}
   </select>
 
 

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

@@ -282,8 +282,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
 
         String msg = purchaseMapper.validateBatchUnAudit(baseDTOs.getBaseDTOs());
         if (null != msg) {
-            String message = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getMessage();
-            int code = BizExceptionCode.PURCHASE_ORDER_HASAUDIT.getCode();
+            String message = BizExceptionCode.PURCHASE_ORDER_HASUNAUDIT.getMessage();
+            int code = BizExceptionCode.PURCHASE_ORDER_HASUNAUDIT.getCode();
             throw new BizException(code, String.format(message, msg));
         }
         for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {

+ 6 - 1
frontend/saas-web/set-token.html

@@ -4,7 +4,12 @@
 		if (e.source != window.parent) {
             return;
         }
-        localStorage.setItem('app-state-session', e.data);
+        var storeKey = 'app-state-session';
+        if (e.data) {
+            localStorage.setItem(storeKey, e.data);
+        } else {
+            localStorage.removeItem(storeKey);
+        }
         window.parent.postMessage("success", "*");
     });
 </script>

+ 48 - 0
pom.xml

@@ -446,5 +446,53 @@
                 </pluginManagement>
             </build>
         </profile>
+        <profile>
+            <!-- mvn deploy -P docker-prod -->
+            <id>docker-prod</id>
+            <properties>
+                <docker.repository>10.10.100.200:5000</docker.repository>
+            </properties>
+            <build>
+                <pluginManagement>
+                    <plugins>
+                        <!-- Docker maven plugin -->
+                        <plugin>
+                            <groupId>com.spotify</groupId>
+                            <artifactId>docker-maven-plugin</artifactId>
+                            <version>1.0.0</version>
+                            <configuration>
+                                <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
+                                <registryUrl>${docker.repository}</registryUrl>
+                                <pushImage>true</pushImage>
+                                <forceTags>true</forceTags>
+                                <imageName>
+                                    ${docker.repository}/${docker.registry.name}/${project.artifactId}:${project.version}
+                                </imageName>
+                                <imageTags>
+                                    <imageTag>latest</imageTag>
+                                </imageTags>
+                                <resources>
+                                    <resource>
+                                        <targetPath>/</targetPath>
+                                        <directory>${project.build.directory}</directory>
+                                        <include>${project.build.finalName}.jar</include>
+                                    </resource>
+                                </resources>
+                            </configuration>
+                            <executions>
+                                <execution>
+                                    <id>build-image</id>
+                                    <phase>package</phase>
+                                    <goals>
+                                        <goal>build</goal>
+                                    </goals>
+                                </execution>
+                            </executions>
+                        </plugin>
+                        <!-- Docker maven plugin -->
+                    </plugins>
+                </pluginManagement>
+            </build>
+        </profile>
     </profiles>
 </project>