| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.core.exceptions.MybatisPlusException; |
| | | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| | | import com.baomidou.mybatisplus.generator.FastAutoGenerator; |
| | | import com.baomidou.mybatisplus.generator.config.*; |
| | | import com.baomidou.mybatisplus.generator.config.converts.MySqlTypeConvert; |
| | | import com.baomidou.mybatisplus.generator.config.po.TableField; |
| | | import com.baomidou.mybatisplus.generator.config.rules.DbColumnType; |
| | | import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; |
| | | import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; |
| | | import com.baomidou.mybatisplus.generator.fill.Column; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.Scanner; |
| | | |
| | | // æ¼ç¤ºä¾åï¼æ§è¡ main æ¹æ³æ§å¶å°è¾å
¥æ¨¡å表åå车èªå¨çæå¯¹åºé¡¹ç®ç®å½ä¸ |
| | | public class CodeGenerator { |
| | | |
| | | public static String database_url = "jdbc:mysql://127.0.0.1:3306/product-inventory-management"; |
| | | public static String database_username = "root"; |
| | | public static String database_password= "123456"; |
| | | public static String author = "è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸"; |
| | | public static String model = "quality"; // 模å |
| | | public static String setParent = "com.ruoyi."+ model; // å
è·¯å¾ |
| | | public static String tablePrefix = ""; // è®¾ç½®è¿æ»¤è¡¨åç¼ |
| | | public static void main(String[] args) { |
| | | String projectPath = System.getProperty("user.dir"); |
| | | FastAutoGenerator.create(database_url, database_username, database_password) |
| | | // å
¨å±é
ç½® |
| | | .globalConfig(builder -> { |
| | | builder.author(author) // 设置ä½è
|
| | | .commentDate("yyyy-MM-dd hh:mm:ss") //æ³¨éæ¥æ |
| | | .outputDir(projectPath + "/src/main/java") // æå®è¾åºç®å½ |
| | | .disableOpenDir() //ç¦æ¢æå¼è¾åºç®å½ï¼é»è®¤æå¼ |
| | | .enableSwagger() // å¼å¯swagger |
| | | |
| | | ; |
| | | }) |
| | | // æ°æ®æºé
ç½®ï¼æ ¸å¿ï¼èªå®ä¹ç±»å转æ¢ï¼å¼ºå¶tenant_id为Longï¼ |
| | | .dataSourceConfig(builder -> { |
| | | builder.typeConvert(new MySqlTypeConvert() { |
| | | /** |
| | | * èªå®ä¹å段类åè½¬æ¢ |
| | | * @param globalConfig å
¨å±é
ç½® |
| | | * @param tableField è¡¨åæ®µä¿¡æ¯ |
| | | * @return 转æ¢åçåæ®µç±»å |
| | | */ |
| | | @Override |
| | | public DbColumnType processTypeConvert(GlobalConfig globalConfig, TableField tableField) { |
| | | // 强å¶tenant_idåæ®µç±»å为Long |
| | | if ("tenant_id".equalsIgnoreCase(tableField.getName())) { |
| | | return DbColumnType.LONG; |
| | | } |
| | | // å
¶ä»å段使ç¨é»è®¤è½¬æ¢è§å |
| | | return (DbColumnType) super.processTypeConvert(globalConfig, tableField); |
| | | } |
| | | }); |
| | | }) |
| | | // å
é
ç½® |
| | | .packageConfig(builder -> { |
| | | builder.entity("pojo"); |
| | | builder.parent(setParent) // 设置ç¶å
å |
| | | .pathInfo(Collections.singletonMap(OutputFile.xml, projectPath + "/src/main/resources/mapper/"+model)); // 设置mapperXmlçæè·¯å¾ |
| | | }) |
| | | // çç¥é
ç½® |
| | | .strategyConfig(builder -> { |
| | | builder.addInclude(scanner("表åï¼å¤ä¸ªç©ºæ ¼åå²").split(" ")) // 设置éè¦çæç表å |
| | | .addTablePrefix(tablePrefix) // è®¾ç½®è¿æ»¤è¡¨åç¼ |
| | | // Entity çç¥é
ç½® |
| | | .entityBuilder() |
| | | .enableLombok() //å¼å¯ Lombok |
| | | .naming(NamingStrategy.underline_to_camel) //æ°æ®åºè¡¨æ å°å°å®ä½çå½åçç¥ï¼ä¸åçº¿è½¬é©¼å³°å½ |
| | | .columnNaming(NamingStrategy.underline_to_camel) //æ°æ®åºè¡¨å段æ å°å°å®ä½çå½åçç¥ï¼ä¸åçº¿è½¬é©¼å³°å½ |
| | | .enableFileOverride() // è¦çå·²ç»çæçEntityæä»¶ |
| | | .logicDeleteColumnName("state") |
| | | .addTableFills( |
| | | new Column("create_time", FieldFill.INSERT), |
| | | new Column("update_time", FieldFill.INSERT_UPDATE), |
| | | new Column("create_user", FieldFill.INSERT), |
| | | new Column("update_user", FieldFill.INSERT_UPDATE), |
| | | new Column("tenant_id", FieldFill.INSERT) |
| | | ) |
| | | .idType(IdType.AUTO) // èªå¢ä¸»é® |
| | | |
| | | // Mapper çç¥é
ç½® |
| | | .mapperBuilder() |
| | | .enableFileOverride() // è¦çå·²çæMapperæä»¶ |
| | | .enableBaseResultMap() // èªå¨çæresultMap |
| | | .mapperAnnotation(org.apache.ibatis.annotations.Mapper.class) |
| | | |
| | | // Service çç¥é
ç½® |
| | | .serviceBuilder() |
| | | .formatServiceFileName("%sService") //æ ¼å¼å service æ¥å£æä»¶åç§°ï¼%sè¿è¡å¹é
表åï¼å¦ UserService |
| | | .formatServiceImplFileName("%sServiceImpl") //æ ¼å¼å service å®ç°ç±»æä»¶åç§°ï¼%sè¿è¡å¹é
表åï¼å¦ UserServiceImpl |
| | | .enableFileOverride() // è¦çå·²çææä»¶ |
| | | |
| | | // Controller çç¥é
ç½® |
| | | .controllerBuilder() |
| | | .enableFileOverride() // è¦çå·²çææä»¶ |
| | | .enableRestStyle() // å¼å¯çæ@RestController æ§å¶å¨ |
| | | ; |
| | | }) |
| | | //5ãæ¨¡æ¿å¼æ |
| | | .templateEngine(new FreemarkerTemplateEngine()) //é»è®¤ |
| | | .execute(); |
| | | } |
| | | |
| | | /** |
| | | * <p> |
| | | * è¯»åæ§å¶å°å
容 |
| | | * </p> |
| | | */ |
| | | public static String scanner(String tip) { |
| | | Scanner scanner = new Scanner(System.in); |
| | | StringBuilder help = new StringBuilder(); |
| | | help.append("请è¾å
¥" + tip + "ï¼"); |
| | | System.out.println(help.toString()); |
| | | if (scanner.hasNext()) { |
| | | String ipt = scanner.next(); |
| | | |
| | | if (StringUtils.isNotBlank(ipt)) { |
| | | return ipt; |
| | | } |
| | | } |
| | | throw new MybatisPlusException("请è¾å
¥æ£ç¡®ç" + tip + "ï¼"); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.basic.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.ProductDto; |
| | |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import com.ruoyi.sales.service.ISalesLedgerService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | private IProductService productService; |
| | | |
| | | private IProductModelService productModelService; |
| | | |
| | | |
| | | @Autowired |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | /** |
| | | * æ¥è¯¢äº§å |
| | | */ |
| | |
| | | if (ids == null || ids.length == 0) { |
| | | return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | } |
| | | // æ£æ¥æ¯å¦æéå®ååè®°å½å
³è该产å |
| | | LambdaQueryWrapper<SalesLedgerProduct> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.in(SalesLedgerProduct::getProductId, ids); |
| | | List<SalesLedgerProduct> salesLedgerProductList = salesLedgerProductService.list(queryWrapper); |
| | | if (salesLedgerProductList.size() > 0) { |
| | | return AjaxResult.error("该产ååå¨éå®/éè´è®°å½ï¼ä¸è½å é¤"); |
| | | } |
| | | return toAjax(productService.delProductByIds(ids)); |
| | | } |
| | | |
| | |
| | | if (ids == null || ids.length == 0) { |
| | | return AjaxResult.error("è¯·ä¼ å
¥è¦å é¤çID"); |
| | | } |
| | | // æ£æ¥æ¯å¦æéå®ååè®°å½å
³è该产åè§æ ¼åå· |
| | | LambdaQueryWrapper<SalesLedgerProduct> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.in(SalesLedgerProduct::getProductModelId, ids); |
| | | List<SalesLedgerProduct> salesLedgerProductList = salesLedgerProductService.list(queryWrapper); |
| | | if (salesLedgerProductList.size() > 0) { |
| | | return AjaxResult.error("该产åè§æ ¼åå·åå¨éå®/éè´è®°å½ï¼ä¸è½å é¤"); |
| | | } |
| | | return toAjax(productModelService.delProductModel(ids)); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.collaborativeApproval.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.dto.NoticeDTO; |
| | | import com.ruoyi.collaborativeApproval.pojo.Notice; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | public class NoticeController extends BaseController { |
| | | |
| | | private final NoticeService noticeService; |
| | | private final ISysNoticeService sysNoticeService; |
| | | |
| | | @GetMapping("/page") |
| | | @Log(title = "å页æ¥è¯¢", businessType = BusinessType.OTHER) |
| | |
| | | @Log(title = "æ°å¢", businessType = BusinessType.INSERT) |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody NoticeDTO noticeDTO){ |
| | | if (noticeDTO.getStatus()==1){ |
| | | //æ£å¼åå¸éç¥ææäººçæ¶æ¯éç¥ |
| | | sysNoticeService.simpleNoticeAll("éç¥å
Œ", |
| | | noticeDTO.getTitle(), |
| | | noticeDTO.getTenantId(), |
| | | "/collaborativeApproval/noticeManagement?type="+noticeDTO.getType()); |
| | | } |
| | | return AjaxResult.success(noticeService.save(noticeDTO)); |
| | | } |
| | | |
| | |
| | | @Log(title = "ä¿®æ¹", businessType = BusinessType.UPDATE) |
| | | @ApiOperation("ä¿®æ¹") |
| | | public AjaxResult update(@RequestBody NoticeDTO noticeDTO){ |
| | | if (ObjectUtils.isNotNull(noticeDTO.getStatus()) && noticeDTO.getStatus()==1){ |
| | | Notice notice = noticeService.getById(noticeDTO.getId()); |
| | | //æ£å¼åå¸éç¥ææäººçæ¶æ¯éç¥ |
| | | sysNoticeService.simpleNoticeAll("éç¥å
Œ", |
| | | notice.getTitle(), |
| | | notice.getTenantId(), |
| | | "/collaborativeApproval/noticeManagement?type="+notice.getType()); |
| | | } |
| | | return AjaxResult.success(noticeService.updateById(noticeDTO)); |
| | | } |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.dto.SupplierManageDto; |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeTypeService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 09:57:56 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/noticeType") |
| | | public class NoticeTypeController { |
| | | |
| | | @Autowired |
| | | private NoticeTypeService noticeTypeService; |
| | | |
| | | /** |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤æ°å¢ |
| | | * @param noticeType |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody NoticeType noticeType) { |
| | | return AjaxResult.success(noticeTypeService.save(noticeType)); |
| | | } |
| | | |
| | | /** |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delNoticeType(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | return AjaxResult.success(noticeTypeService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public AjaxResult noticeTypeList() { |
| | | return AjaxResult.success(noticeTypeService.list()); |
| | | } |
| | | |
| | | } |
| | |
| | | @PostMapping("/add") |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody RulesRegulationsManagement rulesRegulationsManagement){ |
| | | return AjaxResult.success(rulesRegulationsManagementService.save(rulesRegulationsManagement)); |
| | | rulesRegulationsManagementService.save(rulesRegulationsManagement); |
| | | return AjaxResult.success(rulesRegulationsManagement.getId()); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityInspectFile; |
| | | import com.ruoyi.quality.service.IQualityInspectFileService; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * è§ç« å¶åº¦ç®¡ç--éä»¶ å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 01:06:41 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/rulesRegulationsManagementFile") |
| | | public class RulesRegulationsManagementFileController { |
| | | |
| | | @Resource |
| | | private RulesRegulationsManagementFileService rulesRegulationsManagementFileService; |
| | | |
| | | |
| | | /** |
| | | * æ°å¢ |
| | | * @param rulesRegulationsManagementFile |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody RulesRegulationsManagementFile rulesRegulationsManagementFile) { |
| | | return AjaxResult.success(rulesRegulationsManagementFileService.save(rulesRegulationsManagementFile)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityUnqualified(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | //å 餿£éªéä»¶ |
| | | return AjaxResult.success(rulesRegulationsManagementFileService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *å页æ¥è¯¢ |
| | | * @param page |
| | | * @param rulesRegulationsManagementFile |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult listPage(Page page, RulesRegulationsManagementFile rulesRegulationsManagementFile) { |
| | | return AjaxResult.success(rulesRegulationsManagementFileService.listPage(page, rulesRegulationsManagementFile)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.project.system.service.ISysNoticeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @AllArgsConstructor |
| | |
| | | @Autowired |
| | | private SealApplicationManagementService sealApplicationManagementService; |
| | | |
| | | @Autowired |
| | | private ISysNoticeService sysNoticeService; |
| | | |
| | | @GetMapping("/getList") |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | public AjaxResult listPage(Page page, SealApplicationManagement sealApplicationManagement){ |
| | |
| | | @PostMapping("/add") |
| | | @ApiOperation("æ°å¢") |
| | | public AjaxResult add(@RequestBody SealApplicationManagement sealApplicationManagement){ |
| | | return AjaxResult.success(sealApplicationManagementService.save(sealApplicationManagement)); |
| | | sealApplicationManagementService.save(sealApplicationManagement); |
| | | //æ¶æ¯éç¥ |
| | | sysNoticeService.simpleNoticeByUser("ç¨å°å®¡æ¹", |
| | | "ç³è¯·ç¼å·ï¼"+sealApplicationManagement.getApplicationNum()+"\n" |
| | | +"ç³è¯·æ é¢ï¼"+sealApplicationManagement.getTitle(), |
| | | Arrays.asList(sealApplicationManagement.getApproveUserId()), |
| | | sealApplicationManagement.getTenantId(), |
| | | "/collaborativeApproval/sealManagement?applicationNum="+sealApplicationManagement.getApplicationNum()); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @PostMapping("/update") |
| | |
| | | private String createUserName; |
| | | //æå±é¨é¨ |
| | | private String department; |
| | | |
| | | //审æ¹äºº |
| | | private String approveUserName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.mapper; |
| | | |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 09:57:56 |
| | | */ |
| | | public interface NoticeTypeMapper extends BaseMapper<NoticeType> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * è§ç« å¶åº¦ç®¡ç--éä»¶ Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 01:06:41 |
| | | */ |
| | | @Mapper |
| | | public interface RulesRegulationsManagementFileMapper extends BaseMapper<RulesRegulationsManagementFile> { |
| | | |
| | | IPage<RulesRegulationsManagementFile> listPage(Page page, @Param("c") RulesRegulationsManagementFile rulesRegulationsManagementFile); |
| | | } |
| | |
| | | private String title; |
| | | |
| | | /** |
| | | * å
¬åç±»åï¼1æ¾åéç¥ 2设å¤ç»´ä¿®éç¥ï¼ |
| | | * å
¬åç±»å |
| | | */ |
| | | @ApiModelProperty("å
¬åç±»åï¼1æ¾åéç¥ 2设å¤ç»´ä¿®éç¥ï¼") |
| | | @ApiModelProperty("å
¬åç±»å") |
| | | private String type; |
| | | |
| | | /** |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 09:57:56 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("notice_type") |
| | | @ApiModel(value = "NoticeType对象", description = "éç¥å
¬åçå
¬åç±»åç»´æ¤") |
| | | public class NoticeType implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("éç¥å
¬åçå
¬åç±»å") |
| | | private String noticeType; |
| | | |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * è§ç« å¶åº¦ç®¡ç--éä»¶ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 01:06:41 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("rules_regulations_management_file") |
| | | @ApiModel(value = "RulesRegulationsManagementFile对象", description = "è§ç« å¶åº¦ç®¡ç--éä»¶") |
| | | public class RulesRegulationsManagementFile implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("æä»¶åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("æä»¶è·¯å¾") |
| | | private String url; |
| | | |
| | | @ApiModelProperty("æä»¶å¤§å°") |
| | | private Integer fileSize; |
| | | |
| | | @ApiModelProperty("è§ç« å¶åº¦ID") |
| | | private Integer rulesRegulationsManagementId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
| | |
| | | * ç¨å°ç±»å |
| | | */ |
| | | @ApiModelProperty("ç¨å°ç±»å") |
| | | @Excel(name = "ç¨å°ç±»å", readConverterExp = "official=å
¬ç« ,contract=ååä¸ç¨ç« ,finance=è´¢å¡ä¸ç¨ç« ,legal=æªç¥") |
| | | @Excel(name = "ç¨å°ç±»å", readConverterExp = "official=å
¬ç« ,contract=ååä¸ç¨ç« ,finance=è´¢å¡ä¸ç¨ç« ,legal=æ³äººç« ") |
| | | private String sealType; |
| | | /** |
| | | * ç³è¯·ç¨å°åå |
| | |
| | | @ApiModelProperty("ç¶æ") |
| | | @Excel(name = "ç¶æ", readConverterExp = "pending=å¾
审æ¹,approved=å·²éè¿,rejected=å·²æç»") |
| | | private String status; |
| | | |
| | | /** |
| | | * 审æ¹äºº |
| | | */ |
| | | private Long approveUserId; |
| | | /** |
| | | * å建è
|
| | | */ |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.service; |
| | | |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 09:57:56 |
| | | */ |
| | | public interface NoticeTypeService extends IService<NoticeType> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * è§ç« å¶åº¦ç®¡ç--éä»¶ æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 01:06:41 |
| | | */ |
| | | public interface RulesRegulationsManagementFileService extends IService<RulesRegulationsManagementFile> { |
| | | |
| | | IPage<RulesRegulationsManagementFile> listPage(Page page, RulesRegulationsManagementFile rulesRegulationsManagementFile); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.service.impl; |
| | | |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.ruoyi.collaborativeApproval.mapper.NoticeTypeMapper; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeTypeService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * éç¥å
¬åçå
¬åç±»åç»´æ¤ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 09:57:56 |
| | | */ |
| | | @Service |
| | | public class NoticeTypeServiceImpl extends ServiceImpl<NoticeTypeMapper, NoticeType> implements NoticeTypeService { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.collaborativeApproval.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile; |
| | | import com.ruoyi.collaborativeApproval.mapper.RulesRegulationsManagementFileMapper; |
| | | import com.ruoyi.collaborativeApproval.service.RulesRegulationsManagementFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.management.Query; |
| | | |
| | | /** |
| | | * <p> |
| | | * è§ç« å¶åº¦ç®¡ç--éä»¶ æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 01:06:41 |
| | | */ |
| | | @Service |
| | | public class RulesRegulationsManagementFileServiceImpl extends ServiceImpl<RulesRegulationsManagementFileMapper, RulesRegulationsManagementFile> implements RulesRegulationsManagementFileService { |
| | | |
| | | @Autowired |
| | | private RulesRegulationsManagementFileMapper rulesRegulationsManagementFileMapper; |
| | | |
| | | @Override |
| | | public IPage<RulesRegulationsManagementFile> listPage(Page page, RulesRegulationsManagementFile rulesRegulationsManagementFile) { |
| | | return rulesRegulationsManagementFileMapper.listPage(page, rulesRegulationsManagementFile); |
| | | } |
| | | } |
| | |
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.Map;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableField;
|
| | | import com.fasterxml.jackson.annotation.JsonFormat;
|
| | | import com.fasterxml.jackson.annotation.JsonIgnore;
|
| | | import com.fasterxml.jackson.annotation.JsonInclude;
|
| | |
|
| | | /**
|
| | | * Entityåºç±»
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public class BaseEntity implements Serializable
|
| | |
| | |
|
| | | /** æç´¢å¼ */
|
| | | @JsonIgnore
|
| | | @TableField(exist = false)
|
| | | private String searchValue;
|
| | |
|
| | | /** å建è
*/
|
| | |
| | |
|
| | | /** 请æ±åæ° */
|
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
| | | @TableField(exist = false)
|
| | | private Map<String, Object> params;
|
| | |
|
| | | public String getSearchValue()
|
| | |
| | | // æ¹éæ¥è¯¢ç»è®°äºº |
| | | Map<Long, SysUser> sysUserMap; |
| | | if (!registrantIds.isEmpty()) { |
| | | List<SysUser> sysUsers = sysUserMapper.selectList(registrantIds); |
| | | List<SysUser> sysUsers = sysUserMapper.selectRegistrantIds(registrantIds); |
| | | sysUserMap = sysUsers.stream().collect(Collectors.toMap(SysUser::getUserId, Function.identity())); |
| | | } else { |
| | | sysUserMap = new HashMap<>(); |
| | |
| | | */ |
| | | private String customerName; |
| | | |
| | | private String salesLedgerProductId; |
| | | private Long salesLedgerProductId; |
| | | |
| | | /** |
| | | * åºå
¥åºæ°é |
| | |
| | | IPage<ProcurementPageDto> listPageByProduction(Page page, @Param("req") ProcurementPageDto procurementDto); |
| | | |
| | | IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, @Param("req") ProcurementPageDto procurementDto); |
| | | |
| | | IPage<ProcurementPageDtoCopy> listPagePRS(Page page, @Param("req") ProcurementPageDto procurementDto); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<ProcurementPageDtoCopy> listPageCopyByProduction(Page page, ProcurementPageDto procurementDto) { |
| | | IPage<ProcurementPageDtoCopy> procurementPageDtoCopyIPage = procurementRecordMapper.listPageCopyByProduction(page, procurementDto); |
| | | IPage<ProcurementPageDtoCopy> procurementPageDtoCopyIPage = procurementRecordMapper.listPagePRS(page, procurementDto); |
| | | List<ProcurementPageDtoCopy> procurementPageDtoCopyList = procurementPageDtoCopyIPage.getRecords(); |
| | | // 计ç®å¾
å
¥åºæ°é |
| | | // æ¥è¯¢éè´è®°å½å·²å
¥åºæ°é |
| | |
| | | if(CollectionUtils.isEmpty( collect)){ |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | | LambdaQueryWrapper<ProcurementRecordOut> procurementRecordLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | procurementRecordLambdaQueryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | procurementRecordLambdaQueryWrapper.eq(ProcurementRecordOut::getType, 2); |
| | | List<ProcurementRecordOut> procurementRecords = procurementRecordOutMapper.selectList(procurementRecordLambdaQueryWrapper); |
| | | if(CollectionUtils.isEmpty( procurementRecords)){ |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | | // 1. æ¥è¯¢éè´è®°å½å·²å
¥åºçåºåºè®°å½ï¼æstorageIdåç»ï¼ |
| | | LambdaQueryWrapper<ProcurementRecordOut> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.in(ProcurementRecordOut::getProcurementRecordStorageId, collect); |
| | | List<ProcurementRecordOut> recordOutList = procurementRecordOutMapper.selectList(queryWrapper); |
| | | |
| | | // 2. æSalesLedgerProductIdåç»ï¼ç»è®¡æ¯ä¸ªid对åºçå·²åºåºæ°éæ»å-å·²åºåºæ°é |
| | | Map<Integer, BigDecimal> storageIdToTotalOutNumMap = recordOutList.stream() |
| | | .collect(Collectors.groupingBy( |
| | | ProcurementRecordOut::getSalesLedgerProductId, |
| | | Collectors.reducing( |
| | | BigDecimal.ZERO, |
| | | ProcurementRecordOut::getInboundNum, |
| | | (a, b) -> a.add(b == null ? BigDecimal.ZERO : b) |
| | | ) |
| | | )); |
| | | // 2. procurementPageDtoCopyListæSalesLedgerProductIdåç»ï¼ç»è®¡æ¯ä¸ªid对åºçå·²åºåºæ°éæ»å-å
¥åºåºæ°é |
| | | Map<Long, BigDecimal> storageIdToTotalintNumMap = procurementPageDtoCopyList.stream() |
| | | .collect(Collectors.groupingBy( |
| | | ProcurementPageDtoCopy::getSalesLedgerProductId, |
| | | Collectors.reducing( |
| | | BigDecimal.ZERO, |
| | | ProcurementPageDtoCopy::getInboundNum, |
| | | (a, b) -> a.add(b == null ? BigDecimal.ZERO : b) |
| | | ) |
| | | )); |
| | | // 3. 循ç¯ç»dtoèµå¼ |
| | | for (ProcurementPageDtoCopy dto : procurementPageDtoCopyList) { |
| | | // æ ¹æ®éè´å°è´¦IDçé对åºçåºåºè®°å½ |
| | | List<ProcurementRecordOut> collect1 = procurementRecords.stream() |
| | | .filter(ProcurementRecordOut -> ProcurementRecordOut.getProcurementRecordStorageId().equals(dto.getId())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | // å¦ææ²¡æç¸å
³çåºåºè®°å½ï¼è·³è¿è¯¥æ¡æ°æ® |
| | | if(CollectionUtils.isEmpty(collect1)){ |
| | | dto.setInboundNum0(dto.getInboundNum()); |
| | | dto.setTotalInboundNum(BigDecimal.ZERO); |
| | | continue; |
| | | } |
| | | |
| | | // 计ç®å·²åºåºæ°éæ»åï¼å¹¶è®¾ç½®å¾
åºåºæ°é |
| | | BigDecimal totalInboundNum = collect1.stream() |
| | | .map(ProcurementRecordOut::getInboundNum) |
| | | .reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | // åºåºæ°é = æ»æ°é - å¾
åºåºæ°é |
| | | Integer storageId = dto.getId(); |
| | | Integer salesLedgerProductId = Integer.valueOf(Math.toIntExact(dto.getSalesLedgerProductId())); |
| | | // è·åå½åsalesLedgerProductId对åºçå·²åºåºæ»æ°ï¼é»è®¤0ï¼ |
| | | BigDecimal totalInboundNum = storageIdToTotalOutNumMap.getOrDefault(salesLedgerProductId, BigDecimal.ZERO); |
| | | // å·²åºåºæ°é |
| | | dto.setTotalInboundNum(totalInboundNum); |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°é |
| | | dto.setInboundNum0(dto.getInboundNum().subtract(totalInboundNum)); |
| | | // åºåä»·å¼ |
| | | if(dto.getUnitPrice() != null){ |
| | | dto.setTotalPrice(dto.getTotalInboundNum().multiply(dto.getUnitPrice())); |
| | | } |
| | | // å¾
åºåºæ°é = æ»æ°é - å·²åºåºæ°éï¼æ»æ°é空å¼åé»è®¤0ï¼ |
| | | // BigDecimal totalNum = dto.getInboundNum() == null ? BigDecimal.ZERO : dto.getInboundNum(); |
| | | BigDecimal totalNum = storageIdToTotalintNumMap.getOrDefault(salesLedgerProductId, BigDecimal.ZERO); |
| | | dto.setInboundNum(totalNum); |
| | | dto.setInboundNum0(totalNum.subtract(totalInboundNum)); |
| | | |
| | | // åºåä»·å¼ = å·²åºåºæ°é * åä»·ï¼å价空å¼åé»è®¤0ï¼ |
| | | BigDecimal unitPrice = dto.getUnitPrice() == null ? BigDecimal.ZERO : dto.getUnitPrice(); |
| | | dto.setTotalPrice(totalInboundNum.multiply(unitPrice)); |
| | | } |
| | | return procurementPageDtoCopyIPage; |
| | | } |
| | |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityInspectParamMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | private ProductMapper productMapper; |
| | | |
| | | private QualityTestStandardMapper qualityTestStandardMapper; |
| | | private QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | |
| | | private QualityInspectParamMapper qualityInspectParamMapper; |
| | | |
| | |
| | | qualityInspect.setProductMainId(productionProductMain.getId()); |
| | | qualityInspectMapper.insert(qualityInspect); |
| | | |
| | | qualityTestStandardMapper.selectList( |
| | | new LambdaQueryWrapper<QualityTestStandard>() |
| | | .eq(QualityTestStandard::getProductId, product.getId()) |
| | | ).forEach(standard -> { |
| | | QualityInspectParam param = new QualityInspectParam(); |
| | | BeanUtils.copyProperties(standard, param); |
| | | param.setId(null); |
| | | param.setInspectId(qualityInspect.getId()); |
| | | qualityInspectParamMapper.insert(param); |
| | | }); |
| | | List<QualityTestStandardParam> qualityTestStandardParams = qualityTestStandardParamMapper.selectListByProductId(product.getId()); |
| | | if (qualityTestStandardParams.size()>0) { |
| | | qualityTestStandardParams.forEach(standard -> { |
| | | QualityInspectParam param = new QualityInspectParam(); |
| | | BeanUtils.copyProperties(standard, param); |
| | | param.setId(null); |
| | | param.setInspectId(qualityInspect.getId()); |
| | | qualityInspectParamMapper.insert(param); |
| | | }); |
| | | } |
| | | } |
| | | // æ·»å æå
¥ |
| | | if (productModel != null) { |
| | |
| | |
|
| | | /**
|
| | | * ç¨æ·å¯¹è±¡ sys_user
|
| | | * |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public class SysUser extends BaseEntity
|
| | |
| | | @Excel(name = "é¨é¨åç§°", targetAttr = "deptName", type = Type.EXPORT),
|
| | | @Excel(name = "é¨é¨è´è´£äºº", targetAttr = "leader", type = Type.EXPORT)
|
| | | })
|
| | | @TableField(exist = false)
|
| | | private SysDept dept;
|
| | |
|
| | | /** è§è²å¯¹è±¡ */
|
| | | @TableField(exist = false)
|
| | | private List<SysRole> roles;
|
| | |
|
| | | /** è§è²ç» */
|
| | | @TableField(exist = false)
|
| | | private Long[] roleIds;
|
| | |
|
| | | /** å²ä½ç» */
|
| | | @TableField(exist = false)
|
| | | private Long[] postIds;
|
| | |
|
| | | /** è§è²ID */
|
| | | @TableField(exist = false)
|
| | | private Long roleId;
|
| | |
|
| | | /** ç§æ·ID */
|
| | | private Long tenantId;
|
| | |
|
| | | @TableField(exist = false)
|
| | | private Long[] deptIds;
|
| | |
|
| | | @TableField(exist = false)
|
| | | private Long deptId;
|
| | |
|
| | | @TableField(exist = false)
|
| | | private Long currentDeptId;
|
| | |
|
| | | /** å½åç»å½å
¬å¸ */
|
| | | @TableField(exist = false)
|
| | | private String currentFactoryName;
|
| | |
|
| | | public String getCurrentFactoryName() {
|
| | |
| | | /**
|
| | | * é¨é¨åç§°
|
| | | */
|
| | | @TableField(exist = false)
|
| | | private String deptNames;
|
| | |
|
| | | public Long getCurrentDeptId() {
|
| | |
| | | .append("updateBy", getUpdateBy())
|
| | | .append("updateTime", getUpdateTime())
|
| | | .append("remark", getRemark())
|
| | | .append("dept", getDept())
|
| | | .toString();
|
| | | }
|
| | | }
|
| | |
| | | */
|
| | | public SysUser checkEmailUnique(String email);
|
| | |
|
| | | List<SysUser> selectList(List<Long> registrantIds);
|
| | | List<SysUser> selectRegistrantIds(List<Long> registrantIds);
|
| | |
|
| | | List<SysUser> selectUsersByIds(@Param("userIds") List<Long> userIds);
|
| | |
|
| | |
| | | int readAll();
|
| | |
|
| | | /**
|
| | | * éè¿è§è² åéæé
|
| | | * @param title æ é¢
|
| | | * @param message å
容
|
| | | * @param needPushRoles åéçè§è²
|
| | | * @param jumpPath 跳转å°å
|
| | | */
|
| | | void simpleNoticeByRoles(final String title, final String message, final Long tenantId,final List<String> needPushRoles,
|
| | | final String jumpPath);
|
| | |
|
| | | /**
|
| | | * éè¿æé åéæé
|
| | | * @param title æ é¢
|
| | | * @param message æ¶æ¯
|
| | | * @param needPerms åéçæéè
å·²å
å«ä¸çº§
|
| | | * @param jumpPath 跳转å°å
|
| | | */
|
| | | void simpleNoticeByPerms(final String title, final String message, final Long tenantId,final List<String> needPerms,
|
| | | final String jumpPath);
|
| | |
|
| | | /**
|
| | | * éè¿æå®äººåéæé
|
| | | * @param title æ é¢
|
| | | * @param message æ¶æ¯
|
| | |
| | | */
|
| | | void simpleNoticeAll(final String title, final String message,final Long tenantId,final String jumpPath);
|
| | |
|
| | | void insertBatch(final List<SysNotice> notices);
|
| | | }
|
| | |
| | | import java.util.Map;
|
| | | import java.util.Objects;
|
| | | import java.util.stream.Collectors;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.github.xiaoymin.knife4j.core.util.StrUtil;
|
| | | import com.ruoyi.common.utils.SecurityUtils;
|
| | | import com.ruoyi.project.system.domain.SysUser;
|
| | | import com.ruoyi.project.system.mapper.SysUserMapper;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.context.annotation.Lazy;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void simpleNoticeByRoles(final String title, String message, Long tenantId, List<String> needPushRoles,
|
| | | final String jumpPath) {
|
| | | Long userId = SecurityUtils.getUserId();
|
| | | if (StrUtil.isBlank(message) || CollectionUtils.isEmpty(needPushRoles)) {
|
| | | return;
|
| | | }
|
| | | List<String> rolesWithAdmin = new ArrayList<>(needPushRoles);
|
| | | rolesWithAdmin.add("管çå");
|
| | | List<SysNotice> collect = rolesWithAdmin.stream()
|
| | | .flatMap(it -> userMapper.getUserByRole(it).stream())
|
| | | .map(it -> convertSysNotice(title, message, it,tenantId, jumpPath, userId))
|
| | | .collect(Collectors.toList());
|
| | | sysNoticeService.insertBatch(collect);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void simpleNoticeByPerms(String title, String message, Long tenantId, List<String> needPerms,
|
| | | String jumpPath) {
|
| | | Long userId = SecurityUtils.getLoginUser().getUserId();
|
| | | if (StrUtil.isBlank(message) || CollectionUtils.isEmpty(needPerms)) {
|
| | | return;
|
| | | }
|
| | | List<SysNotice> collect = userMapper.getUserByPerms(needPerms).stream().map(it -> convertSysNotice(title, message, it,tenantId, jumpPath, userId)).collect(Collectors.toList());
|
| | | sysNoticeService.insertBatch(collect);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void simpleNoticeByUser(String title, String message, List<Long> consigneeId, Long tenantId,
|
| | | String jumpPath) {
|
| | | Long userId = SecurityUtils.getLoginUser().getUserId();
|
| | |
| | | @Override
|
| | | public void simpleNoticeAll(String title, String message, Long tenantId,String jumpPath) {
|
| | | Long userId = SecurityUtils.getLoginUser().getUserId();
|
| | | List<SysNotice> collect = userMapper.selectList(null).stream().map(it -> convertSysNotice(title, message, it.getUserId(),tenantId, jumpPath, userId)).collect(Collectors.toList());
|
| | | List<SysUser> sysUsers = userMapper.selectList(Wrappers.<SysUser>lambdaQuery()
|
| | | .eq(SysUser::getStatus, "0")
|
| | | .eq(SysUser::getTenantId, tenantId));
|
| | | List<SysNotice> collect = sysUsers.stream().map(it -> convertSysNotice(title, message, it.getUserId(),tenantId, jumpPath, userId)).collect(Collectors.toList());
|
| | | sysNoticeService.saveBatch(collect);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void insertBatch(List<SysNotice> noticesList) {
|
| | | if(CollectionUtils.isEmpty(noticesList)){
|
| | | return;
|
| | | }
|
| | | // æé¤æèªå·±
|
| | | Long userId = SecurityUtils.getUserId();
|
| | | List<SysNotice> noticesListNew = noticesList.stream().filter(Objects::nonNull).filter(it -> !Objects.equals(it.getConsigneeId(), userId)).collect(Collectors.toList());
|
| | | sysNoticeService.saveBatch(noticesListNew);
|
| | |
|
| | | }
|
| | |
|
| | | private SysNotice convertSysNotice(String title,String message,Long consigneeId, Long tenantId,String jumpPath,Long currentUserId) {
|
| | | SysNotice sysNotice = new SysNotice();
|
| | |
| | | */ |
| | | @Log(title = "仿¬¾ç»è®°", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody PaymentRegistration paymentRegistration) { |
| | | public AjaxResult add(@RequestBody List<PaymentRegistration> paymentRegistration) { |
| | | return toAjax(paymentRegistrationService.insertPaymentRegistration(paymentRegistration)); |
| | | } |
| | | |
| | |
| | | private Long purchaseLedgerId; |
| | | |
| | | /** |
| | | * éè´è®¢å产åid |
| | | */ |
| | | private Long saleLedgerProductId; |
| | | |
| | | /** |
| | | * ä¾åºåid |
| | | */ |
| | | private Long supplierId; |
| | |
| | | /** |
| | | * ç»è®°äºº |
| | | */ |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long registrantId; |
| | | |
| | | // ç§æ·id |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | /** |
| | |
| | | * @param paymentRegistration 仿¬¾ç»è®° |
| | | * @return ç»æ |
| | | */ |
| | | public int insertPaymentRegistration(PaymentRegistration paymentRegistration); |
| | | public int insertPaymentRegistration(List<PaymentRegistration> paymentRegistration); |
| | | |
| | | /** |
| | | * ä¿®æ¹ä»æ¬¾ç»è®° |
| | |
| | | import com.ruoyi.purchase.service.IPaymentRegistrationService; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | /** |
| | | * æ°å¢ä»æ¬¾ç»è®° |
| | | * |
| | | * @param paymentRegistration 仿¬¾ç»è®° |
| | | * @param paymentRegistrationList 仿¬¾ç»è®° |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertPaymentRegistration(PaymentRegistration paymentRegistration) { |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(paymentRegistration.getPurchaseLedgerId()); |
| | | SalesLedger salesLedger = salesLedgerMapper.selectOne(new QueryWrapper<SalesLedger>(). |
| | | eq("sales_contract_no", purchaseLedger.getSalesContractNo())); |
| | | // if (salesLedger == null) { |
| | | // throw new RuntimeException("å
³èéå®ååå·ä¸åå¨"); |
| | | // } |
| | | if (salesLedger != null) { |
| | | paymentRegistration.setSaleLedgerId(salesLedger.getId()); |
| | | public int insertPaymentRegistration(List<PaymentRegistration> paymentRegistrationList) { |
| | | for (PaymentRegistration paymentRegistration : paymentRegistrationList) { |
| | | PaymentRegistration byId = paymentRegistration; |
| | | if (!ObjectUtils.isEmpty(paymentRegistration.getId())){ |
| | | paymentRegistration = this.getById(paymentRegistration.getId()); |
| | | } |
| | | PurchaseLedger purchaseLedger = purchaseLedgerMapper.selectById(paymentRegistration.getPurchaseLedgerId()); |
| | | if(null==purchaseLedger) throw new RuntimeException("æªæ¾å°éè´å"); |
| | | // 已忬¾éé¢ |
| | | SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(paymentRegistration.getSaleLedgerProductId()); |
| | | if(null==salesLedgerProduct) throw new RuntimeException("æªæ¾å°éè´å产å"); |
| | | if (salesLedgerProduct.getPendingInvoiceTotal().compareTo(paymentRegistration.getCurrentPaymentAmount())<0){ |
| | | throw new RuntimeException("æ¬æ¬¡å款éé¢ä¸è½å¤§äºå¾
忬¾éé¢"); |
| | | } |
| | | paymentRegistration.setCreateTime(DateUtils.getNowDate()); |
| | | paymentRegistration.setUpdateTime(DateUtils.getNowDate()); |
| | | salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().add(paymentRegistration.getCurrentPaymentAmount())); |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal())); |
| | | paymentRegistrationMapper.insert(paymentRegistration); |
| | | salesLedgerProductMapper.updateById(salesLedgerProduct); |
| | | } |
| | | paymentRegistration.setSupplierId(purchaseLedger.getSupplierId()); |
| | | return 1; |
| | | |
| | | TicketRegistration tr = ticketRegistrationMapper.selectOne(new LambdaQueryWrapper<TicketRegistration>().eq(TicketRegistration::getId, paymentRegistration.getTicketRegistrationId())); |
| | | |
| | | if (tr == null) { |
| | | throw new RuntimeException("å
³èå票ä¸åå¨"); |
| | | } |
| | | |
| | | List<PaymentRegistration> paymentRegistrations = paymentRegistrationMapper.selectList(new QueryWrapper<PaymentRegistration>() |
| | | .eq("ticket_registration_id", tr.getId())); |
| | | BigDecimal total = paymentRegistrations.stream().map(PaymentRegistration::getCurrentPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | if (total.add(paymentRegistration.getCurrentPaymentAmount()).compareTo(tr.getInvoiceAmount()) > 0) { |
| | | throw new RuntimeException("仿¬¾éé¢è¶
åºå票éé¢"); |
| | | } |
| | | |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | Long tenantId = loginUser.getTenantId(); |
| | | paymentRegistration.setTenantId(tenantId); |
| | | paymentRegistration.setRegistrantId(loginUser.getUserId()); |
| | | paymentRegistration.setCreateTime(DateUtils.getNowDate()); |
| | | paymentRegistration.setUpdateTime(DateUtils.getNowDate()); |
| | | return paymentRegistrationMapper.insert(paymentRegistration); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityInspectParamMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityInspectParam; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.sales.mapper.*; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.InvoiceRegistrationProduct; |
| | |
| | | private final StringRedisTemplate redisTemplate; |
| | | private final QualityInspectMapper qualityInspectMapper; |
| | | private final QualityTestStandardMapper qualityTestStandardMapper; |
| | | private final QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | private final QualityInspectParamMapper qualityInspectParamMapper; |
| | | |
| | | @Value("${file.upload-dir}") |
| | |
| | | qualityInspect.setUnit(saleProduct.getUnit()); |
| | | qualityInspect.setQuantity(saleProduct.getQuantity()); |
| | | qualityInspectMapper.insert(qualityInspect); |
| | | QualityTestStandard qualityTestStandard = new QualityTestStandard(); |
| | | qualityTestStandard.setProductId(saleProduct.getProductId()); |
| | | List<QualityTestStandard> qualityTestStandards = qualityTestStandardMapper.qualityTestStandardList(qualityTestStandard); |
| | | for (QualityTestStandard qualityTestStandardDB : qualityTestStandards) { |
| | | QualityInspectParam qualityInspectParam = new QualityInspectParam(); |
| | | qualityInspectParam.setInspectId(qualityInspect.getId()); |
| | | qualityInspectParam.setParameterItem(qualityTestStandardDB.getParameterItem()); |
| | | qualityInspectParam.setUnit(qualityTestStandardDB.getUnit()); |
| | | qualityInspectParam.setStandardValue(qualityTestStandardDB.getStandardValue()); |
| | | qualityInspectParam.setControlValue(qualityTestStandardDB.getControlValue()); |
| | | qualityInspectParamMapper.insert(qualityInspectParam); |
| | | |
| | | List<QualityTestStandardParam> qualityTestStandardParams = qualityTestStandardParamMapper.selectListByProductId(saleProduct.getProductId()); |
| | | if (qualityTestStandardParams.size()>0) { |
| | | qualityTestStandardParams.forEach(standard -> { |
| | | QualityInspectParam param = new QualityInspectParam(); |
| | | com.ruoyi.common.utils.bean.BeanUtils.copyProperties(standard, param); |
| | | param.setId(null); |
| | | param.setInspectId(qualityInspect.getId()); |
| | | qualityInspectParamMapper.insert(param); |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | LocalDateTime localDateTime = entryDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); |
| | | salesLedgerProduct.setRegisterDate(localDateTime); |
| | | salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.QualityTestStandardBindingService; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表ä¸äº§åå
³è表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:40 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/qualityTestStandardBinding") |
| | | public class QualityTestStandardBindingController { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardBindingService qualityTestStandardBindingService; |
| | | |
| | | /** |
| | | * æ°å¢æ£æµæ å主表ä¸äº§åå
³è表 |
| | | * @param qualityTestStandardBindings |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody List<QualityTestStandardBinding> qualityTestStandardBindings) { |
| | | return AjaxResult.success(qualityTestStandardBindingService.saveBatch(qualityTestStandardBindings)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£æµæ å主表ä¸äº§åå
³è表 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | return AjaxResult.success(qualityTestStandardBindingService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | *æ£æµææ ç»´æ¤æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public AjaxResult listBinding(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardBindingService.listBinding(testStandardId)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.service.IQualityTestStandardService; |
| | | import com.ruoyi.staff.pojo.StaffJoinLeaveRecord; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.ruoyi.staff.service.IStaffOnJobService; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ£æµææ ç»´æ¤ |
| | | * <p> |
| | | * æ£æµæ å主表 å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:40:24 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/quality/qualityTestStandard") |
| | | @RequestMapping("/qualityTestStandard") |
| | | public class QualityTestStandardController { |
| | | |
| | | @Resource |
| | |
| | | |
| | | |
| | | /** |
| | | * æ°å¢æ£æµææ ç»´æ¤ |
| | | * æ°å¢æ£æµæ å主表 |
| | | * @param qualityTestStandard |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * å 餿£æµææ ç»´æ¤ |
| | | * å 餿£æµæ å主表 |
| | | * @param ids |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ£æµææ ç»´æ¤è¯¦æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | public AjaxResult QualityTestStandardDetail(@PathVariable("id") Integer id) { |
| | | return AjaxResult.success(qualityTestStandardService.getById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ£æµææ ç»´æ¤ä¿®æ¹ |
| | | * æ£æµæ åä¸»è¡¨ä¿®æ¹ |
| | | * @param qualityTestStandard |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | |
| | | /** |
| | | *æ£æµææ ç»´æ¤å页æ¥è¯¢ |
| | | *æ£æµæ å主表å页æ¥è¯¢ |
| | | * @param page |
| | | * @param qualityTestStandard |
| | | * @return |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ£æµææ ç»´æ¤å¯¼åº |
| | | * @param response |
| | | * æ£æµæ åå¤å¶åæ° |
| | | * @param qualityTestStandard |
| | | */ |
| | | @PostMapping("/export") |
| | | public void qualityTestStandardListPageExport(HttpServletResponse response,QualityTestStandard qualityTestStandard) { |
| | | qualityTestStandardService.qualityTestStandardListPageExport(response, qualityTestStandard); |
| | | } |
| | | |
| | | /** |
| | | * 详æ
|
| | | * @param productId |
| | | * @return |
| | | */ |
| | | @GetMapping("/product/{productId}") |
| | | public AjaxResult QualityInspectDetail(@PathVariable("productId") Long productId) { |
| | | return AjaxResult.success(qualityTestStandardService.list(Wrappers.<QualityTestStandard>lambdaQuery().eq(QualityTestStandard::getProductId,productId))); |
| | | @PostMapping("/copyParam") |
| | | public AjaxResult copyParam(@RequestBody QualityTestStandard qualityTestStandard) { |
| | | return AjaxResult.success(qualityTestStandardService.copyParam(qualityTestStandard)); |
| | | } |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ ååæ° å端æ§å¶å¨ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:49 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/qualityTestStandardParam") |
| | | public class QualityTestStandardParamController { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardParamService qualityTestStandardParamService; |
| | | |
| | | /** |
| | | * æ°å¢æ£æµæ ååæ° |
| | | * @param qualityTestStandardParam |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.save(qualityTestStandardParam)); |
| | | } |
| | | |
| | | /** |
| | | * å 餿£æµææ ç»´æ¤ |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delQualityTestStandard(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("è¯·éæ©è³å°ä¸æ¡æ°æ®"); |
| | | } |
| | | return AjaxResult.success(qualityTestStandardParamService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | | * æ£æµææ ç»´æ¤ä¿®æ¹ |
| | | * @param qualityTestStandardParam |
| | | * @return |
| | | */ |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody QualityTestStandardParam qualityTestStandardParam) { |
| | | return AjaxResult.success(qualityTestStandardParamService.updateById(qualityTestStandardParam)); |
| | | } |
| | | |
| | | /** |
| | | *æ£æµææ ç»´æ¤æ¥è¯¢ |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | public AjaxResult list(Long testStandardId) { |
| | | return AjaxResult.success(qualityTestStandardParamService.list(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId,testStandardId))); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.pojo.QualityUnqualified; |
| | | import com.ruoyi.quality.service.IQualityTestStandardService; |
| | | import com.ruoyi.quality.service.IQualityUnqualifiedService; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | //å页忾å±ç¤ºå段 |
| | | public class QualityTestStandardBindingDto { |
| | | |
| | | private String productName; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.mapper; |
| | | |
| | | import com.ruoyi.quality.dto.QualityTestStandardBindingDto; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表ä¸äº§åå
³è表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:40 |
| | | */ |
| | | @Mapper |
| | | public interface QualityTestStandardBindingMapper extends BaseMapper<QualityTestStandardBinding> { |
| | | |
| | | List<QualityTestStandardBindingDto> listBinding(@Param("testStandardId") Long testStandardId); |
| | | } |
| | |
| | | package com.ruoyi.quality.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.staff.pojo.StaffOnJob; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表 Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:40:24 |
| | | */ |
| | | @Mapper |
| | | public interface QualityTestStandardMapper extends BaseMapper<QualityTestStandard> { |
| | | |
| | | |
| | | IPage<QualityTestStandard> qualityTestStandardListPage(@Param("page") Page page, @Param("qualityTestStandard") QualityTestStandard qualityTestStandard); |
| | | |
| | | List<QualityTestStandard> qualityTestStandardList(@Param("qualityTestStandard") QualityTestStandard qualityTestStandard); |
| | | |
| | | IPage<QualityTestStandard> qualityTestStandardListPage(Page page, @Param("c") QualityTestStandard qualityTestStandard); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.mapper; |
| | | |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ ååæ° Mapper æ¥å£ |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:49 |
| | | */ |
| | | @Mapper |
| | | public interface QualityTestStandardParamMapper extends BaseMapper<QualityTestStandardParam> { |
| | | |
| | | List<QualityTestStandardParam> selectListByProductId(@Param("productId") Long productId); |
| | | } |
| | |
| | | package com.ruoyi.quality.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * è´¨é管ç--æ£æµææ ç»´æ¤ |
| | | * quality_test_standard |
| | | * <p> |
| | | * æ£æµæ å主表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:40:24 |
| | | */ |
| | | @TableName(value = "quality_test_standard") |
| | | @Data |
| | | @Getter |
| | | @Setter |
| | | @TableName("quality_test_standard") |
| | | @ApiModel(value = "QualityTestStandard对象", description = "æ£æµæ å主表") |
| | | public class QualityTestStandard implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * åºå· |
| | | */ |
| | | @TableId(type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("æ åç¼å·") |
| | | private String standardNo; |
| | | |
| | | /** |
| | | * ææ |
| | | */ |
| | | @Excel(name = "ææ ") |
| | | private String parameterItem; |
| | | @ApiModelProperty("æ ååç§°") |
| | | private String standardName; |
| | | |
| | | /** |
| | | * åä½ |
| | | */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | @ApiModelProperty("夿³¨") |
| | | private String remark; |
| | | |
| | | /** |
| | | * æ åå¼ |
| | | */ |
| | | @Excel(name = "æ åå¼") |
| | | private String standardValue; |
| | | |
| | | /** |
| | | * å
æ§å¼ |
| | | */ |
| | | @Excel(name = "å
æ§å¼") |
| | | private String controlValue; |
| | | |
| | | /** |
| | | * å
³è产åid |
| | | */ |
| | | @NotBlank(message = "产åidä¸è½ä¸ºç©º!") |
| | | @Excel(name = "å
³è产åid") |
| | | private Long productId; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "åå»ºç¨æ·") |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Integer createUser; |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹æ¶é´") |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "ä¿®æ¹ç¨æ·") |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Integer updateUser; |
| | | private Long updateUser; |
| | | |
| | | @ApiModelProperty(value = "ç§æ·ID") |
| | | @ApiModelProperty("ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @ApiModelProperty("ç¶æ") |
| | | private String state; |
| | | |
| | | @ApiModelProperty("ç±»å«(0:åæææ£éª;1:è¿ç¨æ£éª;2:åºåæ£éª)") |
| | | private Integer inspectType; |
| | | |
| | | @ApiModelProperty("å·¥åºid") |
| | | private Integer processId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表ä¸äº§åå
³è表 |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:40 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("quality_test_standard_binding") |
| | | @ApiModel(value = "QualityTestStandardBinding对象", description = "æ£æµæ å主表ä¸äº§åå
³è表") |
| | | public class QualityTestStandardBinding implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty("产åID") |
| | | private Long productId; |
| | | |
| | | @ApiModelProperty("å
³èæ£æµæ å主表id") |
| | | private Integer testStandardId; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.pojo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Getter; |
| | | import lombok.Setter; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ ååæ° |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:49 |
| | | */ |
| | | @Getter |
| | | @Setter |
| | | @TableName("quality_test_standard_param") |
| | | @ApiModel(value = "QualityTestStandardParam对象", description = "æ£æµæ ååæ°") |
| | | public class QualityTestStandardParam implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("忰项") |
| | | private String parameterItem; |
| | | |
| | | @ApiModelProperty("åä½") |
| | | private String unit; |
| | | |
| | | @ApiModelProperty("æ åå¼") |
| | | private String standardValue; |
| | | |
| | | @ApiModelProperty("å
æ§å¼") |
| | | private String controlValue; |
| | | |
| | | @ApiModelProperty("å建æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty("åå»ºç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long createUser; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹æ¶é´") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty("ä¿®æ¹ç¨æ·") |
| | | @TableField(fill = FieldFill.INSERT_UPDATE) |
| | | private Long updateUser; |
| | | |
| | | @ApiModelProperty("ç§æ·ID") |
| | | @TableField(fill = FieldFill.INSERT) |
| | | private Long tenantId; |
| | | |
| | | @ApiModelProperty("å
³èæ£æµæ å主表id") |
| | | private Long testStandardId; |
| | | |
| | | @ApiModelProperty("é»è®¤å¼") |
| | | private String defaultValue; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:40:24 |
| | | */ |
| | | public interface IQualityTestStandardService extends IService<QualityTestStandard> { |
| | | |
| | | |
| | | IPage<QualityTestStandard> qualityTestStandardListPage(Page page, QualityTestStandard qualityTestStandard); |
| | | |
| | | void qualityTestStandardListPageExport(HttpServletResponse response, QualityTestStandard qualityTestStandard); |
| | | |
| | | int copyParam(QualityTestStandard qualityTestStandard); |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.quality.dto.QualityTestStandardBindingDto; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表ä¸äº§åå
³è表 æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:40 |
| | | */ |
| | | public interface QualityTestStandardBindingService extends IService<QualityTestStandardBinding> { |
| | | |
| | | List<QualityTestStandardBindingDto> listBinding(Long testStandardId); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.service; |
| | | |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ ååæ° æå¡ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:49 |
| | | */ |
| | | public interface QualityTestStandardParamService extends IService<QualityTestStandardParam> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.service.impl; |
| | | |
| | | import com.ruoyi.quality.dto.QualityTestStandardBindingDto; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardBinding; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardBindingMapper; |
| | | import com.ruoyi.quality.service.QualityTestStandardBindingService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表ä¸äº§åå
³è表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:40 |
| | | */ |
| | | @Service |
| | | public class QualityTestStandardBindingServiceImpl extends ServiceImpl<QualityTestStandardBindingMapper, QualityTestStandardBinding> implements QualityTestStandardBindingService { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardBindingMapper qualityTestStandardBindingMapper; |
| | | |
| | | @Override |
| | | public List<QualityTestStandardBindingDto> listBinding(Long testStandardId) { |
| | | return qualityTestStandardBindingMapper.listBinding(testStandardId); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.quality.service.impl; |
| | | |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ ååæ° æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:39:49 |
| | | */ |
| | | @Service |
| | | public class QualityTestStandardParamServiceImpl extends ServiceImpl<QualityTestStandardParamMapper, QualityTestStandardParam> implements QualityTestStandardParamService { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.quality.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.quality.mapper.QualityInspectMapper; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.pojo.QualityInspect; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardParamMapper; |
| | | import com.ruoyi.quality.pojo.QualityTestStandard; |
| | | import com.ruoyi.quality.service.IQualityInspectService; |
| | | import com.ruoyi.quality.mapper.QualityTestStandardMapper; |
| | | import com.ruoyi.quality.pojo.QualityTestStandardParam; |
| | | import com.ruoyi.quality.service.IQualityTestStandardService; |
| | | import com.ruoyi.staff.pojo.StaffJoinLeaveRecord; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.core.parameters.P; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.quality.service.QualityTestStandardParamService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @AllArgsConstructor |
| | | |
| | | /** |
| | | * <p> |
| | | * æ£æµæ å主表 æå¡å®ç°ç±» |
| | | * </p> |
| | | * |
| | | * @author è¯å¯¼è½¯ä»¶ï¼æ±èï¼æéå
¬å¸ |
| | | * @since 2026-01-13 03:40:24 |
| | | */ |
| | | @Service |
| | | public class QualityTestStandardServiceImpl extends ServiceImpl<QualityTestStandardMapper, QualityTestStandard> implements IQualityTestStandardService { |
| | | public class QualityTestStandardServiceImpl extends ServiceImpl<QualityTestStandardMapper, QualityTestStandard> implements IQualityTestStandardService { |
| | | |
| | | @Autowired |
| | | private QualityTestStandardMapper qualityTestStandardMapper; |
| | | |
| | | @Autowired |
| | | private QualityTestStandardParamMapper qualityTestStandardParamMapper; |
| | | |
| | | @Autowired |
| | | private QualityTestStandardParamService qualityTestStandardParamService; |
| | | |
| | | @Override |
| | | public IPage<QualityTestStandard> qualityTestStandardListPage(Page page, QualityTestStandard qualityTestStandard) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public void qualityTestStandardListPageExport(HttpServletResponse response, QualityTestStandard qualityTestStandard) { |
| | | List<QualityTestStandard> qualityTestStandards =qualityTestStandardMapper.qualityTestStandardList(qualityTestStandard); |
| | | ExcelUtil<QualityTestStandard> util = new ExcelUtil<QualityTestStandard>(QualityTestStandard.class); |
| | | util.exportExcel(response, qualityTestStandards, "æ£æµææ 导åº"); |
| | | public int copyParam(QualityTestStandard qualityTestStandard) { |
| | | //å
æ¥è¯¢è¢«å¤å¶çæ£æµæ åç详æ
åæ° |
| | | List<QualityTestStandardParam> oldQualityTestStandardParams = qualityTestStandardParamMapper.selectList(Wrappers.<QualityTestStandardParam>lambdaQuery().eq(QualityTestStandardParam::getTestStandardId, qualityTestStandard.getId())); |
| | | QualityTestStandard testStandard = qualityTestStandardMapper.selectById(qualityTestStandard.getId()); |
| | | testStandard.setId(null); |
| | | testStandard.setStandardNo(null); |
| | | qualityTestStandardMapper.insert(testStandard); |
| | | List<QualityTestStandardParam> newQualityTestStandardParams = oldQualityTestStandardParams.stream().map(oldQualityTestStandardParam -> { |
| | | oldQualityTestStandardParam.setTestStandardId(testStandard.getId()); |
| | | return oldQualityTestStandardParam; |
| | | }).collect(Collectors.toList()); |
| | | qualityTestStandardParamService.saveBatch(newQualityTestStandardParams); |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveOrUpdate") |
| | | public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) { |
| | | public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPayment) { |
| | | receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDto; |
| | | import com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy; |
| | | import com.ruoyi.procurementrecord.service.ProcurementRecordService; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ISalesLedgerProductService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private ISalesLedgerProductService salesLedgerProductService; |
| | | @Autowired |
| | | private ProcurementRecordService procurementRecordService; |
| | | |
| | | |
| | | /** |
| | | * 忬¾ç»è®°å页æ¥è¯¢ |
| | | */ |
| | | @GetMapping("/listPageSalesLedger") |
| | | public AjaxResult listPage(Page page, SalesLedgerProductDto salesLedgerProduct) { |
| | | IPage<SalesLedgerProductDto> list = salesLedgerProductService.listPage(page,salesLedgerProduct); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 仿¬¾ç»è®°å页æ¥è¯¢ |
| | | */ |
| | | @GetMapping("/listPagePurchaseLedger") |
| | | public AjaxResult listPagePurchaseLedger(Page page, SalesLedgerProductDto salesLedgerProduct) { |
| | | IPage<SalesLedgerProductDto> list = salesLedgerProductService.listPagePurchaseLedger(page,salesLedgerProduct); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ¥è¯¢äº§åä¿¡æ¯å表 |
| | | */ |
| | |
| | | procurementDto.setSalesLedgerProductId(item.getId()); |
| | | procurementDto.setProductCategory(item.getProductCategory()); |
| | | IPage<ProcurementPageDtoCopy> result = procurementRecordService.listPageCopyByProduction(new Page<>(1,-1), procurementDto); |
| | | ProcurementPageDtoCopy procurementDtoCopy = result.getRecords().get(0); |
| | | if(item.getQuantity().compareTo(procurementDtoCopy.getInboundNum0())>=0){ |
| | | item.setApproveStatus(1); |
| | | salesLedgerProductService.addOrUpdateSalesLedgerProduct(item); |
| | | if(result.getRecords().size()>0) { |
| | | ProcurementPageDtoCopy procurementDtoCopy = result.getRecords().get(0); |
| | | if (item.getQuantity().compareTo(procurementDtoCopy.getInboundNum0()) >= 0) { |
| | | item.setApproveStatus(1); |
| | | salesLedgerProductService.addOrUpdateSalesLedgerProduct(item); |
| | | } |
| | | } |
| | | }); |
| | | return AjaxResult.success(list); |
| | |
| | | |
| | | @ApiModelProperty(value = "éå®å°è´¦sales_ledger") |
| | | @Excel(isExport = false) |
| | | private Integer salesLedgerId; |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "éå®ååå·") |
| | | @Excel(name = "éå®ååå·") |
| | |
| | | package com.ruoyi.sales.dto; |
| | | |
| | | public class SalesLedgerProductDto { |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.Data; |
| | | |
| | | |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class SalesLedgerProductDto extends SalesLedgerProduct { |
| | | |
| | | /** |
| | | * éè´ååå· |
| | | */ |
| | | @Excel(name = "éè´ååå·") |
| | | private String purchaseContractNumber; |
| | | /** |
| | | * éå®ååå· |
| | | */ |
| | | private String salesContractNo; |
| | | /** |
| | | * 客æ·ååå· |
| | | */ |
| | | private String customerContractNo; |
| | | /** |
| | | * 项ç®åç§° |
| | | */ |
| | | private String projectName; |
| | | /** |
| | | * 客æ·åç§° |
| | | */ |
| | | private String customerName; |
| | | /** |
| | | * ç¶æ |
| | | */ |
| | | private String statusName; |
| | | /** |
| | | * true:䏿¾ç¤ºå¾
仿¬¾ï¼å款为0çæ°æ® |
| | | */ |
| | | private Boolean status; |
| | | |
| | | } |
| | |
| | | package com.ruoyi.sales.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.config.MyBaseMapper; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | SalesLedgerProduct selectSalesLedgerProductByMainId(@Param("productMainId") Long productMainId); |
| | | |
| | | IPage<SalesLedgerProductDto> listPage(Page page, @Param("req") SalesLedgerProductDto salesLedgerProduct); |
| | | |
| | | IPage<SalesLedgerProductDto> listPagePurchaseLedger(Page page,@Param("req") SalesLedgerProductDto salesLedgerProduct); |
| | | } |
| | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class ReceiptPayment { |
| | |
| | | @ApiModelProperty(value = "invoice_ledgerå¼ç¥¨å°è´¦ä¸»é®ID") |
| | | private Integer invoiceLedgerId; |
| | | |
| | | @ApiModelProperty(value = "sales_ledgeréå®å°è´¦ä¸»é®ID") |
| | | private Long salesLedgerId; |
| | | |
| | | @ApiModelProperty(value = "sales_ledger_productéå®å°è´¦äº§å主é®ID") |
| | | private Long salesLedgerProductId; |
| | | |
| | | @ApiModelProperty(value = "æ¥æ¬¾æ¥æ") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | |
| | | // @TableField(exist = false) |
| | | @ApiModelProperty(value = "审æ¹ç¶æï¼0æªç产,1å·²ç产,2å¾
å®¡æ ¸(å®¡æ ¸ä¸),3å®¡æ ¸å®æ,4å®¡æ ¸å¤±è´¥") |
| | | private Integer approveStatus; |
| | | |
| | | @ApiModelProperty(value = "å¾
忬¾æ»éé¢") |
| | | private BigDecimal pendingInvoiceTotal; |
| | | |
| | | @ApiModelProperty(value = "忬¾æ»éé¢") |
| | | private BigDecimal invoiceTotal; |
| | | |
| | | @ApiModelProperty(value = "å¾
仿¬¾æ»éé¢") |
| | | private BigDecimal pendingTicketsTotal; |
| | | |
| | | @ApiModelProperty(value = "仿¬¾æ»éé¢") |
| | | private BigDecimal ticketsTotal; |
| | | } |
| | |
| | | package com.ruoyi.sales.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | |
| | | import java.util.List; |
| | |
| | | int deleteSalesLedgerProductByIds(Long[] ids); |
| | | |
| | | int addOrUpdateSalesLedgerProduct(SalesLedgerProduct salesLedgerProduct); |
| | | |
| | | IPage<SalesLedgerProductDto> listPage(Page page, SalesLedgerProductDto salesLedgerProduct); |
| | | |
| | | IPage<SalesLedgerProductDto> listPagePurchaseLedger(Page page, SalesLedgerProductDto salesLedgerProduct); |
| | | } |
| | |
| | | * @param receiptPayment |
| | | * @return |
| | | */ |
| | | int receiptPaymentSaveOrUpdate(ReceiptPayment receiptPayment); |
| | | int receiptPaymentSaveOrUpdate(List<ReceiptPayment> receiptPayment); |
| | | |
| | | /** |
| | | * 忬¾ç»è®°ä¿®æ¹ |
| | |
| | | import com.ruoyi.sales.mapper.InvoiceLedgerMapper; |
| | | import com.ruoyi.sales.mapper.ReceiptPaymentMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | | import com.ruoyi.sales.pojo.InvoiceLedger; |
| | | import com.ruoyi.sales.pojo.ReceiptPayment; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import com.ruoyi.sales.service.ReceiptPaymentService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private SalesLedgerMapper salesLedgerMapper; |
| | | |
| | | @Autowired |
| | | private SalesLedgerProductMapper salesLedgerProductMapper; |
| | | @Autowired |
| | | private InvoiceLedgerMapper invoiceLedgerMapper; |
| | | |
| | | /** |
| | | * 忬¾ç»è®°æ°å¢ |
| | | * @param receiptPayment |
| | | * @param receiptPaymentList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public int receiptPaymentSaveOrUpdate(ReceiptPayment receiptPayment) { |
| | | ReceiptPayment byId = receiptPayment; |
| | | if (!ObjectUtils.isEmpty(receiptPayment.getId())){ |
| | | byId = this.getById(receiptPayment.getId()); |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int receiptPaymentSaveOrUpdate(List<ReceiptPayment> receiptPaymentList) { |
| | | for (ReceiptPayment receiptPayment : receiptPaymentList) { |
| | | ReceiptPayment byId = receiptPayment; |
| | | if (!ObjectUtils.isEmpty(receiptPayment.getId())){ |
| | | receiptPayment = this.getById(receiptPayment.getId()); |
| | | } |
| | | // InvoiceLedger invoiceLedger = invoiceLedgerMapper.selectById(byId.getInvoiceLedgerId()); |
| | | SalesLedger salesLedger = salesLedgerMapper.selectById(receiptPayment.getSalesLedgerId()); |
| | | if(null==salesLedger) throw new RuntimeException("æªæ¾å°éå®å"); |
| | | // 已忬¾éé¢ |
| | | SalesLedgerProduct salesLedgerProduct = salesLedgerProductMapper.selectById(receiptPayment.getSalesLedgerProductId()); |
| | | if(null==salesLedgerProduct) throw new RuntimeException("æªæ¾å°éå®å产å"); |
| | | if (salesLedgerProduct.getPendingInvoiceTotal().compareTo(receiptPayment.getReceiptPaymentAmount())<0){ |
| | | throw new RuntimeException("æ¬æ¬¡å款éé¢ä¸è½å¤§äºå¾
忬¾éé¢"); |
| | | } |
| | | if(null==receiptPayment.getId()){ |
| | | salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().add(receiptPayment.getReceiptPaymentAmount())); |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal())); |
| | | receiptPaymentMapper.insert(receiptPayment); |
| | | }else { |
| | | BigDecimal subtract = receiptPayment.getReceiptPaymentAmount().subtract(byId.getReceiptPaymentAmount()); |
| | | salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getInvoiceTotal().add(subtract)); |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice().subtract(salesLedgerProduct.getInvoiceTotal())); |
| | | receiptPaymentMapper.updateById(receiptPayment); |
| | | } |
| | | salesLedgerProductMapper.updateById(salesLedgerProduct); |
| | | } |
| | | InvoiceLedger invoiceLedger = invoiceLedgerMapper.selectById(byId.getInvoiceLedgerId()); |
| | | Page<ReceiptPaymentDto> objectPage = new Page<>(); |
| | | ReceiptPaymentDto receiptPaymentDto = new ReceiptPaymentDto(); |
| | | receiptPaymentDto.setInvoiceLedgerId(invoiceLedger.getId()); |
| | | IPage<ReceiptPaymentDto> receiptPaymentDtoIPage = receiptPaymentMapper.bindInvoiceNoRegPage(objectPage, receiptPaymentDto); |
| | | ReceiptPaymentDto receiptPaymentDto1 = receiptPaymentDtoIPage.getRecords().get(0); |
| | | if (!ObjectUtils.isEmpty(byId.getId())){ |
| | | receiptPaymentDto1.setNoReceiptAmount(receiptPaymentDto1.getNoReceiptAmount().add(byId.getReceiptPaymentAmount())); |
| | | } |
| | | if (receiptPaymentDto1.getNoReceiptAmount().compareTo(receiptPayment.getReceiptPaymentAmount())<0){ |
| | | throw new RuntimeException("æ¬æ¬¡å款éé¢ä¸è½å¤§äºå¾
忬¾éé¢"); |
| | | } |
| | | if(null==receiptPayment.getId()){ |
| | | |
| | | return receiptPaymentMapper.insert(receiptPayment); |
| | | }else { |
| | | |
| | | return receiptPaymentMapper.updateById(receiptPayment); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.production.mapper.*; |
| | | import com.ruoyi.production.pojo.*; |
| | | import com.ruoyi.purchase.mapper.PurchaseLedgerMapper; |
| | | import com.ruoyi.purchase.pojo.PurchaseLedger; |
| | | import com.ruoyi.sales.dto.InvoiceRegistrationProductDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerProductDto; |
| | | import com.ruoyi.sales.mapper.InvoiceRegistrationProductMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerMapper; |
| | | import com.ruoyi.sales.mapper.SalesLedgerProductMapper; |
| | |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerProductDto> listPage(Page page, SalesLedgerProductDto salesLedgerProduct) { |
| | | IPage<SalesLedgerProductDto> salesLedgerProductDtoIPage = salesLedgerProductMapper.listPage(page, salesLedgerProduct); |
| | | salesLedgerProductDtoIPage.getRecords().forEach(item -> { |
| | | // å¤æç¶æ |
| | | if(item.getTaxInclusiveTotalPrice().compareTo(item.getInvoiceTotal()) == 0){ |
| | | item.setStatusName("已宿仿¬¾"); |
| | | }else{ |
| | | item.setStatusName("æªå®æä»æ¬¾"); |
| | | } |
| | | }); |
| | | return salesLedgerProductDtoIPage; |
| | | } |
| | | |
| | | @Override |
| | | public IPage<SalesLedgerProductDto> listPagePurchaseLedger(Page page, SalesLedgerProductDto salesLedgerProduct) { |
| | | IPage<SalesLedgerProductDto> salesLedgerProductDtoIPage = salesLedgerProductMapper.listPagePurchaseLedger(page, salesLedgerProduct); |
| | | salesLedgerProductDtoIPage.getRecords().forEach(item -> { |
| | | // å¤æç¶æ |
| | | if(item.getTaxInclusiveTotalPrice().compareTo(item.getInvoiceTotal()) == 0){ |
| | | item.setStatusName("已宿仿¬¾"); |
| | | }else{ |
| | | item.setStatusName("æªå®æä»æ¬¾"); |
| | | } |
| | | }); |
| | | return salesLedgerProductDtoIPage; |
| | | } |
| | | |
| | | /** |
| | | * éç¨æ¹æ³ï¼æ ¹æ®ä¸»è¡¨IDåå表åè¡¨ï¼æ´æ°ä¸»è¡¨çååéé¢ |
| | | */ |
| | |
| | | salesLedgerProduct.setType(type); |
| | | salesLedgerProduct.setNoInvoiceNum(salesLedgerProduct.getQuantity()); |
| | | salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProduct.setInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | |
| | | ProductOrder productOrder = new ProductOrder(); |
| | |
| | | druid: |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | url: jdbc:mysql://localhost:3306/product-inventory-management-hckx?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | url: jdbc:mysql://localhost:3306/product-inventory-management-new?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | # ä»åºæ°æ®æº |
| | |
| | | and n.title like concat('%',#{ew.title},'%') |
| | | </if> |
| | | <if test="ew.type != null"> |
| | | and n.type = #{ew.type} |
| | | and n.type = #{ew.type} |
| | | </if> |
| | | <if test="ew.status != null"> |
| | | and n.status = #{ew.status} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.collaborativeApproval.mapper.NoticeTypeMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.collaborativeApproval.pojo.NoticeType"> |
| | | <id column="id" property="id" /> |
| | | <result column="notice_type" property="noticeType" /> |
| | | <result column="tenant_id" property="tenantId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.collaborativeApproval.mapper.RulesRegulationsManagementFileMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile"> |
| | | <id column="id" property="id"/> |
| | | <result column="name" property="name"/> |
| | | <result column="url" property="url"/> |
| | | <result column="file_size" property="fileSize"/> |
| | | <result column="rules_regulations_management_id" property="rulesRegulationsManagementId"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | </resultMap> |
| | | <select id="listPage" resultType="com.ruoyi.collaborativeApproval.pojo.RulesRegulationsManagementFile"> |
| | | select * |
| | | from rules_regulations_management_file |
| | | where |
| | | 1=1 |
| | | <if test="c.rulesRegulationsManagementId !=null"> |
| | | and rules_regulations_management_id = #{c.rulesRegulationsManagementId} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | <select id="listPage" resultType="com.ruoyi.collaborativeApproval.dto.SealApplicationManagementDTO"> |
| | | select sam.*, su.user_name as create_user_name, d.dept_name as department |
| | | select sam.*, su.user_name as create_user_name, d.dept_name as department, |
| | | su1.nick_name as approveUserName |
| | | from seal_application_management sam |
| | | left join sys_user su on sam.create_user = su.user_id |
| | | left join sys_user su1 on sam.approve_user_id = su1.user_id |
| | | left join sys_user_dept sud on su.user_id = sud.user_id |
| | | left join sys_dept d on sud.dept_id = d.dept_id |
| | | <where> |
| | | <if test="ew.applicationNum != null and ew.applicationNum != ''"> |
| | | and sam.application_num like concat('%',#{ew.applicationNum},'%') |
| | | </if> |
| | | <if test="ew.title != null and ew.title != ''"> |
| | | and sam.title like concat('%',#{ew.title},'%') |
| | | </if> |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | | </mapper> |
| | |
| | | group by t2.product_category,t2.specification_model,t1.unit_price |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="listPagePRS" resultType="com.ruoyi.procurementrecord.dto.ProcurementPageDtoCopy"> |
| | | select * |
| | | from procurement_record_storage t1 |
| | | left join sales_ledger_product t2 on t2.id = t1.sales_ledger_product_id |
| | | <where> |
| | | 1=1 |
| | | <if test="req.productCategory != null and req.productCategory != ''"> |
| | | and t2.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.timeStr != null and req.timeStr != ''"> |
| | | and t1.create_time like concat('%',#{req.timeStr},'%') |
| | | </if> |
| | | <if test="req.salesLedgerProductId != null and req.salesLedgerProductId != ''"> |
| | | and t1.sales_ledger_product_id = #{req.salesLedgerProductId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.quality.mapper.QualityTestStandardBindingMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.quality.pojo.QualityTestStandardBinding"> |
| | | <id column="id" property="id"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="test_standard_id" property="testStandardId"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | </resultMap> |
| | | <select id="listBinding" resultType="com.ruoyi.quality.dto.QualityTestStandardBindingDto"> |
| | | select * |
| | | from quality_test_standard_binding t1 |
| | | left join product t2 on t1.product_id = t2.id |
| | | where t1.test_standard_id = #{testStandardId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | FROM quality_test_standard |
| | | where |
| | | 1=1 |
| | | <if test="qualityTestStandard.productId != null and qualityTestStandard.productId != '' "> |
| | | AND product_id = #{qualityTestStandard.productId} |
| | | <if test="qualityTestStandard.standardNo != null and qualityTestStandard.standardNo != '' "> |
| | | AND standard_no like concat('%',#{qualityTestStandard.standardNo},'%') |
| | | </if> |
| | | </select> |
| | | <select id="qualityTestStandardList" resultType="com.ruoyi.quality.pojo.QualityTestStandard"> |
| | | SELECT |
| | | * |
| | | FROM quality_test_standard |
| | | where |
| | | 1=1 |
| | | <if test="qualityTestStandard.productId != null and qualityTestStandard.productId != '' "> |
| | | AND product_id = #{qualityTestStandard.productId} |
| | | <if test="qualityTestStandard.standardName != null and qualityTestStandard.standardName != '' "> |
| | | AND standard_name like concat('%',#{qualityTestStandard.standardName},'%') |
| | | </if> |
| | | <if test="qualityTestStandard.state != null and qualityTestStandard.state != '' "> |
| | | AND state = #{qualityTestStandard.state} |
| | | </if> |
| | | <if test="qualityTestStandard.inspectType != null and qualityTestStandard.inspectType != '' "> |
| | | AND inspect_type = #{qualityTestStandard.inspectType} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.quality.mapper.QualityTestStandardParamMapper"> |
| | | |
| | | <!-- éç¨æ¥è¯¢æ å°ç»æ --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.quality.pojo.QualityTestStandardParam"> |
| | | <id column="id" property="id" /> |
| | | <result column="parameter_item" property="parameterItem" /> |
| | | <result column="unit" property="unit" /> |
| | | <result column="standard_value" property="standardValue" /> |
| | | <result column="control_value" property="controlValue" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="create_user" property="createUser" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="update_user" property="updateUser" /> |
| | | <result column="tenant_id" property="tenantId" /> |
| | | <result column="test_standard_id" property="testStandardId" /> |
| | | <result column="default_value" property="defaultValue" /> |
| | | </resultMap> |
| | | <select id="selectListByProductId" resultType="com.ruoyi.quality.pojo.QualityTestStandardParam"> |
| | | select t1.* from quality_test_standard_param t1 |
| | | left join quality_test_standard t2 on t1.test_standard_id = t2.id |
| | | left join quality_test_standard_binding t3 on t2.id = t3.test_standard_id |
| | | where product_id = #{productId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | </select> |
| | | <select id="listPage" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto"> |
| | | select slp.*, |
| | | sl.project_name, |
| | | sl.customer_name, |
| | | sl.sales_contract_no, |
| | | sl.customer_contract_no |
| | | from sales_ledger_product slp |
| | | left join sales_ledger sl on slp.sales_ledger_id = sl.id |
| | | <where> |
| | | slp.type = 1 |
| | | <if test="req.salesContractNo != null and req.salesContractNo != '' "> |
| | | AND sl.sales_contract_no like concat('%',#{req.salesContractNo},'%') |
| | | </if> |
| | | <if test="req.customerContractNo != null and req.customerContractNo != '' "> |
| | | AND sl.customer_contract_no like concat('%',#{req.customerContractNo},'%') |
| | | </if> |
| | | <if test="req.projectName != null and req.projectName != '' "> |
| | | AND sl.project_name like concat('%',#{req.projectName},'%') |
| | | </if> |
| | | <if test="req.customerName != null and req.customerName != '' "> |
| | | AND sl.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != '' "> |
| | | AND slp.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.status != null and req.status "> |
| | | AND slp.pending_invoice_total > 0 |
| | | </if> |
| | | </where> |
| | | order by slp.register_date desc |
| | | </select> |
| | | <select id="listPagePurchaseLedger" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto"> |
| | | select slp.*, |
| | | sl.project_name, |
| | | sl.customer_name, |
| | | sl.sales_contract_no, |
| | | sl.customer_contract_no |
| | | from sales_ledger_product slp |
| | | left join purchase_ledger sl on slp.sales_ledger_id = sl.id |
| | | <where> |
| | | slp.type = 2 |
| | | <if test="req.purchaseContractNumber != null and req.purchaseContractNumber != '' "> |
| | | AND sl.purchase_contract_number like concat('%',#{req.purchaseContractNumber},'%') |
| | | </if> |
| | | <if test="req.customerContractNo != null and req.customerContractNo != '' "> |
| | | AND sl.customer_contract_no like concat('%',#{req.customerContractNo},'%') |
| | | </if> |
| | | <if test="req.projectName != null and req.projectName != '' "> |
| | | AND sl.project_name like concat('%',#{req.projectName},'%') |
| | | </if> |
| | | <if test="req.customerName != null and req.customerName != '' "> |
| | | AND sl.customer_name like concat('%',#{req.customerName},'%') |
| | | </if> |
| | | <if test="req.productCategory != null and req.productCategory != '' "> |
| | | AND slp.product_category like concat('%',#{req.productCategory},'%') |
| | | </if> |
| | | <if test="req.status != null and req.status "> |
| | | AND slp.pending_invoice_total > 0 |
| | | </if> |
| | | </where> |
| | | order by slp.register_date desc |
| | | </select> |
| | | </mapper> |
| | |
| | | #{item} |
| | | </foreach> |
| | | </select> |
| | | <select id="selectList" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | <select id="selectRegistrantIds" resultType="com.ruoyi.project.system.domain.SysUser"> |
| | | SELECT user_id, nick_name FROM sys_user |
| | | <where> |
| | | <if test="list != null and list.size() > 0"> |