Parcourir la source

师傅保证金审核

jz.kai il y a 4 semaines
Parent
commit
bcc9d02e12

+ 55 - 7
.idea/workspace.xml

@@ -9,11 +9,17 @@
   <component name="ChangeListManager">
     <list default="true" id="26f59b4a-23ab-4f82-9dad-16520ce4a7cc" name="更改" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/TechnicianInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/TechnicianInfo.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/src/main/resources/mapper/base/TechnicianInfo.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/resources/mapper/base/TechnicianInfo.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/Deposit.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/Deposit.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/dto/WorkOrderSubDataDTO.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/dto/WorkOrderSubDataDTO.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/entity/AboutUs.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/entity/AboutUs.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/service/impl/WorkOrderServiceImpl.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/service/impl/WorkOrderServiceImpl.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/common/target/classes/mapper/base/CustomerInfo.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/mapper/base/CustomerInfo.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/common/target/classes/mapper/base/TechnicianInfo.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/mapper/base/TechnicianInfo.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.class" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/common/target/classes/mapper/base/WorkOrder.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/mapper/base/WorkOrder.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/DepositController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/DepositController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/web/target/classes/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/application.yml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/config/WebMvcConfig.class" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/config/WebMvcConfig.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/base/controller/CustomerInfoController.class" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/base/controller/CustomerInfoController.class" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -203,8 +209,10 @@
   <component name="MavenImportPreferences">
     <option name="generalSettings">
       <MavenGeneralSettings>
-        <option name="localRepository" value="D:\java\apache-maven-3.3.9\maven-repository" />
-        <option name="userSettingsFile" value="D:\java\apache-maven-3.3.9\conf\settings.xml" />
+        <option name="customMavenHome" value="D:\Specialized Files\apache-maven-3.5.0" />
+        <option name="localRepository" value="D:\Specialized Files\apache-maven-3.5.0\maven-repository" />
+        <option name="mavenHomeTypeForPersistence" value="CUSTOM" />
+        <option name="userSettingsFile" value="D:\Specialized Files\apache-maven-3.5.0\conf\settings.xml" />
       </MavenGeneralSettings>
     </option>
   </component>
@@ -360,8 +368,13 @@
   &quot;keyToString&quot;: {
     &quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
     &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
+    &quot;git-widget-placeholder&quot;: &quot;master&quot;,
     &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
-    &quot;last_opened_file_path&quot;: &quot;D:/Projects Files/水箱定制项目/water-tank-installation-server/web/src/main/java/com/jpsoft/employment/modules/base/controller&quot;,
+    &quot;last_opened_file_path&quot;: &quot;D:/Project Files/水箱/water-tank-installation-server&quot;,
+    &quot;project.structure.last.edited&quot;: &quot;SDK&quot;,
+    &quot;project.structure.proportion&quot;: &quot;0.0&quot;,
+    &quot;project.structure.side.proportion&quot;: &quot;0.0&quot;,
     &quot;settings.editor.selected.configurable&quot;: &quot;MavenSettings&quot;,
     &quot;应用程序.EmploymentApplication.executor&quot;: &quot;Debug&quot;
   }
@@ -395,8 +408,12 @@
     <configuration name="EmploymentApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
       <module name="web" />
       <option name="SPRING_BOOT_MAIN_CLASS" value="com.jpsoft.employment.EmploymentApplication" />
+      <method v="2">
+        <option name="Make" enabled="true" />
+      </method>
     </configuration>
     <list>
+      <item itemvalue="Spring Boot.EmploymentApplication" />
       <item itemvalue="应用程序.EmploymentApplication" />
     </list>
     <recent_temporary>
@@ -405,6 +422,13 @@
       </list>
     </recent_temporary>
   </component>
+  <component name="SharedIndexes">
+    <attachedChunks>
+      <set>
+        <option value="bundled-jdk-30f59d01ecdd-26cb7f24e5b0-intellij.indexing.shared.core-IU-253.29346.138" />
+      </set>
+    </attachedChunks>
+  </component>
   <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="应用程序级" UseSingleDictionary="true" transferred="true" />
   <component name="SvnConfiguration">
     <configuration />
@@ -586,6 +610,19 @@
   <component name="TypeScriptGeneratedFilesManager">
     <option name="version" value="1" />
   </component>
+  <component name="UnknownFeatures">
+    <option featureType="dependencySupport" implementationName="java:org.springframework:spring-core" />
+    <option featureType="dependencySupport" implementationName="java:junit:junit" />
+    <option featureType="dependencySupport" implementationName="java:io.projectreactor:reactor-core" />
+    <option featureType="dependencySupport" implementationName="java:org.springframework.data:spring-data-commons" />
+    <option featureType="dependencySupport" implementationName="java:org.thymeleaf:thymeleaf" />
+    <option featureType="dependencySupport" implementationName="maven-packaging:war" />
+    <option featureType="dependencySupport" implementationName="java:org.springframework:spring-messaging" />
+    <option featureType="dependencySupport" implementationName="java:javax.validation:validation-api" />
+    <option featureType="dependencySupport" implementationName="java:org.springframework.boot:spring-boot" />
+    <option featureType="dependencySupport" implementationName="java:org.springframework:spring-webmvc" />
+    <option featureType="dependencySupport" implementationName="java:org.projectlombok:lombok" />
+  </component>
   <component name="Vcs.Log.History.Properties">
     <option name="COLUMN_ORDER">
       <list>
@@ -616,6 +653,17 @@
     <MESSAGE value="师傅端移动接口" />
     <option name="LAST_COMMIT_MESSAGE" value="师傅端移动接口" />
   </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager>
+      <breakpoints>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/DepositController.java</url>
+          <line>250</line>
+          <option name="timeStamp" value="4" />
+        </line-breakpoint>
+      </breakpoints>
+    </breakpoint-manager>
+  </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
     <option name="FILTER_TARGETS" value="false" />

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/Deposit.java

@@ -4,6 +4,8 @@ import java.io.Serializable;
 import java.util.Date;
 import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
+import java.util.List;
+
 import org.springframework.format.annotation.DateTimeFormat;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
@@ -24,6 +26,9 @@ public class Deposit {
 	
 				@ApiModelProperty(value = "师傅ID")
 	private String technicianId;
+	private String realName;
+	private String idCard;
+	private String phone;
 	
 				@ApiModelProperty(value = "支付方式(1:微信,2:支付宝,3:现下支付)")
 	private String payType;
@@ -57,5 +62,6 @@ public class Deposit {
 
 	@ApiModelProperty(value = "支付图片")
 	private String payImages;
+	private List<String> payImagesList;
 	
 		}

BIN
common/target/classes/com/jpsoft/employment/modules/base/dto/WorkOrderSubDataDTO.class


BIN
common/target/classes/com/jpsoft/employment/modules/base/entity/AboutUs.class


BIN
common/target/classes/com/jpsoft/employment/modules/base/entity/Deposit.class


BIN
common/target/classes/com/jpsoft/employment/modules/base/service/impl/WorkOrderServiceImpl.class


+ 1 - 0
common/target/classes/mapper/base/CustomerInfo.xml

@@ -153,6 +153,7 @@
 			select * from base_customer_info
 		]]>
 		<where>
+			del_flag=false
 			<if test="searchParams.id != null">
 				and ID_ like #{searchParams.id}
 			</if>

+ 1 - 0
common/target/classes/mapper/base/TechnicianInfo.xml

@@ -214,6 +214,7 @@
 			select * from base_technician_info
 		]]>
 		<where>
+			del_flag=false
 			<if test="searchParams.status != null">
 				and status_ = #{searchParams.status}
 			</if>

+ 6 - 2
common/target/classes/mapper/base/WorkOrder.xml

@@ -36,7 +36,7 @@
 		<result property="peopleSeenNum" column="people_seen_num" />
 		<result property="bak" column="bak_" />
 		<result property="payCertificate" column="pay_certificate" />
-
+		<result property="finishTime" column="finish_time" />
 	</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.WorkOrder">
 		<!--
@@ -47,7 +47,7 @@
 		<![CDATA[
 		insert into base_work_order
 	    (id_,number_,title_,address_,date_,tag_,image_,status_,price_,location_,company_id,map_,construction_location,environment,volume_,technician_id,pay_status,create_time,update_time,del_flag,create_by,update_by,
-	    customer_name,customer_phone,view_num,certificate_,cancel_causes,cancel_reasons,cancel_images,people_seen_num,bak_,pay_certificate)
+	    customer_name,customer_phone,view_num,certificate_,cancel_causes,cancel_reasons,cancel_images,people_seen_num,bak_,pay_certificate,finish_time)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -82,6 +82,7 @@
 ,#{peopleSeenNum,jdbcType= NUMERIC }
 ,#{bak,jdbcType=VARCHAR}
 ,#{payCertificate,jdbcType=VARCHAR}
+,#{finishTime,jdbcType= TIMESTAMP }
 		)
 	]]>
 	</insert>
@@ -184,6 +185,9 @@
 			<if test="payCertificate!=null">
 				pay_certificate=#{payCertificate,jdbcType=VARCHAR},
 			</if>
+			<if test="finishTime!=null">
+				finish_time=#{finishTime,jdbcType= TIMESTAMP },
+			</if>
 		</set>
 		where id_=#{id}
 	</update>

+ 69 - 5
web/src/main/java/com/jpsoft/employment/modules/base/controller/DepositController.java

@@ -1,6 +1,8 @@
 package com.jpsoft.employment.modules.base.controller;
 
 import com.github.pagehelper.Page;
+import com.jpsoft.employment.modules.base.entity.TechnicianInfo;
+import com.jpsoft.employment.modules.base.service.TechnicianInfoService;
 import com.jpsoft.employment.modules.common.dto.MessageResult;
 import com.jpsoft.employment.modules.common.utils.PojoUtils;
 import com.jpsoft.employment.modules.common.dto.Sort;
@@ -8,9 +10,11 @@ import com.jpsoft.employment.modules.base.entity.Deposit;
 import com.jpsoft.employment.modules.base.service.DepositService;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.lang3.StringUtils;
+import org.apache.poi.hpsf.Decimal;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
@@ -24,6 +28,8 @@ public class DepositController {
 
     @Autowired
     private DepositService depositService;
+    @Autowired
+    private TechnicianInfoService technicianInfoService;
 	
 	
 	@ApiOperation(value="创建空记录")
@@ -201,9 +207,6 @@ public class DepositController {
             HttpServletRequest request){
         String subject = (String)request.getAttribute("subject");
 
-        //当前用户ID
-        System.out.println(subject);
-
         MessageResult<Map> msgResult = new MessageResult<>();
 
         Map<String,Object> searchParams = new HashMap<>();
@@ -215,13 +218,74 @@ public class DepositController {
             searchParams.put("id","%" + id + "%");
         }
 
-
         Page<Deposit> page = depositService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
-
+        for (Deposit deposit : page.getResult()) {
+            TechnicianInfo technicianInfo = technicianInfoService.get(deposit.getTechnicianId());
+            deposit.setRealName(technicianInfo.getRealName());
+            deposit.setPhone(technicianInfo.getPhone());
+            deposit.setIdCard(technicianInfo.getIdCard());
+
+            List<String> imageList=new ArrayList<>();
+            if(StringUtils.isNotEmpty(deposit.getPayImages())){
+                String[] imageArr = deposit.getPayImages().split(",");
+                for (String image:imageArr) {
+                    imageList.add(image);
+                }
+                deposit.setPayImagesList(imageList);
+            }
+        }
 
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));
 
         return msgResult;
     }
+
+    @ApiOperation(value="审核")
+    @PostMapping("checked/{id}")
+    @Transactional(rollbackFor = Exception.class)
+    public MessageResult<Deposit> checked(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<Deposit> msgResult = new MessageResult<>();
+
+        try {
+            Deposit deposit = depositService.get(id);
+            deposit.setPayStatus("2");
+            deposit.setUpdateBy(subject);
+            deposit.setUpdateTime(new Date());
+            depositService.update(deposit);
+
+            TechnicianInfo technicianInfo = technicianInfoService.get(deposit.getTechnicianId());
+            int amount = 0;
+            if (technicianInfo.getDeposit() == null) {
+                amount = deposit.getAmount().intValue();
+            }
+            else {
+                amount = deposit.getAmount().intValue() + technicianInfo.getDeposit();
+            }
+
+            if (amount >= 2000 && amount < 5000) {
+                technicianInfo.setLevel(1);
+            }
+            if (amount >= 5000 && amount < 10000) {
+                technicianInfo.setLevel(2);
+            }
+            if (amount > 10000) {
+                technicianInfo.setLevel(3);
+            }
+            technicianInfo.setDeposit(amount);
+            technicianInfo.setUpdateBy(subject);
+            technicianInfo.setUpdateTime(new Date());
+            technicianInfoService.update(technicianInfo);
+
+            msgResult.setResult(true);
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

+ 9 - 7
web/target/classes/application.yml

@@ -116,13 +116,15 @@ pagehelper:
 
 
 wx:
-  #错误
-  appId: wx014362202dd87dd7
-  appSecret: aaf8db83ff69c3716a62e3d5bd21c292
-applet:
-  #三得利小程序
-  appId: wx7eec18cd89b9d777
-  appSecret: 5a0aa258fda3e75097a80764dab73202
+  #客户端
+  custom:
+    appId: wx81663812d6911100
+    appSecret: 873e039353fed747b0dd052ab10f179e
+  mini:
+    #师傅端
+    appId: wxa7c3f0f8b4758e1f
+    appSecret: 2115914d99fe6fbf2d0798d7dad71cb9
+    token: weixin
 
 #oss:
 #  accessKeyId: LTAILGOo7bwpkvnq

BIN
web/target/classes/com/jpsoft/employment/config/WebMvcConfig.class


BIN
web/target/classes/com/jpsoft/employment/modules/base/controller/CustomerInfoController.class


BIN
web/target/classes/com/jpsoft/employment/modules/base/controller/DepositController.class