Merge remote-tracking branch 'origin/master'
| | |
| | | * |
| | | * @author jc |
| | | */ |
| | | |
| | | |
| | | @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) |
| | | public class MesApplication |
| | | { |
| | |
| | | # druid: |
| | | # # 主åºæ°æ®æº |
| | | # master: |
| | | # url: jdbc:mysql://localhost:3306/jcdm-mes-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://192.168.0.189:3306/jcdm-mes-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # username: root |
| | | # password: root |
| | | # æ°æ®æºé
ç½® |
| | |
| | | slave: |
| | | # ä»æ°æ®æºå¼å
³/é»è®¤å
³é |
| | | enabled: false |
| | | url: |
| | | username: |
| | | password: |
| | | url: |
| | | username: |
| | | password: |
| | | # åå§è¿æ¥æ° |
| | | initialSize: 5 |
| | | # æå°è¿æ¥æ± æ°é |
| | |
| | | testWhileIdle: true |
| | | testOnBorrow: false |
| | | testOnReturn: false |
| | | webStatFilter: |
| | | webStatFilter: |
| | | enabled: true |
| | | statViewServlet: |
| | | enabled: true |
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 8080 |
| | | port: 8081 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | |
| | | /** |
| | | * å¿å访é®ä¸é´æ注解 |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Target({ ElementType.METHOD, ElementType.TYPE }) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | |
| | | /** |
| | | * æ°æ®æéè¿æ»¤æ³¨è§£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Target(ElementType.METHOD) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | |
| | | * |
| | | * ä¼å
级ï¼å
æ¹æ³ï¼åç±»ï¼å¦ææ¹æ³è¦çäºç±»ä¸çæ°æ®æºç±»åï¼ä»¥æ¹æ³ç为åï¼å¦å以类ä¸ç为å |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Target({ ElementType.METHOD, ElementType.TYPE }) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | |
| | | /** |
| | | * èªå®ä¹å¯¼åºExcelæ°æ®æ³¨è§£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Target(ElementType.FIELD) |
| | |
| | | /** |
| | | * Excel注解é |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Target(ElementType.FIELD) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | |
| | | /** |
| | | * èªå®ä¹æä½æ¥å¿è®°å½æ³¨è§£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | @Target({ ElementType.PARAMETER, ElementType.METHOD }) |
| | |
| | | /** |
| | | * éæµæ³¨è§£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Target(ElementType.METHOD) |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | |
| | | /** |
| | | * èªå®ä¹æ³¨è§£é²æ¢è¡¨åéå¤æ交 |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | @Inherited |
| | |
| | | /** |
| | | * 读å项ç®ç¸å
³é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | @ConfigurationProperties(prefix = "ruoyi") |
| | |
| | | /** |
| | | * ç¼åçkey 常é |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class CacheConstants |
| | | { |
| | |
| | | /** |
| | | * éç¨å¸¸éä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Constants |
| | | { |
| | |
| | | /** |
| | | * 代ç çæéç¨å¸¸é |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class GenConstants |
| | | { |
| | |
| | | /** |
| | | * è¿åç¶æç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class HttpStatus |
| | | { |
| | |
| | | /** |
| | | * ä»»å¡è°åº¦éç¨å¸¸é |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class ScheduleConstants |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·å¸¸éä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class UserConstants |
| | | { |
| | |
| | | /** |
| | | * webå±éç¨æ°æ®å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class BaseController |
| | | { |
| | |
| | | /** |
| | | * æä½æ¶æ¯æé |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class AjaxResult extends HashMap<String, Object> |
| | | { |
| | |
| | | /** |
| | | * Entityåºç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class BaseEntity implements Serializable |
| | | { |
| | |
| | | /** |
| | | * ååºä¿¡æ¯ä¸»ä½ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class R<T> implements Serializable |
| | | { |
| | |
| | | /** |
| | | * Treeåºç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class TreeEntity extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * Treeselectæ ç»æå®ä½ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class TreeSelect implements Serializable |
| | | { |
| | |
| | | /** |
| | | * é¨é¨è¡¨ sys_dept |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysDept extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * åå
¸æ°æ®è¡¨ sys_dict_data |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysDictData extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * åå
¸ç±»å表 sys_dict_type |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysDictType extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * èåæé表 sys_menu |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysMenu extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * è§è²è¡¨ sys_role |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysRole extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·å¯¹è±¡ sys_user |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysUser extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·ç»å½å¯¹è±¡ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class LoginBody |
| | | { |
| | |
| | | /** |
| | | * ç»å½ç¨æ·èº«ä»½æé |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class LoginUser implements UserDetails |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·æ³¨å对象 |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class RegisterBody extends LoginBody |
| | | { |
| | |
| | | /** |
| | | * å页æ°æ® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class PageDomain |
| | | { |
| | |
| | | /** |
| | | * è¡¨æ ¼å页æ°æ®å¯¹è±¡ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class TableDataInfo implements Serializable |
| | | { |
| | |
| | | /** |
| | | * è¡¨æ ¼æ°æ®å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class TableSupport |
| | | { |
| | |
| | | /** |
| | | * spring redis å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | **/ |
| | | @SuppressWarnings(value = { "unchecked", "rawtypes" }) |
| | | @Component |
| | |
| | | /** |
| | | * å符éå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class CharsetKit |
| | | { |
| | |
| | | /** |
| | | * ç±»å转æ¢å¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Convert |
| | | { |
| | |
| | | /** |
| | | * åç¬¦ä¸²æ ¼å¼å |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class StrFormatter |
| | | { |
| | |
| | | /** |
| | | * æä½ç¶æ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | public enum BusinessStatus |
| | |
| | | /** |
| | | * ä¸å¡æä½ç±»å |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public enum BusinessType |
| | | { |
| | |
| | | /** |
| | | * æ°æ®æº |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public enum DataSourceType |
| | | { |
| | |
| | | /** |
| | | * 请æ±æ¹å¼ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public enum HttpMethod |
| | | { |
| | |
| | | /** |
| | | * éæµç±»å |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | |
| | | public enum LimitType |
| | |
| | | /** |
| | | * æä½äººç±»å« |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public enum OperatorType |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·ç¶æ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public enum UserStatus |
| | | { |
| | |
| | | /** |
| | | * æ¼ç¤ºæ¨¡å¼å¼å¸¸ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class DemoModeException extends RuntimeException |
| | | { |
| | |
| | | /** |
| | | * å
¨å±å¼å¸¸ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class GlobalException extends RuntimeException |
| | | { |
| | |
| | | /** |
| | | * ä¸å¡å¼å¸¸ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public final class ServiceException extends RuntimeException |
| | | { |
| | |
| | | /** |
| | | * å·¥å
·ç±»å¼å¸¸ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class UtilException extends RuntimeException |
| | | { |
| | |
| | | /** |
| | | * åºç¡å¼å¸¸ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class BaseException extends RuntimeException |
| | | { |
| | |
| | | /** |
| | | * æ件信æ¯å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileException extends BaseException |
| | | { |
| | |
| | | /** |
| | | * æ件å称è¶
é¿éå¶å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileNameLengthLimitExceededException extends FileException |
| | | { |
| | |
| | | /** |
| | | * æ件å大å°éå¶å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileSizeLimitExceededException extends FileException |
| | | { |
| | |
| | | /** |
| | | * æ件ä¸ä¼ å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileUploadException extends Exception |
| | | { |
| | |
| | | /** |
| | | * æ件ä¸ä¼ 误å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class InvalidExtensionException extends FileUploadException |
| | | { |
| | |
| | | /** |
| | | * 计åçç¥å¼å¸¸ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class TaskException extends Exception |
| | | { |
| | |
| | | /** |
| | | * é»ååIPå¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class BlackListException extends UserException |
| | | { |
| | |
| | | /** |
| | | * éªè¯ç é误å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class CaptchaException extends UserException |
| | | { |
| | |
| | | /** |
| | | * éªè¯ç 失æå¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class CaptchaExpireException extends UserException |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·ä¿¡æ¯å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class UserException extends BaseException |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·ä¸åå¨å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class UserNotExistsException extends UserException |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·å¯ç ä¸æ£ç¡®æä¸ç¬¦åè§èå¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class UserPasswordNotMatchException extends UserException |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·é误æ大次æ°å¼å¸¸ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class UserPasswordRetryLimitExceedException extends UserException |
| | | { |
| | |
| | | /** |
| | | * æé¤JSONææå±æ§ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class PropertyPreExcludeFilter extends SimplePropertyPreFilter |
| | | { |
| | |
| | | /** |
| | | * Repeatable è¿æ»¤å¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class RepeatableFilter implements Filter |
| | | { |
| | |
| | | /** |
| | | * æ建å¯éå¤è¯»åinputStreamçrequest |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper |
| | | { |
| | |
| | | /** |
| | | * é²æ¢XSSæ»å»çè¿æ»¤å¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class XssFilter implements Filter |
| | | { |
| | |
| | | /** |
| | | * XSSè¿æ»¤å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper |
| | | { |
| | |
| | | /** |
| | | * 精确çæµ®ç¹æ°è¿ç® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Arith |
| | | { |
| | |
| | | /** |
| | | * æ¶é´å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class DateUtils extends org.apache.commons.lang3.time.DateUtils |
| | | { |
| | |
| | | /** |
| | | * åå
¸å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class DictUtils |
| | | { |
| | |
| | | /** |
| | | * é误信æ¯å¤çç±»ã |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class ExceptionUtil |
| | | { |
| | |
| | | /** |
| | | * å¤ç并记å½æ¥å¿æ件 |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class LogUtils |
| | | { |
| | |
| | | /** |
| | | * è·åi18nèµæºæ件 |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class MessageUtils |
| | | { |
| | |
| | | /** |
| | | * å页工å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class PageUtils extends PageHelper |
| | | { |
| | |
| | | /** |
| | | * å®å
¨æå¡å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SecurityUtils |
| | | { |
| | |
| | | /** |
| | | * 客æ·ç«¯å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class ServletUtils |
| | | { |
| | |
| | | /** |
| | | * å符串工å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class StringUtils extends org.apache.commons.lang3.StringUtils |
| | | { |
| | |
| | | /** |
| | | * 线ç¨ç¸å
³å·¥å
·ç±». |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Threads |
| | | { |
| | |
| | | /** |
| | | * Bean å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class BeanUtils extends org.springframework.beans.BeanUtils |
| | | { |
| | |
| | | /** |
| | | * bean对象å±æ§éªè¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class BeanValidators |
| | | { |
| | |
| | | /** |
| | | * æ件类åå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileTypeUtils |
| | | { |
| | |
| | | /** |
| | | * æ件ä¸ä¼ å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileUploadUtils |
| | | { |
| | |
| | | /** |
| | | * æ件å¤çå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FileUtils |
| | | { |
| | |
| | | /** |
| | | * å¾çå¤çå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class ImageUtils |
| | | { |
| | |
| | | /** |
| | | * åªä½ç±»åå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class MimeTypeUtils |
| | | { |
| | |
| | | /** |
| | | * 转ä¹åå转ä¹å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class EscapeUtil |
| | | { |
| | |
| | | /** |
| | | * HTMLè¿æ»¤å¨ï¼ç¨äºå»é¤XSSæ¼æ´éæ£ã |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public final class HTMLFilter |
| | | { |
| | |
| | | /** |
| | | * éç¨httpå·¥å
·å°è£
|
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class HttpHelper |
| | | { |
| | |
| | | /** |
| | | * éç¨httpåéæ¹æ³ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class HttpUtils |
| | | { |
| | |
| | | /** |
| | | * è·åå°åç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class AddressUtils |
| | | { |
| | |
| | | /** |
| | | * è·åIPæ¹æ³ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class IpUtils |
| | | { |
| | |
| | | /** |
| | | * Excelæ°æ®æ ¼å¼å¤çéé
å¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ExcelHandlerAdapter |
| | | { |
| | |
| | | /** |
| | | * Excelç¸å
³å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class ExcelUtil<T> |
| | | { |
| | |
| | | /** |
| | | * åå°å·¥å
·ç±». æä¾è°ç¨getter/setteræ¹æ³, 访é®ç§æåé, è°ç¨ç§ææ¹æ³, è·åæ³åç±»åClass, 被AOPè¿ççå®ç±»çå·¥å
·å½æ°. |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @SuppressWarnings("rawtypes") |
| | | public class ReflectUtils |
| | |
| | | /** |
| | | * Base64å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public final class Base64 |
| | | { |
| | |
| | | /** |
| | | * Md5å å¯æ¹æ³ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Md5Utils |
| | | { |
| | |
| | | /** |
| | | * springå·¥å
·ç±» æ¹ä¾¿å¨éspring管çç¯å¢ä¸è·åbean |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public final class SpringUtils implements BeanFactoryPostProcessor, ApplicationContextAware |
| | |
| | | /** |
| | | * sqlæä½å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SqlUtil |
| | | { |
| | |
| | | /** |
| | | * IDçæå¨å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class IdUtils |
| | | { |
| | |
| | | import com.jcdm.common.utils.StringUtils; |
| | | |
| | | /** |
| | | * @author ruoyi åºåçæç±» |
| | | * @author jc åºåçæç±» |
| | | */ |
| | | public class Seq |
| | | { |
| | |
| | | /** |
| | | * æä¾éç¨å¯ä¸è¯å«ç ï¼universally unique identifierï¼ï¼UUIDï¼å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public final class UUID implements java.io.Serializable, Comparable<UUID> |
| | | { |
| | |
| | | /** |
| | | * èªå®ä¹xssæ ¡éªæ³¨è§£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Target(value = { ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER }) |
| | |
| | | /** |
| | | * èªå®ä¹xssæ ¡éªæ³¨è§£å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class XssValidator implements ConstraintValidator<Xss, String> |
| | | { |
| | |
| | | /** |
| | | * æ°æ®è¿æ»¤å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Aspect |
| | | @Component |
| | |
| | | /** |
| | | * å¤æ°æ®æºå¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Aspect |
| | | @Order(1) |
| | |
| | | /** |
| | | * æä½æ¥å¿è®°å½å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Aspect |
| | | @Component |
| | |
| | | /** |
| | | * éæµå¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | //@Aspect |
| | | //@Component |
| | |
| | | /** |
| | | * ç¨åºæ³¨è§£é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | // 表示éè¿aopæ¡æ¶æ´é²è¯¥ä»£ç对象,AopContextè½å¤è®¿é® |
| | |
| | | /** |
| | | * éªè¯ç é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class CaptchaConfig |
| | |
| | | /** |
| | | * druid é
ç½®å¤æ°æ®æº |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class DruidConfig |
| | |
| | | /** |
| | | * Redis使ç¨FastJsonåºåå |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> |
| | | { |
| | |
| | | /** |
| | | * Filteré
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class FilterConfig |
| | |
| | | /** |
| | | * éªè¯ç ææ¬çæå¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class KaptchaTextCreator extends DefaultTextCreator |
| | | { |
| | |
| | | /** |
| | | * Mybatisæ¯æ*å¹é
æ«æå
|
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class MyBatisConfig |
| | |
| | | /** |
| | | * redisé
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | //@Configuration |
| | | //@EnableCaching |
| | |
| | | /** |
| | | * éç¨é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class ResourcesConfig implements WebMvcConfigurer |
| | |
| | | /** |
| | | * spring securityé
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) |
| | | public class SecurityConfig extends WebSecurityConfigurerAdapter |
| | |
| | | /** |
| | | * æå¡ç¸å
³é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class ServerConfig |
| | |
| | | /** |
| | | * 线ç¨æ± é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | **/ |
| | | @Configuration |
| | | public class ThreadPoolConfig |
| | |
| | | /** |
| | | * druid é
ç½®å±æ§ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class DruidProperties |
| | |
| | | /** |
| | | * 设置Anonymous注解å
许å¿å访é®çurl |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class PermitAllUrlProperties implements InitializingBean, ApplicationContextAware |
| | |
| | | /** |
| | | * å¨ææ°æ®æº |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class DynamicDataSource extends AbstractRoutingDataSource |
| | | { |
| | |
| | | /** |
| | | * æ°æ®æºåæ¢å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class DynamicDataSourceContextHolder |
| | | { |
| | |
| | | /** |
| | | * é²æ¢éå¤æ交æ¦æªå¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public abstract class RepeatSubmitInterceptor implements HandlerInterceptor |
| | |
| | | * å¤æ请æ±urlåæ°æ®æ¯å¦åä¸ä¸æ¬¡ç¸åï¼ |
| | | * å¦æåä¸æ¬¡ç¸åï¼åæ¯éå¤æ交表åã æææ¶é´ä¸º10ç§å
ã |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class SameUrlDataInterceptor extends RepeatSubmitInterceptor |
| | |
| | | /** |
| | | * å¼æ¥ä»»å¡ç®¡çå¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class AsyncManager |
| | | { |
| | |
| | | /** |
| | | * ç¡®ä¿åºç¨éåºæ¶è½å
³éåå°çº¿ç¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class ShutdownManager |
| | |
| | | /** |
| | | * å¼æ¥å·¥åï¼äº§çä»»å¡ç¨ï¼ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class AsyncFactory |
| | | { |
| | |
| | | /** |
| | | * 身份éªè¯ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class AuthenticationContextHolder |
| | | { |
| | |
| | | /** |
| | | * æéä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class PermissionContextHolder |
| | | { |
| | |
| | | /** |
| | | * tokenè¿æ»¤å¨ éªè¯tokenæææ§ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class JwtAuthenticationTokenFilter extends OncePerRequestFilter |
| | |
| | | /** |
| | | * 认è¯å¤±è´¥å¤çç±» è¿åæªææ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class AuthenticationEntryPointImpl implements AuthenticationEntryPoint, Serializable |
| | |
| | | /** |
| | | * èªå®ä¹éåºå¤çç±» è¿åæå |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Configuration |
| | | public class LogoutSuccessHandlerImpl implements LogoutSuccessHandler |
| | |
| | | /** |
| | | * æå¡å¨ç¸å
³ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Server |
| | | { |
| | |
| | | /** |
| | | * CPUç¸å
³ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Cpu |
| | | { |
| | |
| | | /** |
| | | * JVMç¸å
³ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Jvm |
| | | { |
| | |
| | | /** |
| | | * å
§åç¸å
³ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Mem |
| | | { |
| | |
| | | /** |
| | | * ç³»ç»ç¸å
³ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class Sys |
| | | { |
| | |
| | | /** |
| | | * ç³»ç»æ件ç¸å
³ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysFile |
| | | { |
| | |
| | | /** |
| | | * å
¨å±å¼å¸¸å¤çå¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @RestControllerAdvice |
| | | public class GlobalExceptionHandler |
| | |
| | | import com.jcdm.framework.security.context.PermissionContextHolder; |
| | | |
| | | /** |
| | | * RuoYié¦å èªå®ä¹æéå®ç°ï¼ssåèªSpringSecurityé¦åæ¯ |
| | | * èªå®ä¹æéå®ç°ï¼ssåèªSpringSecurityé¦åæ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service("ss") |
| | | public class PermissionService |
| | |
| | | /** |
| | | * ç»å½æ ¡éªæ¹æ³ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class SysLoginService |
| | |
| | | /** |
| | | * ç»å½å¯ç æ¹æ³ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class SysPasswordService |
| | |
| | | /** |
| | | * ç¨æ·æéå¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class SysPermissionService |
| | |
| | | /** |
| | | * 注åæ ¡éªæ¹æ³ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class SysRegisterService |
| | |
| | | /** |
| | | * tokenéªè¯å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | public class TokenService |
| | |
| | | /** |
| | | * ç¨æ·éªè¯å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class UserDetailsServiceImpl implements UserDetailsService |
| | |
| | | /** |
| | | * 读å代ç çæç¸å
³é
ç½® |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component |
| | | @ConfigurationProperties(prefix = "gen") |
| | |
| | | /** |
| | | * 代ç çæ æä½å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/tool/gen") |
| | |
| | | response.reset(); |
| | | response.addHeader("Access-Control-Allow-Origin", "*"); |
| | | response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); |
| | | response.setHeader("Content-Disposition", "attachment; filename=\"ruoyi.zip\""); |
| | | response.setHeader("Content-Disposition", "attachment; filename=\"JCDM.zip\""); |
| | | response.addHeader("Content-Length", "" + data.length); |
| | | response.setContentType("application/octet-stream; charset=UTF-8"); |
| | | IOUtils.write(data, response.getOutputStream()); |
| | |
| | | /** |
| | | * ä¸å¡è¡¨ gen_table |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class GenTable extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * 代ç çæä¸å¡å段表 gen_table_column |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class GenTableColumn extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * ä¸å¡å段 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface GenTableColumnMapper |
| | | { |
| | |
| | | /** |
| | | * ä¸å¡ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface GenTableMapper |
| | | { |
| | |
| | | /** |
| | | * ä¸å¡å段 æå¡å±å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class GenTableColumnServiceImpl implements IGenTableColumnService |
| | |
| | | /** |
| | | * ä¸å¡ æå¡å±å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class GenTableServiceImpl implements IGenTableService |
| | |
| | | /** |
| | | * ä¸å¡å段 æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface IGenTableColumnService |
| | | { |
| | |
| | | /** |
| | | * ä¸å¡ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface IGenTableService |
| | | { |
| | |
| | | /** |
| | | * 代ç çæå¨ å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class GenUtils |
| | | { |
| | |
| | | /** |
| | | * VelocityEngineå·¥å |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class VelocityInitializer |
| | | { |
| | |
| | | /** |
| | | * 模æ¿å¤çå·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class VelocityUtils |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bom.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.main.bs.bom.domain.BsProductBomInfo; |
| | | import com.jcdm.main.bs.bom.service.IBsProductBomInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * åºç¡BOMController |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/bom") |
| | | public class BsProductBomInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsProductBomInfoService bsProductBomInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bom:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | startPage(); |
| | | List<BsProductBomInfo> list = bsProductBomInfoService.selectBsProductBomInfoList(bsProductBomInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºåºç¡BOMå表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bom:export')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | List<BsProductBomInfo> list = bsProductBomInfoService.selectBsProductBomInfoList(bsProductBomInfo); |
| | | ExcelUtil<BsProductBomInfo> util = new ExcelUtil<BsProductBomInfo>(BsProductBomInfo.class); |
| | | util.exportExcel(response, list, "åºç¡BOMæ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·ååºç¡BOM详ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bom:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsProductBomInfoService.selectBsProductBomInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bom:add')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | return toAjax(bsProductBomInfoService.insertBsProductBomInfo(bsProductBomInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bom:edit')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | return toAjax(bsProductBomInfoService.updateBsProductBomInfo(bsProductBomInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOM |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bom:remove')") |
| | | @Log(title = "åºç¡BOM", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsProductBomInfoService.deleteBsProductBomInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bom.domain; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * åºç¡BOM对象 bs_product_bom_info |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public class BsProductBomInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** BOMç¼ç */ |
| | | @Excel(name = "BOMç¼ç ") |
| | | private String bomCode; |
| | | |
| | | /** BOMå称 */ |
| | | @Excel(name = "BOMå称") |
| | | private String bomName; |
| | | |
| | | /** 产åç¼ç */ |
| | | @Excel(name = "产åç¼ç ") |
| | | private String productCode; |
| | | |
| | | /** 产åå称 */ |
| | | @Excel(name = "产åå称") |
| | | private String productName; |
| | | |
| | | /** çæ¬ */ |
| | | @Excel(name = "çæ¬") |
| | | private String version; |
| | | |
| | | /** ç¶æ(åå
¸) */ |
| | | @Excel(name = "ç¶æ(åå
¸)") |
| | | private String status; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** æ°æ®æ¥æº */ |
| | | @Excel(name = "æ°æ®æ¥æº") |
| | | private String dataSource; |
| | | |
| | | /** åºç¡BOMåä¿¡æ¯ä¿¡æ¯ */ |
| | | private List<BsProductBomChildInfo> bsProductBomChildInfoList; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setBomCode(String bomCode) |
| | | { |
| | | this.bomCode = bomCode; |
| | | } |
| | | |
| | | public String getBomCode() |
| | | { |
| | | return bomCode; |
| | | } |
| | | public void setBomName(String bomName) |
| | | { |
| | | this.bomName = bomName; |
| | | } |
| | | |
| | | public String getBomName() |
| | | { |
| | | return bomName; |
| | | } |
| | | public void setProductCode(String productCode) |
| | | { |
| | | this.productCode = productCode; |
| | | } |
| | | |
| | | public String getProductCode() |
| | | { |
| | | return productCode; |
| | | } |
| | | public void setProductName(String productName) |
| | | { |
| | | this.productName = productName; |
| | | } |
| | | |
| | | public String getProductName() |
| | | { |
| | | return productName; |
| | | } |
| | | public void setVersion(String version) |
| | | { |
| | | this.version = version; |
| | | } |
| | | |
| | | public String getVersion() |
| | | { |
| | | return version; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setCreateUser(String createUser) |
| | | { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public String getCreateUser() |
| | | { |
| | | return createUser; |
| | | } |
| | | public void setUpdateUser(String updateUser) |
| | | { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public String getUpdateUser() |
| | | { |
| | | return updateUser; |
| | | } |
| | | public void setDataSource(String dataSource) |
| | | { |
| | | this.dataSource = dataSource; |
| | | } |
| | | |
| | | public String getDataSource() |
| | | { |
| | | return dataSource; |
| | | } |
| | | |
| | | public List<BsProductBomChildInfo> getBsProductBomChildInfoList() |
| | | { |
| | | return bsProductBomChildInfoList; |
| | | } |
| | | |
| | | public void setBsProductBomChildInfoList(List<BsProductBomChildInfo> bsProductBomChildInfoList) |
| | | { |
| | | this.bsProductBomChildInfoList = bsProductBomChildInfoList; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("bomCode", getBomCode()) |
| | | .append("bomName", getBomName()) |
| | | .append("productCode", getProductCode()) |
| | | .append("productName", getProductName()) |
| | | .append("version", getVersion()) |
| | | .append("status", getStatus()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("remark", getRemark()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("dataSource", getDataSource()) |
| | | .append("bsProductBomChildInfoList", getBsProductBomChildInfoList()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bom.mapper; |
| | | |
| | | import com.jcdm.main.bs.bom.domain.BsProductBomInfo; |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMMapperæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface BsProductBomInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return åºç¡BOM |
| | | */ |
| | | public BsProductBomInfo selectBsProductBomInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return åºç¡BOMéå |
| | | */ |
| | | public List<BsProductBomInfo> selectBsProductBomInfoList(BsProductBomInfo bsProductBomInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsProductBomInfo(BsProductBomInfo bsProductBomInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsProductBomInfo(BsProductBomInfo bsProductBomInfo); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOM |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomChildInfoByBomCodes(Long[] ids); |
| | | |
| | | /** |
| | | * æ¹éæ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfoList åºç¡BOMåä¿¡æ¯å表 |
| | | * @return ç»æ |
| | | */ |
| | | public int batchBsProductBomChildInfo(List<BsProductBomChildInfo> bsProductBomChildInfoList); |
| | | |
| | | |
| | | /** |
| | | * éè¿åºç¡BOM主é®å é¤åºç¡BOMåä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMID |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomChildInfoByBomCode(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bom.service; |
| | | |
| | | import com.jcdm.main.bs.bom.domain.BsProductBomInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMServiceæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface IBsProductBomInfoService |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return åºç¡BOM |
| | | */ |
| | | public BsProductBomInfo selectBsProductBomInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return åºç¡BOMéå |
| | | */ |
| | | public List<BsProductBomInfo> selectBsProductBomInfoList(BsProductBomInfo bsProductBomInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsProductBomInfo(BsProductBomInfo bsProductBomInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsProductBomInfo(BsProductBomInfo bsProductBomInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOM |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOM主é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bom.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.bs.bom.domain.BsProductBomInfo; |
| | | import com.jcdm.main.bs.bom.mapper.BsProductBomInfoMapper; |
| | | import com.jcdm.main.bs.bom.service.IBsProductBomInfoService; |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.ArrayList; |
| | | import com.jcdm.common.utils.StringUtils; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | /** |
| | | * åºç¡BOMServiceä¸å¡å±å¤ç |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | @Service |
| | | public class BsProductBomInfoServiceImpl implements IBsProductBomInfoService |
| | | { |
| | | @Autowired |
| | | private BsProductBomInfoMapper bsProductBomInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOM |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return åºç¡BOM |
| | | */ |
| | | @Override |
| | | public BsProductBomInfo selectBsProductBomInfoById(Long id) |
| | | { |
| | | return bsProductBomInfoMapper.selectBsProductBomInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMå表 |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return åºç¡BOM |
| | | */ |
| | | @Override |
| | | public List<BsProductBomInfo> selectBsProductBomInfoList(BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | return bsProductBomInfoMapper.selectBsProductBomInfoList(bsProductBomInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOM |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int insertBsProductBomInfo(BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | bsProductBomInfo.setCreateTime(DateUtils.getNowDate()); |
| | | int rows = bsProductBomInfoMapper.insertBsProductBomInfo(bsProductBomInfo); |
| | | insertBsProductBomChildInfo(bsProductBomInfo); |
| | | return rows; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOM |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int updateBsProductBomInfo(BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | bsProductBomInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | bsProductBomInfoMapper.deleteBsProductBomChildInfoByBomCode(bsProductBomInfo.getId()); |
| | | insertBsProductBomChildInfo(bsProductBomInfo); |
| | | return bsProductBomInfoMapper.updateBsProductBomInfo(bsProductBomInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOM |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int deleteBsProductBomInfoByIds(Long[] ids) |
| | | { |
| | | bsProductBomInfoMapper.deleteBsProductBomChildInfoByBomCodes(ids); |
| | | return bsProductBomInfoMapper.deleteBsProductBomInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Transactional |
| | | @Override |
| | | public int deleteBsProductBomInfoById(Long id) |
| | | { |
| | | bsProductBomInfoMapper.deleteBsProductBomChildInfoByBomCode(id); |
| | | return bsProductBomInfoMapper.deleteBsProductBomInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomInfo åºç¡BOM对象 |
| | | */ |
| | | public void insertBsProductBomChildInfo(BsProductBomInfo bsProductBomInfo) |
| | | { |
| | | List<BsProductBomChildInfo> bsProductBomChildInfoList = bsProductBomInfo.getBsProductBomChildInfoList(); |
| | | Long id = bsProductBomInfo.getId(); |
| | | if (StringUtils.isNotNull(bsProductBomChildInfoList)) |
| | | { |
| | | List<BsProductBomChildInfo> list = new ArrayList<BsProductBomChildInfo>(); |
| | | for (BsProductBomChildInfo bsProductBomChildInfo : bsProductBomChildInfoList) |
| | | { |
| | | bsProductBomChildInfo.setBomCode(id.toString()); |
| | | list.add(bsProductBomChildInfo); |
| | | } |
| | | if (list.size() > 0) |
| | | { |
| | | bsProductBomInfoMapper.batchBsProductBomChildInfo(list); |
| | | } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bomchild.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | import com.jcdm.main.bs.bomchild.service.IBsProductBomChildInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Controller |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/bomchild") |
| | | public class BsProductBomChildInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsProductBomChildInfoService bsProductBomChildInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomchild:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | startPage(); |
| | | List<BsProductBomChildInfo> list = bsProductBomChildInfoService.selectBsProductBomChildInfoList(bsProductBomChildInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºåºç¡BOMåä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomchild:export')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | List<BsProductBomChildInfo> list = bsProductBomChildInfoService.selectBsProductBomChildInfoList(bsProductBomChildInfo); |
| | | ExcelUtil<BsProductBomChildInfo> util = new ExcelUtil<BsProductBomChildInfo>(BsProductBomChildInfo.class); |
| | | util.exportExcel(response, list, "åºç¡BOMåä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·ååºç¡BOMåä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomchild:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsProductBomChildInfoService.selectBsProductBomChildInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomchild:add')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | return toAjax(bsProductBomChildInfoService.insertBsProductBomChildInfo(bsProductBomChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomchild:edit')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | return toAjax(bsProductBomChildInfoService.updateBsProductBomChildInfo(bsProductBomChildInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:bomchild:remove')") |
| | | @Log(title = "åºç¡BOMåä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsProductBomChildInfoService.deleteBsProductBomChildInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bomchild.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯å¯¹è±¡ bs_product_bom_child_info |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public class BsProductBomChildInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** å·¥åºç¼ç */ |
| | | @Excel(name = "å·¥åºç¼ç ") |
| | | private String opCode; |
| | | |
| | | /** å·¥åºå称 */ |
| | | @Excel(name = "å·¥åºå称") |
| | | private String opName; |
| | | |
| | | /** ç©æç¼ç */ |
| | | @Excel(name = "ç©æç¼ç ") |
| | | private String materialCode; |
| | | |
| | | /** ç©æå称 */ |
| | | @Excel(name = "ç©æå称") |
| | | private String materialName; |
| | | |
| | | /** åè */ |
| | | @Excel(name = "åè") |
| | | private String costQty; |
| | | |
| | | /** åä½ */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | /** é¢çå段1 */ |
| | | @Excel(name = "é¢çå段1") |
| | | private String spareField1; |
| | | |
| | | /** é¢çå段2 */ |
| | | @Excel(name = "é¢çå段2") |
| | | private String spareField2; |
| | | |
| | | /** é¢çå段3 */ |
| | | @Excel(name = "é¢çå段3") |
| | | private String spareField3; |
| | | |
| | | /** BOMç¼ç */ |
| | | @Excel(name = "BOMç¼ç ") |
| | | private String bomCode; |
| | | |
| | | /** BOM主表ID */ |
| | | private Long bomInfoId; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setOpCode(String opCode) |
| | | { |
| | | this.opCode = opCode; |
| | | } |
| | | |
| | | public String getOpCode() |
| | | { |
| | | return opCode; |
| | | } |
| | | public void setOpName(String opName) |
| | | { |
| | | this.opName = opName; |
| | | } |
| | | |
| | | public String getOpName() |
| | | { |
| | | return opName; |
| | | } |
| | | public void setMaterialCode(String materialCode) |
| | | { |
| | | this.materialCode = materialCode; |
| | | } |
| | | |
| | | public String getMaterialCode() |
| | | { |
| | | return materialCode; |
| | | } |
| | | public void setMaterialName(String materialName) |
| | | { |
| | | this.materialName = materialName; |
| | | } |
| | | |
| | | public String getMaterialName() |
| | | { |
| | | return materialName; |
| | | } |
| | | public void setCostQty(String costQty) |
| | | { |
| | | this.costQty = costQty; |
| | | } |
| | | |
| | | public String getCostQty() |
| | | { |
| | | return costQty; |
| | | } |
| | | public void setUnit(String unit) |
| | | { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getUnit() |
| | | { |
| | | return unit; |
| | | } |
| | | public void setSpareField1(String spareField1) |
| | | { |
| | | this.spareField1 = spareField1; |
| | | } |
| | | |
| | | public String getSpareField1() |
| | | { |
| | | return spareField1; |
| | | } |
| | | public void setSpareField2(String spareField2) |
| | | { |
| | | this.spareField2 = spareField2; |
| | | } |
| | | |
| | | public String getSpareField2() |
| | | { |
| | | return spareField2; |
| | | } |
| | | public void setSpareField3(String spareField3) |
| | | { |
| | | this.spareField3 = spareField3; |
| | | } |
| | | |
| | | public String getSpareField3() |
| | | { |
| | | return spareField3; |
| | | } |
| | | public void setBomCode(String bomCode) |
| | | { |
| | | this.bomCode = bomCode; |
| | | } |
| | | |
| | | public String getBomCode() |
| | | { |
| | | return bomCode; |
| | | } |
| | | public void setBomInfoId(Long bomInfoId) |
| | | { |
| | | this.bomInfoId = bomInfoId; |
| | | } |
| | | |
| | | public Long getBomInfoId() |
| | | { |
| | | return bomInfoId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("opCode", getOpCode()) |
| | | .append("opName", getOpName()) |
| | | .append("materialCode", getMaterialCode()) |
| | | .append("materialName", getMaterialName()) |
| | | .append("costQty", getCostQty()) |
| | | .append("unit", getUnit()) |
| | | .append("spareField1", getSpareField1()) |
| | | .append("spareField2", getSpareField2()) |
| | | .append("spareField3", getSpareField3()) |
| | | .append("remark", getRemark()) |
| | | .append("bomCode", getBomCode()) |
| | | .append("bomInfoId", getBomInfoId()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bomchild.mapper; |
| | | |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface BsProductBomChildInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | public BsProductBomChildInfo selectBsProductBomChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return åºç¡BOMåä¿¡æ¯éå |
| | | */ |
| | | public List<BsProductBomChildInfo> selectBsProductBomChildInfoList(BsProductBomChildInfo bsProductBomChildInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsProductBomChildInfo(BsProductBomChildInfo bsProductBomChildInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsProductBomChildInfo(BsProductBomChildInfo bsProductBomChildInfo); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomChildInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bomchild.service; |
| | | |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface IBsProductBomChildInfoService |
| | | { |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | public BsProductBomChildInfo selectBsProductBomChildInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return åºç¡BOMåä¿¡æ¯éå |
| | | */ |
| | | public List<BsProductBomChildInfo> selectBsProductBomChildInfoList(BsProductBomChildInfo bsProductBomChildInfo); |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsProductBomChildInfo(BsProductBomChildInfo bsProductBomChildInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsProductBomChildInfo(BsProductBomChildInfo bsProductBomChildInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOMåä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomChildInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsProductBomChildInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.bomchild.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.jcdm.main.bs.bomchild.domain.BsProductBomChildInfo; |
| | | import com.jcdm.main.bs.bomchild.mapper.BsProductBomChildInfoMapper; |
| | | import com.jcdm.main.bs.bomchild.service.IBsProductBomChildInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * åºç¡BOMåä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | @Service |
| | | public class BsProductBomChildInfoServiceImpl implements IBsProductBomChildInfoService |
| | | { |
| | | @Autowired |
| | | private BsProductBomChildInfoMapper bsProductBomChildInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsProductBomChildInfo selectBsProductBomChildInfoById(Long id) |
| | | { |
| | | return bsProductBomChildInfoMapper.selectBsProductBomChildInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return åºç¡BOMåä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsProductBomChildInfo> selectBsProductBomChildInfoList(BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | return bsProductBomChildInfoMapper.selectBsProductBomChildInfoList(bsProductBomChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsProductBomChildInfo(BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | return bsProductBomChildInfoMapper.insertBsProductBomChildInfo(bsProductBomChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param bsProductBomChildInfo åºç¡BOMåä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsProductBomChildInfo(BsProductBomChildInfo bsProductBomChildInfo) |
| | | { |
| | | return bsProductBomChildInfoMapper.updateBsProductBomChildInfo(bsProductBomChildInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤åºç¡BOMåä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çåºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsProductBomChildInfoByIds(Long[] ids) |
| | | { |
| | | return bsProductBomChildInfoMapper.deleteBsProductBomChildInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤åºç¡BOMåä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id åºç¡BOMåä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsProductBomChildInfoById(Long id) |
| | | { |
| | | return bsProductBomChildInfoMapper.deleteBsProductBomChildInfoById(id); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.material.controller; |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.jcdm.main.bs.material.domain.BsMaterialInfo; |
| | | import com.jcdm.main.bs.material.service.IBsMaterialInfoService; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.jcdm.common.annotation.Log; |
| | | import com.jcdm.common.core.controller.BaseController; |
| | | import com.jcdm.common.core.domain.AjaxResult; |
| | | import com.jcdm.common.enums.BusinessType; |
| | | import com.jcdm.common.utils.poi.ExcelUtil; |
| | | import com.jcdm.common.core.page.TableDataInfo; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Controller |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/bs/material") |
| | | public class BsMaterialInfoController extends BaseController |
| | | { |
| | | @Autowired |
| | | private IBsMaterialInfoService bsMaterialInfoService; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:material:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | startPage(); |
| | | List<BsMaterialInfo> list = bsMaterialInfoService.selectBsMaterialInfoList(bsMaterialInfo); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导åºç©æä¿¡æ¯å表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:material:export')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | List<BsMaterialInfo> list = bsMaterialInfoService.selectBsMaterialInfoList(bsMaterialInfo); |
| | | ExcelUtil<BsMaterialInfo> util = new ExcelUtil<BsMaterialInfo>(BsMaterialInfo.class); |
| | | util.exportExcel(response, list, "ç©æä¿¡æ¯æ°æ®"); |
| | | } |
| | | |
| | | /** |
| | | * è·åç©æä¿¡æ¯è¯¦ç»ä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:material:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | return success(bsMaterialInfoService.selectBsMaterialInfoById(id)); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:material:add')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | return toAjax(bsMaterialInfoService.insertBsMaterialInfo(bsMaterialInfo)); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:material:edit')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | return toAjax(bsMaterialInfoService.updateBsMaterialInfo(bsMaterialInfo)); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('bs:material:remove')") |
| | | @Log(title = "ç©æä¿¡æ¯", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | return toAjax(bsMaterialInfoService.deleteBsMaterialInfoByIds(ids)); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.material.domain; |
| | | |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.jcdm.common.annotation.Excel; |
| | | import com.jcdm.common.core.domain.BaseEntity; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯å¯¹è±¡ bs_material_info |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public class BsMaterialInfo extends BaseEntity |
| | | { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 主é®id */ |
| | | private Long id; |
| | | |
| | | /** ç©æç¼å· */ |
| | | @Excel(name = "ç©æç¼å·") |
| | | private String materialCode; |
| | | |
| | | /** ç©æå称 */ |
| | | @Excel(name = "ç©æå称") |
| | | private String materialName; |
| | | |
| | | /** è§å¾ */ |
| | | @Excel(name = "è§å¾") |
| | | private String materialView; |
| | | |
| | | /** ç§ç±» */ |
| | | @Excel(name = "ç§ç±»") |
| | | private String typeZ; |
| | | |
| | | /** ç±»å */ |
| | | @Excel(name = "ç±»å") |
| | | private String typeL; |
| | | |
| | | /** åä½ */ |
| | | @Excel(name = "åä½") |
| | | private String unit; |
| | | |
| | | /** çæ¬ */ |
| | | @Excel(name = "çæ¬") |
| | | private String matterVersion; |
| | | |
| | | /** å¤æ³¨ */ |
| | | @Excel(name = "å¤æ³¨") |
| | | private String remarks; |
| | | |
| | | /** å建ç¨æ· */ |
| | | @Excel(name = "å建ç¨æ·") |
| | | private String createUser; |
| | | |
| | | /** æ´æ¹ç¨æ· */ |
| | | @Excel(name = "æ´æ¹ç¨æ·") |
| | | private String updateUser; |
| | | |
| | | /** ERPè§æ ¼ */ |
| | | @Excel(name = "ERPè§æ ¼") |
| | | private String erpSpec; |
| | | |
| | | /** æ°æ®æ¥æº */ |
| | | @Excel(name = "æ°æ®æ¥æº") |
| | | private String dataSource; |
| | | |
| | | /** çæ¬ */ |
| | | @Excel(name = "çæ¬") |
| | | private String version; |
| | | |
| | | /** ç¶æ */ |
| | | @Excel(name = "ç¶æ") |
| | | private String status; |
| | | |
| | | /** åå */ |
| | | @Excel(name = "åå") |
| | | private String supplier; |
| | | |
| | | public void setId(Long id) |
| | | { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getId() |
| | | { |
| | | return id; |
| | | } |
| | | public void setMaterialCode(String materialCode) |
| | | { |
| | | this.materialCode = materialCode; |
| | | } |
| | | |
| | | public String getMaterialCode() |
| | | { |
| | | return materialCode; |
| | | } |
| | | public void setMaterialName(String materialName) |
| | | { |
| | | this.materialName = materialName; |
| | | } |
| | | |
| | | public String getMaterialName() |
| | | { |
| | | return materialName; |
| | | } |
| | | public void setMaterialView(String materialView) |
| | | { |
| | | this.materialView = materialView; |
| | | } |
| | | |
| | | public String getMaterialView() |
| | | { |
| | | return materialView; |
| | | } |
| | | public void setTypeZ(String typeZ) |
| | | { |
| | | this.typeZ = typeZ; |
| | | } |
| | | |
| | | public String getTypeZ() |
| | | { |
| | | return typeZ; |
| | | } |
| | | public void setTypeL(String typeL) |
| | | { |
| | | this.typeL = typeL; |
| | | } |
| | | |
| | | public String getTypeL() |
| | | { |
| | | return typeL; |
| | | } |
| | | public void setUnit(String unit) |
| | | { |
| | | this.unit = unit; |
| | | } |
| | | |
| | | public String getUnit() |
| | | { |
| | | return unit; |
| | | } |
| | | public void setMatterVersion(String matterVersion) |
| | | { |
| | | this.matterVersion = matterVersion; |
| | | } |
| | | |
| | | public String getMatterVersion() |
| | | { |
| | | return matterVersion; |
| | | } |
| | | public void setRemarks(String remarks) |
| | | { |
| | | this.remarks = remarks; |
| | | } |
| | | |
| | | public String getRemarks() |
| | | { |
| | | return remarks; |
| | | } |
| | | public void setCreateUser(String createUser) |
| | | { |
| | | this.createUser = createUser; |
| | | } |
| | | |
| | | public String getCreateUser() |
| | | { |
| | | return createUser; |
| | | } |
| | | public void setUpdateUser(String updateUser) |
| | | { |
| | | this.updateUser = updateUser; |
| | | } |
| | | |
| | | public String getUpdateUser() |
| | | { |
| | | return updateUser; |
| | | } |
| | | public void setErpSpec(String erpSpec) |
| | | { |
| | | this.erpSpec = erpSpec; |
| | | } |
| | | |
| | | public String getErpSpec() |
| | | { |
| | | return erpSpec; |
| | | } |
| | | public void setDataSource(String dataSource) |
| | | { |
| | | this.dataSource = dataSource; |
| | | } |
| | | |
| | | public String getDataSource() |
| | | { |
| | | return dataSource; |
| | | } |
| | | public void setVersion(String version) |
| | | { |
| | | this.version = version; |
| | | } |
| | | |
| | | public String getVersion() |
| | | { |
| | | return version; |
| | | } |
| | | public void setStatus(String status) |
| | | { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getStatus() |
| | | { |
| | | return status; |
| | | } |
| | | public void setSupplier(String supplier) |
| | | { |
| | | this.supplier = supplier; |
| | | } |
| | | |
| | | public String getSupplier() |
| | | { |
| | | return supplier; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
| | | .append("id", getId()) |
| | | .append("materialCode", getMaterialCode()) |
| | | .append("materialName", getMaterialName()) |
| | | .append("materialView", getMaterialView()) |
| | | .append("typeZ", getTypeZ()) |
| | | .append("typeL", getTypeL()) |
| | | .append("unit", getUnit()) |
| | | .append("matterVersion", getMatterVersion()) |
| | | .append("remarks", getRemarks()) |
| | | .append("createUser", getCreateUser()) |
| | | .append("createTime", getCreateTime()) |
| | | .append("updateUser", getUpdateUser()) |
| | | .append("updateTime", getUpdateTime()) |
| | | .append("erpSpec", getErpSpec()) |
| | | .append("dataSource", getDataSource()) |
| | | .append("version", getVersion()) |
| | | .append("status", getStatus()) |
| | | .append("supplier", getSupplier()) |
| | | .toString(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.material.mapper; |
| | | |
| | | import com.jcdm.main.bs.material.domain.BsMaterialInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface BsMaterialInfoMapper |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | public BsMaterialInfo selectBsMaterialInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç©æä¿¡æ¯éå |
| | | */ |
| | | public List<BsMaterialInfo> selectBsMaterialInfoList(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çæ°æ®ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoByIds(Long[] ids); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.material.service; |
| | | |
| | | import com.jcdm.main.bs.material.domain.BsMaterialInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | public interface IBsMaterialInfoService |
| | | { |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | public BsMaterialInfo selectBsMaterialInfoById(Long id); |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç©æä¿¡æ¯éå |
| | | */ |
| | | public List<BsMaterialInfo> selectBsMaterialInfoList(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo); |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çç©æä¿¡æ¯ä¸»é®éå |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoByIds(Long[] ids); |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | public int deleteBsMaterialInfoById(Long id); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.jcdm.main.bs.material.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.bs.material.domain.BsMaterialInfo; |
| | | import com.jcdm.main.bs.material.mapper.BsMaterialInfoMapper; |
| | | import com.jcdm.main.bs.material.service.IBsMaterialInfoService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * ç©æä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author yyt |
| | | * @date 2023-12-09 |
| | | */ |
| | | @Service |
| | | public class BsMaterialInfoServiceImpl implements IBsMaterialInfoService |
| | | { |
| | | @Autowired |
| | | private BsMaterialInfoMapper bsMaterialInfoMapper; |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public BsMaterialInfo selectBsMaterialInfoById(Long id) |
| | | { |
| | | return bsMaterialInfoMapper.selectBsMaterialInfoById(id); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç©æä¿¡æ¯ |
| | | */ |
| | | @Override |
| | | public List<BsMaterialInfo> selectBsMaterialInfoList(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | return bsMaterialInfoMapper.selectBsMaterialInfoList(bsMaterialInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ°å¢ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int insertBsMaterialInfo(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | bsMaterialInfo.setCreateTime(DateUtils.getNowDate()); |
| | | return bsMaterialInfoMapper.insertBsMaterialInfo(bsMaterialInfo); |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç©æä¿¡æ¯ |
| | | * |
| | | * @param bsMaterialInfo ç©æä¿¡æ¯ |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int updateBsMaterialInfo(BsMaterialInfo bsMaterialInfo) |
| | | { |
| | | bsMaterialInfo.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsMaterialInfoMapper.updateBsMaterialInfo(bsMaterialInfo); |
| | | } |
| | | |
| | | /** |
| | | * æ¹éå é¤ç©æä¿¡æ¯ |
| | | * |
| | | * @param ids éè¦å é¤çç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsMaterialInfoByIds(Long[] ids) |
| | | { |
| | | return bsMaterialInfoMapper.deleteBsMaterialInfoByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * å é¤ç©æä¿¡æ¯ä¿¡æ¯ |
| | | * |
| | | * @param id ç©æä¿¡æ¯ä¸»é® |
| | | * @return ç»æ |
| | | */ |
| | | @Override |
| | | public int deleteBsMaterialInfoById(Long id) |
| | | { |
| | | return bsMaterialInfoMapper.deleteBsMaterialInfoById(id); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 车é´ä¿¡æ¯Controller |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * @date 2023-12-06 |
| | | */ |
| | | @RestController |
| | |
| | | /** |
| | | * 车é´ä¿¡æ¯å¯¹è±¡ bs_workshop_info |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * @date 2023-12-06 |
| | | */ |
| | | public class BsWorkshopInfo extends BaseEntity |
| | |
| | | /** |
| | | * 车é´ä¿¡æ¯Mapperæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * @date 2023-12-06 |
| | | */ |
| | | public interface BsWorkshopInfoMapper |
| | |
| | | /** |
| | | * 车é´ä¿¡æ¯Serviceæ¥å£ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * @date 2023-12-06 |
| | | */ |
| | | public interface IBsWorkshopInfoService |
| | |
| | | /** |
| | | * 车é´ä¿¡æ¯Serviceä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * @date 2023-12-06 |
| | | */ |
| | | @Service |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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.jcdm.main.bs.bom.mapper.BsProductBomInfoMapper"> |
| | | |
| | | <resultMap type="BsProductBomInfo" id="BsProductBomInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="bomCode" column="bom_code" /> |
| | | <result property="bomName" column="bom_name" /> |
| | | <result property="productCode" column="product_code" /> |
| | | <result property="productName" column="product_name" /> |
| | | <result property="version" column="version" /> |
| | | <result property="status" column="status" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="dataSource" column="data_source" /> |
| | | </resultMap> |
| | | |
| | | <resultMap id="BsProductBomInfoBsProductBomChildInfoResult" type="BsProductBomInfo" extends="BsProductBomInfoResult"> |
| | | <collection property="bsProductBomChildInfoList" notNullColumn="sub_id" javaType="java.util.List" resultMap="BsProductBomChildInfoResult" /> |
| | | </resultMap> |
| | | |
| | | <resultMap type="BsProductBomChildInfo" id="BsProductBomChildInfoResult"> |
| | | <result property="id" column="sub_id" /> |
| | | <result property="opCode" column="sub_op_code" /> |
| | | <result property="opName" column="sub_op_name" /> |
| | | <result property="materialCode" column="sub_material_code" /> |
| | | <result property="materialName" column="sub_material_name" /> |
| | | <result property="costQty" column="sub_cost_qty" /> |
| | | <result property="unit" column="sub_unit" /> |
| | | <result property="spareField1" column="sub_spare_field_1" /> |
| | | <result property="spareField2" column="sub_spare_field_2" /> |
| | | <result property="spareField3" column="sub_spare_field_3" /> |
| | | <result property="remark" column="sub_remark" /> |
| | | <result property="bomCode" column="sub_bom_code" /> |
| | | <result property="bomInfoId" column="sub_bom_info_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsProductBomInfoVo"> |
| | | select id, bom_code, bom_name, product_code, product_name, version, status, spare_field_1, spare_field_2, remark, create_user, create_time, update_user, update_time, data_source from bs_product_bom_info |
| | | </sql> |
| | | |
| | | <select id="selectBsProductBomInfoList" parameterType="BsProductBomInfo" resultMap="BsProductBomInfoResult"> |
| | | <include refid="selectBsProductBomInfoVo"/> |
| | | <where> |
| | | <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if> |
| | | <if test="bomName != null and bomName != ''"> and bom_name like concat('%', #{bomName}, '%')</if> |
| | | <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
| | | <if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
| | | <if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsProductBomInfoById" parameterType="Long" resultMap="BsProductBomInfoBsProductBomChildInfoResult"> |
| | | select a.id, a.bom_code, a.bom_name, a.product_code, a.product_name, a.version, a.status, a.spare_field_1, a.spare_field_2, a.remark, a.create_user, a.create_time, a.update_user, a.update_time, a.data_source, |
| | | b.id as sub_id, b.op_code as sub_op_code, b.op_name as sub_op_name, b.material_code as sub_material_code, b.material_name as sub_material_name, b.cost_qty as sub_cost_qty, b.unit as sub_unit, b.spare_field_1 as sub_spare_field_1, b.spare_field_2 as sub_spare_field_2, b.spare_field_3 as sub_spare_field_3, b.remark as sub_remark, b.bom_code as sub_bom_code, b.bom_info_id as sub_bom_info_id |
| | | from bs_product_bom_info a |
| | | left join bs_product_bom_child_info b on b.bom_code = a.id |
| | | where a.id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsProductBomInfo" parameterType="BsProductBomInfo"> |
| | | insert into bs_product_bom_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="bomCode != null and bomCode != ''">bom_code,</if> |
| | | <if test="bomName != null">bom_name,</if> |
| | | <if test="productCode != null and productCode != ''">product_code,</if> |
| | | <if test="productName != null">product_name,</if> |
| | | <if test="version != null">version,</if> |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="dataSource != null">data_source,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="bomCode != null and bomCode != ''">#{bomCode},</if> |
| | | <if test="bomName != null">#{bomName},</if> |
| | | <if test="productCode != null and productCode != ''">#{productCode},</if> |
| | | <if test="productName != null">#{productName},</if> |
| | | <if test="version != null">#{version},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="dataSource != null">#{dataSource},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsProductBomInfo" parameterType="BsProductBomInfo"> |
| | | update bs_product_bom_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="bomCode != null and bomCode != ''">bom_code = #{bomCode},</if> |
| | | <if test="bomName != null">bom_name = #{bomName},</if> |
| | | <if test="productCode != null and productCode != ''">product_code = #{productCode},</if> |
| | | <if test="productName != null">product_name = #{productName},</if> |
| | | <if test="version != null">version = #{version},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="dataSource != null">data_source = #{dataSource},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsProductBomInfoById" parameterType="Long"> |
| | | delete from bs_product_bom_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsProductBomInfoByIds" parameterType="String"> |
| | | delete from bs_product_bom_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteBsProductBomChildInfoByBomCodes" parameterType="String"> |
| | | delete from bs_product_bom_child_info where bom_code in |
| | | <foreach item="bomCode" collection="array" open="(" separator="," close=")"> |
| | | #{bomCode} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <delete id="deleteBsProductBomChildInfoByBomCode" parameterType="Long"> |
| | | delete from bs_product_bom_child_info where bom_code = #{bomCode} |
| | | </delete> |
| | | |
| | | <insert id="batchBsProductBomChildInfo"> |
| | | insert into bs_product_bom_child_info( id, op_code, op_name, material_code, material_name, cost_qty, unit, spare_field_1, spare_field_2, spare_field_3, remark, bom_code, bom_info_id) values |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | ( #{item.id}, #{item.opCode}, #{item.opName}, #{item.materialCode}, #{item.materialName}, #{item.costQty}, #{item.unit}, #{item.spareField1}, #{item.spareField2}, #{item.spareField3}, #{item.remark}, #{item.bomCode}, #{item.bomInfoId}) |
| | | </foreach> |
| | | </insert> |
| | | </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.jcdm.main.bs.bomchild.mapper.BsProductBomChildInfoMapper"> |
| | | |
| | | <resultMap type="BsProductBomChildInfo" id="BsProductBomChildInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="opCode" column="op_code" /> |
| | | <result property="opName" column="op_name" /> |
| | | <result property="materialCode" column="material_code" /> |
| | | <result property="materialName" column="material_name" /> |
| | | <result property="costQty" column="cost_qty" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="spareField1" column="spare_field_1" /> |
| | | <result property="spareField2" column="spare_field_2" /> |
| | | <result property="spareField3" column="spare_field_3" /> |
| | | <result property="remark" column="remark" /> |
| | | <result property="bomCode" column="bom_code" /> |
| | | <result property="bomInfoId" column="bom_info_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsProductBomChildInfoVo"> |
| | | select id, op_code, op_name, material_code, material_name, cost_qty, unit, spare_field_1, spare_field_2, spare_field_3, remark, bom_code, bom_info_id from bs_product_bom_child_info |
| | | </sql> |
| | | |
| | | <select id="selectBsProductBomChildInfoList" parameterType="BsProductBomChildInfo" resultMap="BsProductBomChildInfoResult"> |
| | | <include refid="selectBsProductBomChildInfoVo"/> |
| | | <where> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code = #{materialCode}</if> |
| | | <if test="bomCode != null and bomCode != ''"> and bom_code = #{bomCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsProductBomChildInfoById" parameterType="Long" resultMap="BsProductBomChildInfoResult"> |
| | | <include refid="selectBsProductBomChildInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsProductBomChildInfo" parameterType="BsProductBomChildInfo"> |
| | | insert into bs_product_bom_child_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="opCode != null">op_code,</if> |
| | | <if test="opName != null">op_name,</if> |
| | | <if test="materialCode != null">material_code,</if> |
| | | <if test="materialName != null">material_name,</if> |
| | | <if test="costQty != null and costQty != ''">cost_qty,</if> |
| | | <if test="unit != null and unit != ''">unit,</if> |
| | | <if test="spareField1 != null">spare_field_1,</if> |
| | | <if test="spareField2 != null">spare_field_2,</if> |
| | | <if test="spareField3 != null">spare_field_3,</if> |
| | | <if test="remark != null">remark,</if> |
| | | <if test="bomCode != null and bomCode != ''">bom_code,</if> |
| | | <if test="bomInfoId != null">bom_info_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="opCode != null">#{opCode},</if> |
| | | <if test="opName != null">#{opName},</if> |
| | | <if test="materialCode != null">#{materialCode},</if> |
| | | <if test="materialName != null">#{materialName},</if> |
| | | <if test="costQty != null and costQty != ''">#{costQty},</if> |
| | | <if test="unit != null and unit != ''">#{unit},</if> |
| | | <if test="spareField1 != null">#{spareField1},</if> |
| | | <if test="spareField2 != null">#{spareField2},</if> |
| | | <if test="spareField3 != null">#{spareField3},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | <if test="bomCode != null and bomCode != ''">#{bomCode},</if> |
| | | <if test="bomInfoId != null">#{bomInfoId},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsProductBomChildInfo" parameterType="BsProductBomChildInfo"> |
| | | update bs_product_bom_child_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="opCode != null">op_code = #{opCode},</if> |
| | | <if test="opName != null">op_name = #{opName},</if> |
| | | <if test="materialCode != null">material_code = #{materialCode},</if> |
| | | <if test="materialName != null">material_name = #{materialName},</if> |
| | | <if test="costQty != null and costQty != ''">cost_qty = #{costQty},</if> |
| | | <if test="unit != null and unit != ''">unit = #{unit},</if> |
| | | <if test="spareField1 != null">spare_field_1 = #{spareField1},</if> |
| | | <if test="spareField2 != null">spare_field_2 = #{spareField2},</if> |
| | | <if test="spareField3 != null">spare_field_3 = #{spareField3},</if> |
| | | <if test="remark != null">remark = #{remark},</if> |
| | | <if test="bomCode != null and bomCode != ''">bom_code = #{bomCode},</if> |
| | | <if test="bomInfoId != null">bom_info_id = #{bomInfoId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsProductBomChildInfoById" parameterType="Long"> |
| | | delete from bs_product_bom_child_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsProductBomChildInfoByIds" parameterType="String"> |
| | | delete from bs_product_bom_child_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </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.jcdm.main.bs.material.mapper.BsMaterialInfoMapper"> |
| | | <resultMap type="BsMaterialInfo" id="BsMaterialInfoResult"> |
| | | <result property="id" column="id" /> |
| | | <result property="materialCode" column="material_code" /> |
| | | <result property="materialName" column="material_name" /> |
| | | <result property="materialView" column="material_view" /> |
| | | <result property="typeZ" column="type_z" /> |
| | | <result property="typeL" column="type_l" /> |
| | | <result property="unit" column="unit" /> |
| | | <result property="matterVersion" column="matter_version" /> |
| | | <result property="remarks" column="remarks" /> |
| | | <result property="createUser" column="create_user" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateUser" column="update_user" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="erpSpec" column="erp_spec" /> |
| | | <result property="dataSource" column="data_source" /> |
| | | <result property="version" column="version" /> |
| | | <result property="status" column="status" /> |
| | | <result property="supplier" column="supplier" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBsMaterialInfoVo"> |
| | | select id, material_code, material_name, material_view, type_z, type_l, unit, matter_version, remarks, create_user, create_time, update_user, update_time, erp_spec, data_source, version, status, supplier from bs_material_info |
| | | </sql> |
| | | |
| | | <select id="selectBsMaterialInfoList" parameterType="BsMaterialInfo" resultMap="BsMaterialInfoResult"> |
| | | <include refid="selectBsMaterialInfoVo"/> |
| | | <where> |
| | | <if test="materialCode != null and materialCode != ''"> and material_code like concat('%', #{materialCode}, '%')</if> |
| | | <if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if> |
| | | <if test="materialView != null and materialView != ''"> and material_view = #{materialView}</if> |
| | | <if test="typeZ != null and typeZ != ''"> and type_z = #{typeZ}</if> |
| | | <if test="typeL != null and typeL != ''"> and type_l = #{typeL}</if> |
| | | <if test="unit != null and unit != ''"> and unit = #{unit}</if> |
| | | <if test="matterVersion != null and matterVersion != ''"> and matter_version = #{matterVersion}</if> |
| | | <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> |
| | | <if test="createUser != null and createUser != ''"> and create_user = #{createUser}</if> |
| | | <if test="createTime != null "> and create_time = #{createTime}</if> |
| | | <if test="updateUser != null and updateUser != ''"> and update_user = #{updateUser}</if> |
| | | <if test="erpSpec != null and erpSpec != ''"> and erp_spec = #{erpSpec}</if> |
| | | <if test="dataSource != null and dataSource != ''"> and data_source = #{dataSource}</if> |
| | | <if test="version != null and version != ''"> and version = #{version}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | <if test="supplier != null and supplier != ''"> and supplier = #{supplier}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectBsMaterialInfoById" parameterType="Long" resultMap="BsMaterialInfoResult"> |
| | | <include refid="selectBsMaterialInfoVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | |
| | | <insert id="insertBsMaterialInfo" parameterType="BsMaterialInfo"> |
| | | insert into bs_material_info |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">id,</if> |
| | | <if test="materialCode != null">material_code,</if> |
| | | <if test="materialName != null">material_name,</if> |
| | | <if test="materialView != null">material_view,</if> |
| | | <if test="typeZ != null">type_z,</if> |
| | | <if test="typeL != null">type_l,</if> |
| | | <if test="unit != null">unit,</if> |
| | | <if test="matterVersion != null">matter_version,</if> |
| | | <if test="remarks != null">remarks,</if> |
| | | <if test="createUser != null">create_user,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateUser != null">update_user,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="erpSpec != null">erp_spec,</if> |
| | | <if test="dataSource != null">data_source,</if> |
| | | <if test="version != null">version,</if> |
| | | <if test="status != null">status,</if> |
| | | <if test="supplier != null">supplier,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="materialCode != null">#{materialCode},</if> |
| | | <if test="materialName != null">#{materialName},</if> |
| | | <if test="materialView != null">#{materialView},</if> |
| | | <if test="typeZ != null">#{typeZ},</if> |
| | | <if test="typeL != null">#{typeL},</if> |
| | | <if test="unit != null">#{unit},</if> |
| | | <if test="matterVersion != null">#{matterVersion},</if> |
| | | <if test="remarks != null">#{remarks},</if> |
| | | <if test="createUser != null">#{createUser},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateUser != null">#{updateUser},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="erpSpec != null">#{erpSpec},</if> |
| | | <if test="dataSource != null">#{dataSource},</if> |
| | | <if test="version != null">#{version},</if> |
| | | <if test="status != null">#{status},</if> |
| | | <if test="supplier != null">#{supplier},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateBsMaterialInfo" parameterType="BsMaterialInfo"> |
| | | update bs_material_info |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="materialCode != null">material_code = #{materialCode},</if> |
| | | <if test="materialName != null">material_name = #{materialName},</if> |
| | | <if test="materialView != null">material_view = #{materialView},</if> |
| | | <if test="typeZ != null">type_z = #{typeZ},</if> |
| | | <if test="typeL != null">type_l = #{typeL},</if> |
| | | <if test="unit != null">unit = #{unit},</if> |
| | | <if test="matterVersion != null">matter_version = #{matterVersion},</if> |
| | | <if test="remarks != null">remarks = #{remarks},</if> |
| | | <if test="createUser != null">create_user = #{createUser},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateUser != null">update_user = #{updateUser},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="erpSpec != null">erp_spec = #{erpSpec},</if> |
| | | <if test="dataSource != null">data_source = #{dataSource},</if> |
| | | <if test="version != null">version = #{version},</if> |
| | | <if test="status != null">status = #{status},</if> |
| | | <if test="supplier != null">supplier = #{supplier},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteBsMaterialInfoById" parameterType="Long"> |
| | | delete from bs_material_info where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteBsMaterialInfoByIds" parameterType="String"> |
| | | delete from bs_material_info where id in |
| | | <foreach item="id" collection="array" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | </mapper> |
| | |
| | | ///** |
| | | // * å®æ¶ä»»å¡é
ç½®ï¼åæºé¨ç½²å»ºè®®å é¤æ¤ç±»åqrtzæ°æ®åºè¡¨ï¼é»è®¤èµ°å
åä¼æé«æï¼ |
| | | // * |
| | | // * @author ruoyi |
| | | // * @author jc |
| | | // */ |
| | | //@Configuration |
| | | //public class ScheduleConfig |
| | |
| | | /** |
| | | * è°åº¦ä»»å¡ä¿¡æ¯æä½å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/monitor/job") |
| | |
| | | /** |
| | | * è°åº¦æ¥å¿æä½å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/monitor/jobLog") |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦è¡¨ sys_job |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysJob extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦æ¥å¿è¡¨ sys_job_log |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysJobLog extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * è°åº¦ä»»å¡æ¥å¿ä¿¡æ¯ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysJobLogMapper |
| | | { |
| | |
| | | /** |
| | | * è°åº¦ä»»å¡ä¿¡æ¯ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysJobMapper |
| | | { |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦æ¥å¿ä¿¡æ¯ä¿¡æ¯ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysJobLogService |
| | | { |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦ä¿¡æ¯ä¿¡æ¯ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysJobService |
| | | { |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦æ¥å¿ä¿¡æ¯ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysJobLogServiceImpl implements ISysJobLogService |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦ä¿¡æ¯ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysJobServiceImpl implements ISysJobService |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡è°åº¦æµè¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Component("ryTask") |
| | | public class RyTask |
| | |
| | | /** |
| | | * æ½è±¡quartzè°ç¨ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public abstract class AbstractQuartzJob implements Job |
| | | { |
| | |
| | | /** |
| | | * cron表达å¼å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | public class CronUtils |
| | |
| | | /** |
| | | * ä»»å¡æ§è¡å·¥å
· |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class JobInvokeUtil |
| | | { |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡å¤çï¼ç¦æ¢å¹¶åæ§è¡ï¼ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | @DisallowConcurrentExecution |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡å¤çï¼å
许并åæ§è¡ï¼ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | public class QuartzJobExecution extends AbstractQuartzJob |
| | |
| | | /** |
| | | * å®æ¶ä»»å¡å·¥å
·ç±» |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | * |
| | | */ |
| | | public class ScheduleUtils |
| | |
| | | /** |
| | | * ç¼åä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysCache |
| | | { |
| | |
| | | /** |
| | | * åæ°é
置表 sys_config |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysConfig extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * ç³»ç»è®¿é®è®°å½è¡¨ sys_logininfor |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysLogininfor extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * éç¥å
¬å表 sys_notice |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysNotice extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * æä½æ¥å¿è®°å½è¡¨ oper_log |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysOperLog extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * å²ä½è¡¨ sys_post |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysPost extends BaseEntity |
| | | { |
| | |
| | | /** |
| | | * è§è²åé¨é¨å
³è sys_role_dept |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysRoleDept |
| | | { |
| | |
| | | /** |
| | | * è§è²åèåå
³è sys_role_menu |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysRoleMenu |
| | | { |
| | |
| | | /** |
| | | * å½åå¨çº¿ä¼è¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysUserOnline |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·åå²ä½å
³è sys_user_post |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysUserPost |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·åè§è²å
³è sys_user_role |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class SysUserRole |
| | | { |
| | |
| | | /** |
| | | * è·¯ç±æ¾ç¤ºä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public class MetaVo |
| | | { |
| | |
| | | /** |
| | | * è·¯ç±é
ç½®ä¿¡æ¯ |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY) |
| | | public class RouterVo |
| | |
| | | /** |
| | | * åæ°é
ç½® æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysConfigMapper |
| | | { |
| | |
| | | /** |
| | | * é¨é¨ç®¡ç æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysDeptMapper |
| | | { |
| | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysDictDataMapper |
| | | { |
| | |
| | | /** |
| | | * åå
¸è¡¨ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysDictTypeMapper |
| | | { |
| | |
| | | /** |
| | | * ç³»ç»è®¿é®æ¥å¿æ
åµä¿¡æ¯ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysLogininforMapper |
| | | { |
| | |
| | | /** |
| | | * èå表 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysMenuMapper |
| | | { |
| | |
| | | /** |
| | | * éç¥å
¬å表 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysNoticeMapper |
| | | { |
| | |
| | | /** |
| | | * æä½æ¥å¿ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysOperLogMapper |
| | | { |
| | |
| | | /** |
| | | * å²ä½ä¿¡æ¯ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysPostMapper |
| | | { |
| | |
| | | /** |
| | | * è§è²ä¸é¨é¨å
³è表 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysRoleDeptMapper |
| | | { |
| | |
| | | /** |
| | | * è§è²è¡¨ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysRoleMapper |
| | | { |
| | |
| | | /** |
| | | * è§è²ä¸èåå
³è表 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysRoleMenuMapper |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·è¡¨ æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysUserMapper |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·ä¸å²ä½å
³è表 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysUserPostMapper |
| | | { |
| | |
| | | /** |
| | | * ç¨æ·ä¸è§è²å
³è表 æ°æ®å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface SysUserRoleMapper |
| | | { |
| | |
| | | /** |
| | | * åæ°é
ç½® æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysConfigService |
| | | { |
| | |
| | | /** |
| | | * é¨é¨ç®¡ç æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysDeptService |
| | | { |
| | |
| | | /** |
| | | * åå
¸ ä¸å¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysDictDataService |
| | | { |
| | |
| | | /** |
| | | * åå
¸ ä¸å¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysDictTypeService |
| | | { |
| | |
| | | /** |
| | | * ç³»ç»è®¿é®æ¥å¿æ
åµä¿¡æ¯ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysLogininforService |
| | | { |
| | |
| | | /** |
| | | * èå ä¸å¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysMenuService |
| | | { |
| | |
| | | /** |
| | | * å
¬å æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysNoticeService |
| | | { |
| | |
| | | /** |
| | | * æä½æ¥å¿ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysOperLogService |
| | | { |
| | |
| | | /** |
| | | * å²ä½ä¿¡æ¯ æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysPostService |
| | | { |
| | |
| | | /** |
| | | * è§è²ä¸å¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysRoleService |
| | | { |
| | |
| | | /** |
| | | * å¨çº¿ç¨æ· æå¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysUserOnlineService |
| | | { |
| | |
| | | /** |
| | | * ç¨æ· ä¸å¡å± |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | public interface ISysUserService |
| | | { |
| | |
| | | /** |
| | | * åæ°é
ç½® æå¡å±å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysConfigServiceImpl implements ISysConfigService |
| | |
| | | /** |
| | | * é¨é¨ç®¡ç æå¡å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysDeptServiceImpl implements ISysDeptService |
| | |
| | | /** |
| | | * åå
¸ ä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysDictDataServiceImpl implements ISysDictDataService |
| | |
| | | /** |
| | | * åå
¸ ä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysDictTypeServiceImpl implements ISysDictTypeService |
| | |
| | | /** |
| | | * ç³»ç»è®¿é®æ¥å¿æ
åµä¿¡æ¯ æå¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysLogininforServiceImpl implements ISysLogininforService |
| | |
| | | /** |
| | | * èå ä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysMenuServiceImpl implements ISysMenuService |
| | |
| | | /** |
| | | * å
¬å æå¡å±å®ç° |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysNoticeServiceImpl implements ISysNoticeService |
| | |
| | | /** |
| | | * æä½æ¥å¿ æå¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysOperLogServiceImpl implements ISysOperLogService |
| | |
| | | /** |
| | | * å²ä½ä¿¡æ¯ æå¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysPostServiceImpl implements ISysPostService |
| | |
| | | /** |
| | | * è§è² ä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysRoleServiceImpl implements ISysRoleService |
| | |
| | | /** |
| | | * å¨çº¿ç¨æ· æå¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysUserOnlineServiceImpl implements ISysUserOnlineService |
| | |
| | | /** |
| | | * ç¨æ· ä¸å¡å±å¤ç |
| | | * |
| | | * @author ruoyi |
| | | * @author jc |
| | | */ |
| | | @Service |
| | | public class SysUserServiceImpl implements ISysUserService |
| | |
| | | ], |
| | | "repository": { |
| | | "type": "git", |
| | | "url": "https://gitee.com/y_project/RuoYi-Vue.git" |
| | | "url": "http://192.168.0.189:8442/r/Jcdm-Mes.git" |
| | | }, |
| | | "dependencies": { |
| | | "@riophae/vue-treeselect": "0.4.0", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åºç¡BOMå表 |
| | | export function listBom(query) { |
| | | return request({ |
| | | url: '/bs/bom/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºç¡BOMè¯¦ç» |
| | | export function getBom(id) { |
| | | return request({ |
| | | url: '/bs/bom/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢åºç¡BOM |
| | | export function addBom(data) { |
| | | return request({ |
| | | url: '/bs/bom', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹åºç¡BOM |
| | | export function updateBom(data) { |
| | | return request({ |
| | | url: '/bs/bom', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤åºç¡BOM |
| | | export function delBom(id) { |
| | | return request({ |
| | | url: '/bs/bom/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 |
| | | export function listBomchild(query) { |
| | | return request({ |
| | | url: '/bs/bomchild/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢åºç¡BOMåä¿¡æ¯è¯¦ç» |
| | | export function getBomchild(id) { |
| | | return request({ |
| | | url: '/bs/bomchild/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢åºç¡BOMåä¿¡æ¯ |
| | | export function addBomchild(data) { |
| | | return request({ |
| | | url: '/bs/bomchild', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹åºç¡BOMåä¿¡æ¯ |
| | | export function updateBomchild(data) { |
| | | return request({ |
| | | url: '/bs/bomchild', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤åºç¡BOMåä¿¡æ¯ |
| | | export function delBomchild(id) { |
| | | return request({ |
| | | url: '/bs/bomchild/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ç©æä¿¡æ¯å表 |
| | | export function listMaterial(query) { |
| | | return request({ |
| | | url: '/bs/material/list', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ç©æä¿¡æ¯è¯¦ç» |
| | | export function getMaterial(id) { |
| | | return request({ |
| | | url: '/bs/material/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ç©æä¿¡æ¯ |
| | | export function addMaterial(data) { |
| | | return request({ |
| | | url: '/bs/material', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // ä¿®æ¹ç©æä¿¡æ¯ |
| | | export function updateMaterial(data) { |
| | | return request({ |
| | | url: '/bs/material', |
| | | method: 'put', |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | | // å é¤ç©æä¿¡æ¯ |
| | | export function delMaterial(id) { |
| | | return request({ |
| | | url: '/bs/material/' + id, |
| | | method: 'delete' |
| | | }) |
| | | } |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'RuoYiGit', |
| | | name: 'JCGit', |
| | | data() { |
| | | return { |
| | | url: 'https://gitee.com/y_project/RuoYi-Vue' |
| | | url: 'http://192.168.0.189:8442/r/Jcdm-Mes.git' |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | |
| | | /** |
| | | * v-dialogDragWidth å¯æå¨å¼¹çªå®½åº¦ï¼å³ä¾§è¾¹ï¼ |
| | | * Copyright (c) 2019 ruoyi |
| | | */ |
| | | |
| | | export default { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="BOMç¼ç " prop="bomCode"> |
| | | <el-input |
| | | v-model="queryParams.bomCode" |
| | | placeholder="请è¾å
¥BOMç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="BOMå称" prop="bomName"> |
| | | <el-input |
| | | v-model="queryParams.bomName" |
| | | placeholder="请è¾å
¥BOMå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input |
| | | v-model="queryParams.productCode" |
| | | placeholder="请è¾å
¥äº§åç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input |
| | | v-model="queryParams.productName" |
| | | placeholder="请è¾å
¥äº§åå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æ¥æº" prop="dataSource"> |
| | | <el-input |
| | | v-model="queryParams.dataSource" |
| | | placeholder="请è¾å
¥æ°æ®æ¥æº" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['bs:bom:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['bs:bom:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['bs:bom:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['bs:bom:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="bomList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="主é®id" align="center" prop="id" /> |
| | | <el-table-column label="BOMç¼ç " align="center" prop="bomCode"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.bomCode"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="BOMå称" align="center" prop="bomName"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.bomName"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="产åç¼ç " align="center" prop="productCode"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.productCode"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="产åå称" align="center" prop="productName"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.productName"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="çæ¬" align="center" prop="version"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.version"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ(åå
¸)" align="center" prop="status"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.status"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段1" align="center" prop="spareField1"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.spareField1"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段2" align="center" prop="spareField2"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.spareField2"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remark"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remark"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å建ç¨æ·" align="center" prop="createUser"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.createUser"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ¹ç¨æ·" align="center" prop="updateUser"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.updateUser"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æ°æ®æ¥æº" align="center" prop="dataSource"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.dataSource"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['bs:bom:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['bs:bom:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºç¡BOM对è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="BOMç¼ç " prop="bomCode"> |
| | | <el-input v-model="form.bomCode" placeholder="请è¾å
¥BOMç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="BOMå称" prop="bomName"> |
| | | <el-input v-model="form.bomName" placeholder="请è¾å
¥BOMå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="产åç¼ç " prop="productCode"> |
| | | <el-input v-model="form.productCode" placeholder="请è¾å
¥äº§åç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="产åå称" prop="productName"> |
| | | <el-input v-model="form.productName" placeholder="请è¾å
¥äº§åå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="version"> |
| | | <el-input v-model="form.version" placeholder="请è¾å
¥çæ¬" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ(åå
¸)" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <!-- <el-radio |
| | | v-for="dict in dict.type.${dictType}" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio>--> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段1" prop="spareField1"> |
| | | <el-input v-model="form.spareField1" placeholder="请è¾å
¥é¢çå段1" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段2" prop="spareField2"> |
| | | <el-input v-model="form.spareField2" placeholder="请è¾å
¥é¢çå段2" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建ç¨æ·" prop="createUser"> |
| | | <el-input v-model="form.createUser" placeholder="请è¾å
¥å建ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> |
| | | <el-input v-model="form.updateUser" placeholder="请è¾å
¥æ´æ¹ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æ¥æº" prop="dataSource"> |
| | | <el-input v-model="form.dataSource" placeholder="请è¾å
¥æ°æ®æ¥æº" /> |
| | | </el-form-item> |
| | | <el-divider content-position="center">åºç¡BOMåä¿¡æ¯ä¿¡æ¯</el-divider> |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddBsProductBomChildInfo">æ·»å </el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteBsProductBomChildInfo">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-table :data="bsProductBomChildInfoList" :row-class-name="rowBsProductBomChildInfoIndex" @selection-change="handleBsProductBomChildInfoSelectionChange" ref="bsProductBomChildInfo"> |
| | | <el-table-column type="selection" width="50" align="center" /> |
| | | <el-table-column label="åºå·" align="center" prop="index" width="50"/> |
| | | <el-table-column label="å·¥åºç¼ç " prop="opCode" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.opCode" placeholder="请è¾å
¥å·¥åºç¼ç " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºå称" prop="opName" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.opName" placeholder="请è¾å
¥å·¥åºå称" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç©æç¼ç " prop="materialCode" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.materialCode" placeholder="请è¾å
¥ç©æç¼ç " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="ç©æå称" prop="materialName" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.materialName" placeholder="请è¾å
¥ç©æå称" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åè" prop="costQty" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.costQty" placeholder="请è¾å
¥åè" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" prop="unit" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.unit" placeholder="请è¾å
¥åä½" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段1" prop="spareField1" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.spareField1" placeholder="请è¾å
¥é¢çå段1" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段2" prop="spareField2" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.spareField2" placeholder="请è¾å
¥é¢çå段2" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段3" prop="spareField3" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.spareField3" placeholder="请è¾å
¥é¢çå段3" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" prop="remark" width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listBom, getBom, delBom, addBom, updateBom } from "@/api/main/bs/bom/bom"; |
| | | |
| | | export default { |
| | | name: "Bom", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // å表éä¸æ°æ® |
| | | checkedBsProductBomChildInfo: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åºç¡BOMè¡¨æ ¼æ°æ® |
| | | bomList: [], |
| | | // åºç¡BOMåä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | bsProductBomChildInfoList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | bomCode: null, |
| | | bomName: null, |
| | | productCode: null, |
| | | productName: null, |
| | | dataSource: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | bomCode: [ |
| | | { required: true, message: "BOMç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | productCode: [ |
| | | { required: true, message: "产åç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | status: [ |
| | | { required: true, message: "ç¶æ(åå
¸)ä¸è½ä¸ºç©º", trigger: "change" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢åºç¡BOMå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listBom(this.queryParams).then(response => { |
| | | this.bomList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | bomCode: null, |
| | | bomName: null, |
| | | productCode: null, |
| | | productName: null, |
| | | version: null, |
| | | status: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | remark: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | dataSource: null |
| | | }; |
| | | this.bsProductBomChildInfoList = []; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å åºç¡BOM"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getBom(id).then(response => { |
| | | this.form = response.data; |
| | | this.bsProductBomChildInfoList = response.data.bsProductBomChildInfoList; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹åºç¡BOM"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.form.bsProductBomChildInfoList = this.bsProductBomChildInfoList; |
| | | if (this.form.id != null) { |
| | | updateBom(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addBom(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤åºç¡BOMç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delBom(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** åºç¡BOMåä¿¡æ¯åºå· */ |
| | | rowBsProductBomChildInfoIndex({ row, rowIndex }) { |
| | | row.index = rowIndex + 1; |
| | | }, |
| | | /** åºç¡BOMåä¿¡æ¯æ·»å æé®æä½ */ |
| | | handleAddBsProductBomChildInfo() { |
| | | let obj = {}; |
| | | obj.opCode = ""; |
| | | obj.opName = ""; |
| | | obj.materialCode = ""; |
| | | obj.materialName = ""; |
| | | obj.costQty = ""; |
| | | obj.unit = ""; |
| | | obj.spareField1 = ""; |
| | | obj.spareField2 = ""; |
| | | obj.spareField3 = ""; |
| | | obj.remark = ""; |
| | | this.bsProductBomChildInfoList.push(obj); |
| | | }, |
| | | /** åºç¡BOMåä¿¡æ¯å é¤æé®æä½ */ |
| | | handleDeleteBsProductBomChildInfo() { |
| | | if (this.checkedBsProductBomChildInfo.length == 0) { |
| | | this.$modal.msgError("请å
éæ©è¦å é¤çåºç¡BOMåä¿¡æ¯æ°æ®"); |
| | | } else { |
| | | const bsProductBomChildInfoList = this.bsProductBomChildInfoList; |
| | | const checkedBsProductBomChildInfo = this.checkedBsProductBomChildInfo; |
| | | this.bsProductBomChildInfoList = bsProductBomChildInfoList.filter(function(item) { |
| | | return checkedBsProductBomChildInfo.indexOf(item.index) == -1 |
| | | }); |
| | | } |
| | | }, |
| | | /** å¤éæ¡éä¸æ°æ® */ |
| | | handleBsProductBomChildInfoSelectionChange(selection) { |
| | | this.checkedBsProductBomChildInfo = selection.map(item => item.index) |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/bom/export', { |
| | | ...this.queryParams |
| | | }, `bom_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ç©æç¼ç " prop="materialCode"> |
| | | <el-input |
| | | v-model="queryParams.materialCode" |
| | | placeholder="请è¾å
¥ç©æç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="BOMç¼ç " prop="bomCode"> |
| | | <el-input |
| | | v-model="queryParams.bomCode" |
| | | placeholder="请è¾å
¥BOMç¼ç " |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['bs:bomchild:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['bs:bomchild:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['bs:bomchild:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['bs:bomchild:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="bomchildList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="主é®id" align="center" prop="id" /> |
| | | <el-table-column label="å·¥åºç¼ç " align="center" prop="opCode"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.opCode"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å·¥åºå称" align="center" prop="opName"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.opName"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç©æç¼ç " align="center" prop="materialCode"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.materialCode"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç©æå称" align="center" prop="materialName"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.materialName"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åè" align="center" prop="costQty"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.costQty"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.unit"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段1" align="center" prop="spareField1"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.spareField1"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段2" align="center" prop="spareField2"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.spareField2"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="é¢çå段3" align="center" prop="spareField3"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.spareField3"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remark"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remark"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="BOMç¼ç " align="center" prop="bomCode"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.bomCode"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['bs:bomchild:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['bs:bomchild:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹åºç¡BOMåä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="å·¥åºç¼ç " prop="opCode"> |
| | | <el-input v-model="form.opCode" placeholder="请è¾å
¥å·¥åºç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="å·¥åºå称" prop="opName"> |
| | | <el-input v-model="form.opName" placeholder="请è¾å
¥å·¥åºå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æç¼ç " prop="materialCode"> |
| | | <el-input v-model="form.materialCode" placeholder="请è¾å
¥ç©æç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æå称" prop="materialName"> |
| | | <el-input v-model="form.materialName" placeholder="请è¾å
¥ç©æå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="åè" prop="costQty"> |
| | | <el-input v-model="form.costQty" placeholder="请è¾å
¥åè" /> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段1" prop="spareField1"> |
| | | <el-input v-model="form.spareField1" placeholder="请è¾å
¥é¢çå段1" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段2" prop="spareField2"> |
| | | <el-input v-model="form.spareField2" placeholder="请è¾å
¥é¢çå段2" /> |
| | | </el-form-item> |
| | | <el-form-item label="é¢çå段3" prop="spareField3"> |
| | | <el-input v-model="form.spareField3" placeholder="请è¾å
¥é¢çå段3" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remark"> |
| | | <el-input v-model="form.remark" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | <el-form-item label="BOMç¼ç " prop="bomCode"> |
| | | <el-input v-model="form.bomCode" placeholder="请è¾å
¥BOMç¼ç " /> |
| | | </el-form-item> |
| | | <el-form-item label="BOM主表ID" prop="bomInfoId"> |
| | | <el-input v-model="form.bomInfoId" placeholder="请è¾å
¥BOM主表ID" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listBomchild, getBomchild, delBomchild, addBomchild, updateBomchild } from '@/api/main/bs/bomchild/bomchild'; |
| | | |
| | | export default { |
| | | name: "Godchild", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // åºç¡BOMåä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | bomchildList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | materialCode: null, |
| | | bomCode: null, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | costQty: [ |
| | | { required: true, message: "åèä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | unit: [ |
| | | { required: true, message: "åä½ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | bomCode: [ |
| | | { required: true, message: "BOMç¼ç ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢åºç¡BOMåä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listBomchild(this.queryParams).then(response => { |
| | | this.bomchildList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | opCode: null, |
| | | opName: null, |
| | | materialCode: null, |
| | | materialName: null, |
| | | costQty: null, |
| | | unit: null, |
| | | spareField1: null, |
| | | spareField2: null, |
| | | spareField3: null, |
| | | remark: null, |
| | | bomCode: null, |
| | | bomInfoId: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å åºç¡BOMåä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getBomchild(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹åºç¡BOMåä¿¡æ¯"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateBomchild(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addBomchild(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤åºç¡BOMåä¿¡æ¯ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delBomchild(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/bomchild/export', { |
| | | ...this.queryParams |
| | | }, `bomchild_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
| | | <el-form-item label="ç©æç¼å·" prop="materialCode"> |
| | | <el-input |
| | | v-model="queryParams.materialCode" |
| | | placeholder="请è¾å
¥ç©æç¼å·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æå称" prop="materialName"> |
| | | <el-input |
| | | v-model="queryParams.materialName" |
| | | placeholder="请è¾å
¥ç©æå称" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="è§å¾" prop="materialView"> |
| | | <el-input |
| | | v-model="queryParams.materialView" |
| | | placeholder="请è¾å
¥è§å¾" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç§ç±»" prop="typeZ"> |
| | | <el-input |
| | | v-model="queryParams.typeZ" |
| | | placeholder="请è¾å
¥ç§ç±»" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="typeL"> |
| | | <el-input |
| | | v-model="queryParams.typeL" |
| | | placeholder="请è¾å
¥ç±»å" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input |
| | | v-model="queryParams.unit" |
| | | placeholder="请è¾å
¥åä½" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="matterVersion"> |
| | | <el-input |
| | | v-model="queryParams.matterVersion" |
| | | placeholder="请è¾å
¥çæ¬" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input |
| | | v-model="queryParams.remarks" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å建ç¨æ·" prop="createUser"> |
| | | <el-input |
| | | v-model="queryParams.createUser" |
| | | placeholder="请è¾å
¥å建ç¨æ·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å建æ¶é´" prop="createTime"> |
| | | <el-date-picker clearable |
| | | v-model="queryParams.createTime" |
| | | type="date" |
| | | value-format="yyyy-MM-dd" |
| | | placeholder="请éæ©å建æ¶é´"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> |
| | | <el-input |
| | | v-model="queryParams.updateUser" |
| | | placeholder="请è¾å
¥æ´æ¹ç¨æ·" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ERPè§æ ¼" prop="erpSpec"> |
| | | <el-input |
| | | v-model="queryParams.erpSpec" |
| | | placeholder="请è¾å
¥ERPè§æ ¼" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æ¥æº" prop="dataSource"> |
| | | <el-input |
| | | v-model="queryParams.dataSource" |
| | | placeholder="请è¾å
¥æ°æ®æ¥æº" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="version"> |
| | | <el-input |
| | | v-model="queryParams.version" |
| | | placeholder="请è¾å
¥çæ¬" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="请éæ©ç¶æ" clearable> |
| | | <!-- <el-option |
| | | v-for="dict in dict.type.${dictType}" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | />--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="åå" prop="supplier"> |
| | | <el-input |
| | | v-model="queryParams.supplier" |
| | | placeholder="请è¾å
¥åå" |
| | | clearable |
| | | @keyup.enter.native="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æç´¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">éç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <el-row :gutter="10" class="mb8"> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | | plain |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['bs:material:add']" |
| | | >æ°å¢</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="success" |
| | | plain |
| | | icon="el-icon-edit" |
| | | size="mini" |
| | | :disabled="single" |
| | | @click="handleUpdate" |
| | | v-hasPermi="['bs:material:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="danger" |
| | | plain |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | :disabled="multiple" |
| | | @click="handleDelete" |
| | | v-hasPermi="['bs:material:remove']" |
| | | >å é¤</el-button> |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="el-icon-download" |
| | | size="mini" |
| | | @click="handleExport" |
| | | v-hasPermi="['bs:material:export']" |
| | | >导åº</el-button> |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table v-loading="loading" :data="materialList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="主é®id" align="center" prop="id" /> |
| | | <el-table-column label="ç©æç¼å·" align="center" prop="materialCode"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.materialCode"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç©æå称" align="center" prop="materialName"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.materialName"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="è§å¾" align="center" prop="materialView"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.materialView"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç§ç±»" align="center" prop="typeZ"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.typeZ"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç±»å" align="center" prop="typeL"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.typeL"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åä½" align="center" prop="unit"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.unit"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="çæ¬" align="center" prop="matterVersion"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.matterVersion"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å¤æ³¨" align="center" prop="remarks"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å建ç¨æ·" align="center" prop="createUser"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.createUser"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ´æ¹ç¨æ·" align="center" prop="updateUser"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.updateUser"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ERPè§æ ¼" align="center" prop="erpSpec"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.erpSpec"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æ°æ®æ¥æº" align="center" prop="dataSource"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.dataSource"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="çæ¬" align="center" prop="version"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.version"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="ç¶æ" align="center" prop="status"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.status"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="åå" align="center" prop="supplier"> |
| | | <!-- <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.supplier"/> |
| | | </template>--> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['bs:material:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['bs:material:remove']" |
| | | >å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <pagination |
| | | v-show="total>0" |
| | | :total="total" |
| | | :page.sync="queryParams.pageNum" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | |
| | | <!-- æ·»å æä¿®æ¹ç©æä¿¡æ¯å¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="ç©æç¼å·" prop="materialCode"> |
| | | <el-input v-model="form.materialCode" placeholder="请è¾å
¥ç©æç¼å·" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç©æå称" prop="materialName"> |
| | | <el-input v-model="form.materialName" placeholder="请è¾å
¥ç©æå称" /> |
| | | </el-form-item> |
| | | <el-form-item label="è§å¾" prop="materialView"> |
| | | <el-input v-model="form.materialView" placeholder="请è¾å
¥è§å¾" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç§ç±»" prop="typeZ"> |
| | | <el-input v-model="form.typeZ" placeholder="请è¾å
¥ç§ç±»" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å" prop="typeL"> |
| | | <el-input v-model="form.typeL" placeholder="请è¾å
¥ç±»å" /> |
| | | </el-form-item> |
| | | <el-form-item label="åä½" prop="unit"> |
| | | <el-input v-model="form.unit" placeholder="请è¾å
¥åä½" /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="matterVersion"> |
| | | <el-input v-model="form.matterVersion" placeholder="请è¾å
¥çæ¬" /> |
| | | </el-form-item> |
| | | <el-form-item label="å¤æ³¨" prop="remarks"> |
| | | <el-input v-model="form.remarks" placeholder="请è¾å
¥å¤æ³¨" /> |
| | | </el-form-item> |
| | | <el-form-item label="å建ç¨æ·" prop="createUser"> |
| | | <el-input v-model="form.createUser" placeholder="请è¾å
¥å建ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ¹ç¨æ·" prop="updateUser"> |
| | | <el-input v-model="form.updateUser" placeholder="请è¾å
¥æ´æ¹ç¨æ·" /> |
| | | </el-form-item> |
| | | <el-form-item label="ERPè§æ ¼" prop="erpSpec"> |
| | | <el-input v-model="form.erpSpec" placeholder="请è¾å
¥ERPè§æ ¼" /> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æ¥æº" prop="dataSource"> |
| | | <el-input v-model="form.dataSource" placeholder="请è¾å
¥æ°æ®æ¥æº" /> |
| | | </el-form-item> |
| | | <el-form-item label="çæ¬" prop="version"> |
| | | <el-input v-model="form.version" placeholder="请è¾å
¥çæ¬" /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-radio-group v-model="form.status"> |
| | | <!-- <el-radio |
| | | v-for="dict in dict.type.${dictType}" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio>--> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="åå" prop="supplier"> |
| | | <el-input v-model="form.supplier" placeholder="请è¾å
¥åå" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { listMaterial, getMaterial, delMaterial, addMaterial, updateMaterial } from "@/api/main/bs/material/material"; |
| | | |
| | | export default { |
| | | name: "Material", |
| | | data() { |
| | | return { |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // éä¸æ°ç» |
| | | ids: [], |
| | | // éå个ç¦ç¨ |
| | | single: true, |
| | | // éå¤ä¸ªç¦ç¨ |
| | | multiple: true, |
| | | // æ¾ç¤ºæç´¢æ¡ä»¶ |
| | | showSearch: true, |
| | | // æ»æ¡æ° |
| | | total: 0, |
| | | // ç©æä¿¡æ¯è¡¨æ ¼æ°æ® |
| | | materialList: [], |
| | | // å¼¹åºå±æ é¢ |
| | | title: "", |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå± |
| | | open: false, |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | materialCode: null, |
| | | materialName: null, |
| | | materialView: null, |
| | | typeZ: null, |
| | | typeL: null, |
| | | unit: null, |
| | | matterVersion: null, |
| | | remarks: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | erpSpec: null, |
| | | dataSource: null, |
| | | version: null, |
| | | status: null, |
| | | supplier: null |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // 表åæ ¡éª |
| | | rules: { |
| | | id: [ |
| | | { required: true, message: "主é®idä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ], |
| | | } |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | /** æ¥è¯¢ç©æä¿¡æ¯å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listMaterial(this.queryParams).then(response => { |
| | | this.materialList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | // åæ¶æé® |
| | | cancel() { |
| | | this.open = false; |
| | | this.reset(); |
| | | }, |
| | | // 表åéç½® |
| | | reset() { |
| | | this.form = { |
| | | id: null, |
| | | materialCode: null, |
| | | materialName: null, |
| | | materialView: null, |
| | | typeZ: null, |
| | | typeL: null, |
| | | unit: null, |
| | | matterVersion: null, |
| | | remarks: null, |
| | | createUser: null, |
| | | createTime: null, |
| | | updateUser: null, |
| | | updateTime: null, |
| | | erpSpec: null, |
| | | dataSource: null, |
| | | version: null, |
| | | status: null, |
| | | supplier: null |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | | handleQuery() { |
| | | this.queryParams.pageNum = 1; |
| | | this.getList(); |
| | | }, |
| | | /** éç½®æé®æä½ */ |
| | | resetQuery() { |
| | | this.resetForm("queryForm"); |
| | | this.handleQuery(); |
| | | }, |
| | | // å¤éæ¡éä¸æ°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.id) |
| | | this.single = selection.length!==1 |
| | | this.multiple = !selection.length |
| | | }, |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | this.title = "æ·»å ç©æä¿¡æ¯"; |
| | | }, |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids |
| | | getMaterial(id).then(response => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹ç©æä¿¡æ¯"; |
| | | }); |
| | | }, |
| | | /** æ交æé® */ |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateMaterial(this.form).then(response => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addMaterial(this.form).then(response => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤ç©æä¿¡æ¯ç¼å·ä¸º"' + ids + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | return delMaterial(ids); |
| | | }).then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å é¤æå"); |
| | | }).catch(() => {}); |
| | | }, |
| | | /** 导åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('bs/material/export', { |
| | | ...this.queryParams |
| | | }, `material_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | this.$modal.msgSuccess("æåçæå°èªå®ä¹è·¯å¾ï¼" + row.genPath); |
| | | }); |
| | | } else { |
| | | this.$download.zip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip"); |
| | | this.$download.zip("/tool/gen/batchGenCode?tables=" + tableNames, "JCDM.zip"); |
| | | } |
| | | }, |
| | | /** åæ¥æ°æ®åºæä½ */ |
| | |
| | | open: true, |
| | | proxy: { |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | target: `http://localhost:8080`, |
| | | target: `http://localhost:8081`, |
| | | changeOrigin: true, |
| | | pathRewrite: { |
| | | ['^' + process.env.VUE_APP_BASE_API]: '' |