Commit f495d72e authored by 赵啸非's avatar 赵啸非

添加远程调试

parent 8e15b420
...@@ -37,5 +37,8 @@ public class MatterDatumVo extends BaseEntityLong { ...@@ -37,5 +37,8 @@ public class MatterDatumVo extends BaseEntityLong {
*/ */
private String categoryName; private String categoryName;
/** 主键,自增长列表 */
private List <Long> idList;
} }
\ No newline at end of file
...@@ -3,14 +3,19 @@ package com.mortals.xhx.module.matter.web; ...@@ -3,14 +3,19 @@ package com.mortals.xhx.module.matter.web;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol; import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.key.ParamKey; import com.mortals.xhx.common.key.ParamKey;
import com.mortals.xhx.module.datum.model.DatumCategoryEntity;
import com.mortals.xhx.module.datum.service.DatumCategoryService;
import com.mortals.xhx.module.datum.web.DatumCategoryController;
import com.mortals.xhx.module.matter.model.MatterEntity; import com.mortals.xhx.module.matter.model.MatterEntity;
import com.mortals.xhx.module.matter.service.MatterService; import com.mortals.xhx.module.matter.service.MatterService;
import com.mortals.xhx.module.sample.model.SampleBillEntity; import com.mortals.xhx.module.sample.model.SampleBillEntity;
import com.mortals.xhx.module.sample.service.SampleBillService; import com.mortals.xhx.module.sample.service.SampleBillService;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
...@@ -51,6 +56,10 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -51,6 +56,10 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
private SampleBillService sampleBillService; private SampleBillService sampleBillService;
@Autowired @Autowired
private MatterService matterService; private MatterService matterService;
@Autowired
private DatumCategoryController datumCategoryController;
@Autowired
private DatumCategoryService datumCategoryService;
public MatterDatumController() { public MatterDatumController() {
super.setModuleDesc("事项申请材料"); super.setModuleDesc("事项申请材料");
...@@ -65,6 +74,16 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -65,6 +74,16 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
@Override @Override
protected void doListBefore(MatterDatumEntity query, Map<String, Object> model, Context context) throws AppException { protected void doListBefore(MatterDatumEntity query, Map<String, Object> model, Context context) throws AppException {
if (!ObjectUtils.isEmpty(query.getCategoryId())) {
//调用 查询
DatumCategoryEntity datumCategory = new DatumCategoryEntity();
datumCategory.setCategoryId(query.getCategoryId());
PageInfo pageInfo = this.buildPageInfo(query);
List<Long> materialIdList = datumCategoryService.find(datumCategory, pageInfo, context).getList().stream().map(i -> i.getMaterialId()).collect(Collectors.toList());
if (!ObjectUtils.isEmpty(materialIdList)) {
query.setIdList(materialIdList);
}
}
List<OrderCol> orderColList = new ArrayList<>(); List<OrderCol> orderColList = new ArrayList<>();
orderColList.add(new OrderCol("isRecommend", OrderCol.DESCENDING)); orderColList.add(new OrderCol("isRecommend", OrderCol.DESCENDING));
orderColList.add(new OrderCol("sort", OrderCol.DESCENDING)); orderColList.add(new OrderCol("sort", OrderCol.DESCENDING));
...@@ -102,7 +121,6 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -102,7 +121,6 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
} }
@RequestMapping(value = {"recommend"}, method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = {"recommend"}, method = {RequestMethod.POST, RequestMethod.GET})
public String recommend(Long id, Long siteId) { public String recommend(Long id, Long siteId) {
Map<String, Object> model = new HashMap(); Map<String, Object> model = new HashMap();
...@@ -132,7 +150,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -132,7 +150,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
sampleBillEntity.setSiteId(entity.getSiteId()); sampleBillEntity.setSiteId(entity.getSiteId());
sampleBillEntity.setMaterialName(entity.getMaterialName()); sampleBillEntity.setMaterialName(entity.getMaterialName());
if(!ObjectUtils.isEmpty(entity.getMatterId())){ if (!ObjectUtils.isEmpty(entity.getMatterId())) {
MatterEntity matterEntity = matterService.get(entity.getMatterId()); MatterEntity matterEntity = matterService.get(entity.getMatterId());
sampleBillEntity.setMatterName(matterEntity.getMatterName()); sampleBillEntity.setMatterName(matterEntity.getMatterName());
sampleBillEntity.setMatterFullName(matterEntity.getMatterFullName()); sampleBillEntity.setMatterFullName(matterEntity.getMatterFullName());
...@@ -140,7 +158,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat ...@@ -140,7 +158,7 @@ public class MatterDatumController extends BaseCRUDJsonBodyMappingController<Mat
sampleBillEntity.setMatterFullName(entity.getMatterName()); sampleBillEntity.setMatterFullName(entity.getMatterName());
sampleBillEntity.setOperTime(new Date()); sampleBillEntity.setOperTime(new Date());
sampleBillService.save(sampleBillEntity,context); sampleBillService.save(sampleBillEntity, context);
return super.infoAfter(id, model, entity, context); return super.infoAfter(id, model, entity, context);
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment