|
|
@@ -6,6 +6,8 @@ import java.util.Arrays;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+import java.util.TreeMap;
|
|
|
import java.util.UUID;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
@@ -52,6 +54,7 @@ import com.goafanti.common.utils.FileUtils;
|
|
|
import com.goafanti.common.utils.LoggerUtils;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
+import com.goafanti.core.shiro.token.TokenManager;
|
|
|
import com.goafanti.patent.bo.InputPatentCost;
|
|
|
import com.goafanti.patent.bo.InputPatentInfo;
|
|
|
import com.goafanti.patent.bo.InputPatentRegistration;
|
|
|
@@ -89,9 +92,53 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
@Resource
|
|
|
private OrgRatepayService orgRatepayService;
|
|
|
|
|
|
- @RequestMapping(value = "", method = RequestMethod.GET)
|
|
|
- public Result lastYearTaxUrl(){
|
|
|
+ /**
|
|
|
+ * 专利状态流转下拉
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/patentStatus", method = RequestMethod.GET)
|
|
|
+ public Result patentStatus(){
|
|
|
+ Result res = new Result();
|
|
|
+ if (!checkAdminLogin(res)) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ res.setData(disposePatentStatus());
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 上年度纳税申报报表是否存在
|
|
|
+ * @param uid
|
|
|
+ * @param sign
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/lastYearTax", method = RequestMethod.GET)
|
|
|
+ public Result lastYearTax(String uid, String sign){
|
|
|
Result res = new Result();
|
|
|
+ if (!checkAdminLogin(res)) {
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(uid)){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到用户", "用户"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
+ if (attachmentType == AttachmentType.LAST_YEAR_RATEPAY) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "附件标示"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ OrgRatepay ratepay = orgRatepayService.selectRatepayByUidAndYear(uid, cal.get(Calendar.YEAR)-1);
|
|
|
+
|
|
|
+ if (null == ratepay){
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "找不到上年度纳税申报表", "上年度纳税申报表"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+
|
|
|
return res;
|
|
|
}
|
|
|
|
|
|
@@ -1042,5 +1089,62 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
return fileName;
|
|
|
}
|
|
|
|
|
|
+ private Map<String, String> disposePatentStatus(){
|
|
|
+ Map<String, String> status = new TreeMap<String, String>();
|
|
|
+ if (TokenManager.hasRole("999999")) {
|
|
|
+ for (PatentInfoStatus p : PatentInfoStatus.values()){
|
|
|
+ status.put(p.getCode().toString(), p.getDesc());
|
|
|
+ status.remove(PatentInfoStatus.OTHER.getCode().toString());
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CREATE.getCode())){
|
|
|
+ status.put(PatentInfoStatus.CREATE.getCode().toString(), PatentInfoStatus.CREATE.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.SIGN.getCode())){
|
|
|
+ status.put(PatentInfoStatus.SIGN.getCode().toString(), PatentInfoStatus.SIGN.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.DELIVERD.getCode())){
|
|
|
+ status.put(PatentInfoStatus.DELIVERD.getCode().toString(), PatentInfoStatus.DELIVERD.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CIRCULATION.getCode())){
|
|
|
+ status.put(PatentInfoStatus.CIRCULATION.getCode().toString(), PatentInfoStatus.CIRCULATION.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.COMPOSE.getCode())){
|
|
|
+ status.put(PatentInfoStatus.COMPOSE.getCode().toString(), PatentInfoStatus.COMPOSE.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.ACCEPT.getCode())){
|
|
|
+ status.put(PatentInfoStatus.ACCEPT.getCode().toString(), PatentInfoStatus.ACCEPT.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REVIEWNOTICE.getCode())){
|
|
|
+ status.put(PatentInfoStatus.REVIEWNOTICE.getCode().toString(), PatentInfoStatus.REVIEWNOTICE.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REVIEWREPLY.getCode())){
|
|
|
+ status.put(PatentInfoStatus.REVIEWREPLY.getCode().toString(), PatentInfoStatus.REVIEWREPLY.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CORRECTIONNOTICE.getCode())){
|
|
|
+ status.put(PatentInfoStatus.CORRECTIONNOTICE.getCode().toString(), PatentInfoStatus.CORRECTIONNOTICE.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CORRECTIONREPLY.getCode())){
|
|
|
+ status.put(PatentInfoStatus.CORRECTIONREPLY.getCode().toString(), PatentInfoStatus.CORRECTIONREPLY.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.AUTHORIZE.getCode())){
|
|
|
+ status.put(PatentInfoStatus.AUTHORIZE.getCode().toString(), PatentInfoStatus.AUTHORIZE.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.REJECT.getCode())){
|
|
|
+ status.put(PatentInfoStatus.REJECT.getCode().toString(), PatentInfoStatus.REJECT.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.LICENSE.getCode())){
|
|
|
+ status.put(PatentInfoStatus.LICENSE.getCode().toString(), PatentInfoStatus.LICENSE.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.SETTLEMENT.getCode())){
|
|
|
+ status.put(PatentInfoStatus.SETTLEMENT.getCode().toString(), PatentInfoStatus.SETTLEMENT.getDesc());
|
|
|
+ }
|
|
|
+ if (TokenManager.hasPermission("PatentInfoStatus" + PatentInfoStatus.CALLBACK.getCode())){
|
|
|
+ status.put(PatentInfoStatus.CALLBACK.getCode().toString(), PatentInfoStatus.CALLBACK.getDesc());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return status;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|