Antiloveg лет назад: 8
Родитель
Сommit
76a3219533

+ 24 - 0
src/main/java/com/goafanti/cognizance/controller/CognizanceApiController.java

@@ -857,7 +857,31 @@ public class CognizanceApiController extends CertifyApiController {
 		}
 		return res;
 	}
+    
+	/**
+	 * 实名认证--企业上年度纳税申报表上传
+	 * 
+	 * @param req
+	 * @param sign
+	 * @param uid
+	 * @return
+	 */
+	@RequestMapping(value = "/uploadLastYearRatepay", method = RequestMethod.POST)
+	public Result uploadLastYearRatepay(HttpServletRequest req, String sign) {
+		Result res = new Result();
+
+		AttachmentType attachmentType = AttachmentType.getField(sign);
+		if (attachmentType == AttachmentType.RATEPAY) {
+			Calendar now = Calendar.getInstance(); 
+			sign = sign + "_" + (now.get(Calendar.YEAR)-1);
+			res.setData(handleFiles(res, "/cognizance/", true, req, sign, TokenManager.getUserId()));
+		} else {
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
+		}
 
+		return res;
+	}
+	
 	/**
 	 * 企业纳税申报表上传
 	 * 

+ 6 - 6
src/main/java/com/goafanti/common/mapper/OrgCognizanceMapper.xml

@@ -454,9 +454,9 @@
 		CONCAT(i.first_contacts,'  ', i.first_mobile) as firstContacts,
 	    CONCAT(i.second_contacts,'  ', i.second_mobile) as secondContacts,
 	    CONCAT(i.third_contacts,'  ', i.third_mobile) as thirdContacts
-	from organization_identity i
-	RIGHT JOIN user u  on u.id = i.uid 
-	LEFT JOIN admin a on a.id = i.consultant
+	from user u 
+	LEFT JOIN organization_identity i  on u.id = i.uid 
+	LEFT JOIN admin a on a.id = u.aid
 	where u.type = 1 and u.lvl = 1
 	<if test="unitName != null">
 	    and i.unit_name like  CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
@@ -474,9 +474,9 @@
   
   <select id="findCultivationCount" resultType="java.lang.Integer" parameterType="java.lang.String">
   	select count(1)
-	from organization_identity i
-	RIGHT JOIN user u  on u.id = i.uid 
-	LEFT JOIN admin a on a.id = i.consultant
+	from user u 
+	LEFT JOIN organization_identity i  on u.id = i.uid 
+	LEFT JOIN admin a on a.id = u.aid
 	where u.type = 1 and u.lvl = 1
 	<if test="unitName != null">
 	    and i.unit_name = #{unitName,jdbcType=VARCHAR}