Преглед изворни кода

Merge remote-tracking branch 'origin/master'

yusm пре 1 година
родитељ
комит
f98a3dfe7a

+ 55 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/EstimateTimeSettingController.java

@@ -0,0 +1,55 @@
+package com.management.platform.controller;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.EstimateTimeSettingMapper;
+import com.management.platform.util.HttpRespMsg;
+import com.management.platform.util.MessageUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-11-19
+ */
+@RestController
+@RequestMapping("/estimate-time-setting")
+public class EstimateTimeSettingController {
+
+    @Resource
+    private EstimateTimeSettingMapper estimateTimeSettingMapper;
+
+    @RequestMapping("/get")
+    public HttpRespMsg get(Integer companyId) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        EstimateTimeSetting estimateTimeSetting = estimateTimeSettingMapper.selectById(companyId);
+        if (estimateTimeSetting == null) {
+            estimateTimeSetting = new EstimateTimeSetting();
+            estimateTimeSetting.setCompanyId(companyId);
+            estimateTimeSettingMapper.insert(estimateTimeSetting);
+            estimateTimeSetting = estimateTimeSettingMapper.selectById(companyId);
+        }
+        httpRespMsg.data = estimateTimeSetting;
+        return httpRespMsg;
+    }
+
+    @RequestMapping("/save")
+    public HttpRespMsg save(EstimateTimeSetting record) {
+        Boolean success = estimateTimeSettingMapper.updateById(record) > 0;
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        if (!success) {
+            httpRespMsg.setError(MessageUtils.message("other.saveError"));
+        }
+        return httpRespMsg;
+    }
+}
+

+ 68 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/EstimateTimeSetting.java

@@ -0,0 +1,68 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class EstimateTimeSetting extends Model<EstimateTimeSetting> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 公司id
+     */
+    @TableId("company_id")
+    private Integer companyId;
+
+    /**
+     * 项目人天填写要求:0-非必填,1-工时系统必填,同步的非必填,2-全部必填
+     */
+    @TableField("project_man_day_fill_mode")
+    private Integer projectManDayFillMode;
+
+    /**
+     * 项目剩余工时低于xx%时开始提示
+     */
+    @TableField("project_warning_percent")
+    private Integer projectWarningPercent;
+
+    /**
+     * 项目预估工时不足时是否禁止填报
+     */
+    @TableField("project_fronze_on_lack")
+    private Integer projectFronzeOnLack;
+
+    /**
+     * 分组剩余工时低于xx%时开始提示
+     */
+    @TableField("group_warning_percent")
+    private Integer groupWarningPercent;
+
+    /**
+     * 分组预估工时不足时是否禁止填报
+     */
+    @TableField("group_fronze_on_lack")
+    private Integer groupFronzeOnLack;
+
+
+    @Override
+    protected Serializable pkVal() {
+        return this.companyId;
+    }
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/EstimateTimeSettingMapper.java

@@ -0,0 +1,16 @@
+package com.management.platform.mapper;
+
+import com.management.platform.entity.EstimateTimeSetting;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-11-19
+ */
+public interface EstimateTimeSettingMapper extends BaseMapper<EstimateTimeSetting> {
+
+}

+ 16 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/EstimateTimeSettingService.java

@@ -0,0 +1,16 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.EstimateTimeSetting;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-11-19
+ */
+public interface EstimateTimeSettingService extends IService<EstimateTimeSetting> {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/EstimateTimeSettingServiceImpl.java

@@ -0,0 +1,20 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.EstimateTimeSetting;
+import com.management.platform.mapper.EstimateTimeSettingMapper;
+import com.management.platform.service.EstimateTimeSettingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author Seyason
+ * @since 2023-11-19
+ */
+@Service
+public class EstimateTimeSettingServiceImpl extends ServiceImpl<EstimateTimeSettingMapper, EstimateTimeSetting> implements EstimateTimeSettingService {
+
+}

+ 20 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/EstimateTimeSettingMapper.xml

@@ -0,0 +1,20 @@
+<?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.management.platform.mapper.EstimateTimeSettingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.EstimateTimeSetting">
+        <id column="company_id" property="companyId" />
+        <result column="project_man_day_fill_mode" property="projectManDayFillMode" />
+        <result column="project_warning_percent" property="projectWarningPercent" />
+        <result column="project_fronze_on_lack" property="projectFronzeOnLack" />
+        <result column="group_warning_percent" property="groupWarningPercent" />
+        <result column="group_fronze_on_lack" property="groupFronzeOnLack" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        company_id, project_man_day_fill_mode, project_warning_percent, project_fronze_on_lack, group_warning_percent, group_fronze_on_lack
+    </sql>
+
+</mapper>

Разлика између датотеке није приказан због своје велике величине
+ 1739 - 1596
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue