|
|
|
@ -10,15 +10,22 @@ import org.jeecg.common.api.vo.Result; |
|
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
import org.jeecg.common.system.base.controller.JeecgController; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.modules.demo.base.entity.ZyClothsComponent; |
|
|
|
|
import org.jeecg.modules.demo.base.entity.ZyClothsModularCompent; |
|
|
|
|
import org.jeecg.modules.demo.base.mapper.ZyClothsComponentMapper; |
|
|
|
|
import org.jeecg.modules.demo.base.service.IZyClothsComponentService; |
|
|
|
|
import org.jeecg.modules.demo.base.service.IZyClothsModularCompentService; |
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.util.NumberUtils; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.servlet.ModelAndView; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import java.util.Arrays; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @Description: 制衣模块部件中间表 |
|
|
|
@ -33,6 +40,8 @@ import java.util.Arrays; |
|
|
|
|
public class ZyClothsModularCompentController extends JeecgController<ZyClothsModularCompent, IZyClothsModularCompentService> { |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsModularCompentService zyClothsModularCompentService; |
|
|
|
|
@Autowired |
|
|
|
|
IZyClothsComponentService zyClothsComponentService; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
@ -53,6 +62,16 @@ public class ZyClothsModularCompentController extends JeecgController<ZyClothsMo |
|
|
|
|
QueryWrapper<ZyClothsModularCompent> queryWrapper = QueryGenerator.initQueryWrapper(zyClothsModularCompent, req.getParameterMap()); |
|
|
|
|
Page<ZyClothsModularCompent> page = new Page<ZyClothsModularCompent>(pageNo, pageSize); |
|
|
|
|
IPage<ZyClothsModularCompent> pageList = zyClothsModularCompentService.page(page, queryWrapper); |
|
|
|
|
List<ZyClothsModularCompent> records = pageList.getRecords(); |
|
|
|
|
Pattern pattern = Pattern.compile("-?[0-9]+(\\.[0-9]+)?"); |
|
|
|
|
for (ZyClothsModularCompent s : records) { |
|
|
|
|
String partsName = s.getPartsName(); |
|
|
|
|
if (pattern.matcher(partsName).matches()){ |
|
|
|
|
ZyClothsComponent byId = zyClothsComponentService.getById(partsName); |
|
|
|
|
s.setPartsName(byId.getPartsName()) ; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|