|
@ -6,24 +6,21 @@ import com.yihu.jw.basic.dict.service.SystemDictEntryService;
|
|
|
import com.yihu.jw.basic.quota.controller.JobController;
|
|
|
import com.yihu.jw.basic.quota.model.SaveModel;
|
|
|
import com.yihu.jw.basic.quota.service.*;
|
|
|
import com.yihu.jw.basic.quota.util.QuartzHelper;
|
|
|
import com.yihu.jw.basic.resource.service.RsResourceQuotaService;
|
|
|
import com.yihu.jw.basic.util.TemPath;
|
|
|
import com.yihu.jw.entity.ehr.dict.SystemDictEntry;
|
|
|
import com.yihu.jw.entity.ehr.quota.*;
|
|
|
import com.yihu.jw.entity.ehr.resource.RsResourceQuota;
|
|
|
import com.yihu.jw.restmodel.ehr.dict.MConventionalDict;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.PageEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.util.date.DateTimeUtil;
|
|
|
import com.yihu.jw.util.http.HttpClientUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -86,7 +83,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
|
|
|
if (!StringUtils.isEmpty(name)) {
|
|
|
stringBuffer.append("name?" + name.trim() + " g1;code?" + name.trim() + " g1;");
|
|
|
}
|
|
|
if (!StringUtils.isEmpty(quotaType)) {
|
|
|
if (quotaType!=null) {
|
|
|
stringBuffer.append("quotaType=" + quotaType + ";");
|
|
|
} /*else {
|
|
|
stringBuffer.append("quotaType=-1");
|
|
@ -126,7 +123,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
|
|
|
try {
|
|
|
String[] strings = URLDecoder.decode(tjQuotaModelJsonData, "UTF-8").split(";");
|
|
|
TjQuota detailModel = objectMapper.readValue(strings[0], TjQuota.class);
|
|
|
if (!StringUtils.isEmpty(detailModel.getId())) {
|
|
|
if (detailModel.getId()!=null) {
|
|
|
Long tjQuotaId = detailModel.getId();
|
|
|
TjQuota updateTjQuota = tjQuotaService.getById(tjQuotaId);
|
|
|
if (updateTjQuota!=null) {
|
|
@ -359,14 +356,28 @@ public class TjQuotaController extends EnvelopRestEndpoint {
|
|
|
String url = "/tj/tjGetQuotaResult";
|
|
|
try {
|
|
|
Map<String, Object> filters = new HashMap<>();
|
|
|
filters.put("startTime", startTime);
|
|
|
filters.put("endTime", endTime);
|
|
|
filters.put("org", orgName);
|
|
|
filters.put("province", province);
|
|
|
filters.put("town", city);
|
|
|
filters.put("district", district);
|
|
|
// 结果大于0
|
|
|
filters.put("result", res);
|
|
|
if(StringUtils.isNotBlank(startTime)){
|
|
|
filters.put("startTime", startTime);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(endTime)){
|
|
|
filters.put("endTime", endTime);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(orgName)){
|
|
|
filters.put("orgName", orgName);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(province)){
|
|
|
filters.put("province", province);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(city)){
|
|
|
filters.put("city", city);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(district)){
|
|
|
filters.put("district", district);
|
|
|
}
|
|
|
if(StringUtils.isNotBlank(res)){
|
|
|
// 结果大于0
|
|
|
filters.put("result", res);
|
|
|
}
|
|
|
try {
|
|
|
List<SaveModel> saveModelList = new ArrayList<>();
|
|
|
List<Map<String, Object>> resultList = quotaService.queryResultPage(tjQuotaId, filters.toString(), page, rows);
|
|
@ -498,7 +509,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
|
|
|
|
|
|
|
|
|
@GetMapping("/getTjQuotaChartList")
|
|
|
public Envelop getQuotaChartList(String quotaCode, String name, int dictId, int page, int rows) {
|
|
|
public Envelop getQuotaChartList(String quotaCode, String name, Integer dictId, int page, int rows) {
|
|
|
String url = "/tj/getTjQuotaChartList";
|
|
|
Map<String, Object> params = new HashMap<>();
|
|
|
params.put("filters", "");
|
|
@ -514,7 +525,7 @@ public class TjQuotaController extends EnvelopRestEndpoint {
|
|
|
params.put("filters", filters);
|
|
|
}
|
|
|
String filter = "";
|
|
|
if (!StringUtils.isEmpty(dictId)) {
|
|
|
if (dictId != null) {
|
|
|
filter = "dictId=" + dictId;
|
|
|
}
|
|
|
params.put("dictfilter", filter);
|