diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java index 693b7dd..155cbf6 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java @@ -8,6 +8,7 @@ import com.hxhq.business.dto.gyzj.ListDto; import com.hxhq.business.dto.sj.SjListDto; import com.hxhq.business.enums.NormalEnum; import com.hxhq.business.enums.SnTypeEnum; +import com.hxhq.business.form.common.GenSnForm; import com.hxhq.business.form.common.SignForm; import com.hxhq.business.form.gsp.GspSearchListForm; import com.hxhq.business.form.gyzj.SearchForm; @@ -90,6 +91,20 @@ public class PublicController extends BaseController { } /** + * 获取编号(数组) + * @param preList + * @return + */ + @PostMapping("/getSnArr") + public AjaxResult getSnArr(@RequestBody List preList) { + List list = new ArrayList<>(); + for(GenSnForm pre : preList){ + list.add(snGenService.getNewSn(pre.getPre(),pre.getType())); + } + return AjaxResult.success(list); + } + + /** * 试验区域-饲养间列表 * * @return diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/common/GenSnForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/common/GenSnForm.java new file mode 100644 index 0000000..68bfa9d --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/common/GenSnForm.java @@ -0,0 +1,31 @@ +package com.hxhq.business.form.common; + +/** + * @author memory + */ +public class GenSnForm { + /** + * 前缀 + */ + private String pre; + /** + * 类型 + */ + private Integer type; + + public String getPre() { + return pre; + } + + public void setPre(String pre) { + this.pre = pre; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } +}