| | |
| | | import com.vci.ubcs.code.service.MdmIOService; |
| | | import com.vci.ubcs.code.vo.pagemodel.*; |
| | | import com.vci.ubcs.starter.annotation.VciBusinessLog; |
| | | import com.vci.ubcs.starter.revision.model.BaseModel; |
| | | import com.vci.ubcs.starter.util.LocalFileUtil; |
| | | import com.vci.ubcs.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.ubcs.starter.web.pagemodel.DataGrid; |
| | |
| | | import com.vci.ubcs.starter.web.util.LangBaseUtil; |
| | | import com.vci.ubcs.starter.web.util.VciBaseUtil; |
| | | import io.swagger.annotations.Api; |
| | | import lombok.AllArgsConstructor; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springblade.core.tool.api.R; |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | @GetMapping("/downloadImportExcel") |
| | | @VciBusinessLog(operateName = "下载批量申请编码的导入模板") |
| | | public void downloadImportExcel(String codeClassifyOid, HttpServletResponse response) throws IOException{ |
| | | // String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); |
| | | // try { |
| | | // ControllerUtil.writeFileToResponse(response,excelName); |
| | | // } catch (Throwable e) { |
| | | // //如果出错,把错误信息写到text |
| | | // String msg = LangBaseUtil.getErrorMsg(e); |
| | | // if(StringUtils.isBlank(msg)){ |
| | | // msg = "未知错误"; |
| | | // } |
| | | // ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | // } |
| | | String excelName = mdmIOService.createImportExcel(codeClassifyOid,false); |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,excelName); |
| | | } catch (Throwable e) { |
| | | //如果出错,把错误信息写到text |
| | | String msg = LangBaseUtil.getErrorMsg(e); |
| | | if(StringUtils.isBlank(msg)){ |
| | | msg = "未知错误"; |
| | | } |
| | | ControllerUtil.writeDataToResponse(response,msg.getBytes(StandardCharsets.UTF_8),null); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @PostMapping("/addSaveCode") |
| | | @VciBusinessLog(operateName = "申请单个编码") |
| | | public R addSaveCode(@RequestBody CodeOrderDTO orderDTO){ |
| | | public R addSaveCode(@RequestBody CodeOrderDTO orderDTO) throws Exception { |
| | | return R.success(engineService.addSaveCode(orderDTO)); |
| | | } |
| | | |
| | |
| | | public MdmUIInfoVO getUIInfoByClassifyOid(String codeClassifyOid,String functionId){ |
| | | return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/thisistest") |
| | | @ResponseBody |
| | | public List<BaseModel> thisistest(String codeClassifyOid, String functionId) throws Exception { |
| | | return engineService.selectByTypeAndOid("wupin", "b1511bb3-a773-43e2-ac85-a7fde7314a0f,3e08970024835e69f6c2b2ecd90c48c3,582ff205-0dfb-43e0-8223-e772ff1851ab,db0400fe-cc90-4d9d-8da7-1edf06b1481b"); |
| | | // return engineService.getUIInfoByClassifyOid(codeClassifyOid,functionId); |
| | | } |
| | | } |