Browse Source

考勤情况增加单位简称

yangyue 1 year ago
parent
commit
1ce4777222

+ 1 - 0
duty-service/src/main/java/cn/com/taiji/duty/controller/DutyDailyReportRecordController.java

@@ -112,6 +112,7 @@ public class DutyDailyReportRecordController {
         dailyReportRecord.setUnitId(account.getDutyUnit().getId());
         dailyReportRecord.setSeatSerialNumber(account.getDutyUnit().getSerialNumber());
         dailyReportRecord.setUnitName(account.getDutyUnit().getName());
+        dailyReportRecord.setUnitAbbreviation(account.getDutyUnit().getAbbreviation());
         dailyReportRecord.setDeptId(account.getDept().getId());
         dailyReportRecord.setSubmitTime(new Date());
         boolean save = dailyReportRecordService.saveDailyReport(dailyReportRecord);

+ 1 - 0
duty-service/src/main/java/cn/com/taiji/duty/controller/DutySignInRecordController.java

@@ -150,6 +150,7 @@ public class DutySignInRecordController {
         signInRecord.setUnitId(account.getDutyUnit().getId());
         signInRecord.setSeatSerialNumber(account.getDutyUnit().getSerialNumber());
         signInRecord.setUnitName(account.getDutyUnit().getName());
+        signInRecord.setUnitAbbreviation(account.getDutyUnit().getAbbreviation());
         signInRecord.setDeptId(account.getDept().getId());
         signInRecord.setTime(new Date());
         AjaxResult ajaxResult;

+ 1 - 0
duty-service/src/main/java/cn/com/taiji/duty/controller/DutyWeekReportRecordController.java

@@ -119,6 +119,7 @@ public class DutyWeekReportRecordController {
         weekReportRecord.setUnitId(account.getDutyUnit().getId());
         weekReportRecord.setSeatSerialNumber(account.getDutyUnit().getSerialNumber());
         weekReportRecord.setUnitName(account.getDutyUnit().getName());
+        weekReportRecord.setUnitAbbreviation(account.getDutyUnit().getAbbreviation());
         weekReportRecord.setDeptId(account.getDept().getId());
         weekReportRecord.setSubmitTime(new Date());
         boolean save = weekReportRecordService.saveWeekReport(weekReportRecord);

+ 6 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/AdminCheck.java

@@ -1,5 +1,7 @@
 package cn.com.taiji.duty.model;
 
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -19,6 +21,10 @@ public class AdminCheck implements Serializable {
 	@ApiModelProperty("部门名称")
 	private String name;
 
+	/** 简称 */
+	@ApiModelProperty("简称")
+	private String abbreviation;
+
 	@ApiModelProperty("数量")
 	private String number;
 

+ 5 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/DutyDailyReportRecord.java

@@ -52,6 +52,11 @@ public class DutyDailyReportRecord implements Serializable {
 	@TableField("unit_name")
 	private String unitName;
 
+	/** 简称 */
+	@ApiModelProperty("简称")
+	@TableField("unit_abbreviation")
+	private String unitAbbreviation;
+
 	/** 账号ID */
 	@ApiModelProperty("账号ID")
 	@TableField("account_id")

+ 4 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/DutyDailyReportRecordVo.java

@@ -42,6 +42,10 @@ public class DutyDailyReportRecordVo implements Serializable {
 	@ApiModelProperty("单位名称")
 	private String unitName;
 
+	/** 简称 */
+	@ApiModelProperty("简称")
+	private String unitAbbreviation;
+
 	/** 提交人 */
 	@ApiModelProperty("提交人")
 	private String submitter;

+ 6 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/DutySignInRecord.java

@@ -56,6 +56,12 @@ public class DutySignInRecord implements Serializable {
 	@TableField("unit_name")
 	private String unitName;
 
+	/** 简称 */
+	@ExcelIgnore
+	@ApiModelProperty("简称")
+	@TableField("unit_abbreviation")
+	private String unitAbbreviation;
+
 	/** 账号ID */
 	@ExcelIgnore
 	@ApiModelProperty("账号ID")

+ 4 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/DutySignInRecordVo.java

@@ -42,6 +42,10 @@ public class DutySignInRecordVo implements Serializable {
 	@ApiModelProperty("单位名称")
 	private String unitName;
 
+	/** 简称 */
+	@ApiModelProperty("简称")
+	private String unitAbbreviation;
+
 	/** 账号ID */
 	@ApiModelProperty("账号ID")
 	private Long accountId;

+ 5 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/DutyWeekReportRecord.java

@@ -51,6 +51,11 @@ public class DutyWeekReportRecord implements Serializable {
 	@TableField("unit_name")
 	private String unitName;
 
+	/** 简称 */
+	@ApiModelProperty("简称")
+	@TableField("unit_abbreviation")
+	private String unitAbbreviation;
+
 	/** 账号ID */
 	@ApiModelProperty("账号ID")
 	@TableField("account_id")

+ 4 - 0
duty-service/src/main/java/cn/com/taiji/duty/model/DutyWeekReportRecordVo.java

@@ -42,6 +42,10 @@ public class DutyWeekReportRecordVo implements Serializable {
 	@ApiModelProperty("单位名称")
 	private String unitName;
 
+	/** 简称 */
+	@ApiModelProperty("简称")
+	private String unitAbbreviation;
+
 	/** 提交人 */
 	@ApiModelProperty("提交人")
 	private String submitter;

+ 3 - 0
duty-service/src/main/java/cn/com/taiji/duty/task/TimeTask.java

@@ -72,6 +72,7 @@ public class TimeTask {
             DutySignInRecord sign = new DutySignInRecord();
             sign.setDeptId(dutyUnit.getDeptId());
             sign.setUnitName(dutyUnit.getName());
+            sign.setUnitAbbreviation(dutyUnit.getAbbreviation());
             sign.setTime(date);
             sign.setType("1");
             sign.setStatus("0");
@@ -83,6 +84,7 @@ public class TimeTask {
             DutySignInRecord sign = new DutySignInRecord();
             sign.setDeptId(dutyUnit.getDeptId());
             sign.setUnitName(dutyUnit.getName());
+            sign.setUnitAbbreviation(dutyUnit.getAbbreviation());
             sign.setTime(date);
             sign.setType("2");
             sign.setStatus("0");
@@ -112,6 +114,7 @@ public class TimeTask {
         //     DutySignInRecord sign = new DutySignInRecord();
         //     sign.setDeptId(dutyUnit.getDeptId());
         //     sign.setUnitName(dutyUnit.getName());
+        //     sign.setUnitAbbreviation(dutyUnit.getAbbreviation());
         //     sign.setTime(date);
         //     sign.setType("2");
         //     sign.setStatus("0");

+ 3 - 0
duty-service/src/main/resources/mapper/DutyDailyReportRecordMapper.xml

@@ -62,6 +62,9 @@
                 <if test="vo.unitName != null and vo.unitName != ''">
                     and unit_name like concat('%', #{vo.unitName}, '%')
                 </if>
+                <if test="vo.unitAbbreviation != null and vo.unitAbbreviation != ''">
+                    and unit_abbreviation like concat('%', #{vo.unitAbbreviation}, '%')
+                </if>
                 <if test="vo.submitter != null and vo.submitter != ''">
                     and submitter like concat('%', #{vo.submitter}, '%')
                 </if>

+ 8 - 5
duty-service/src/main/resources/mapper/DutySignInRecordMapper.xml

@@ -40,6 +40,9 @@
                 <if test="vo.unitName != null and vo.unitName != ''">
                     and unit_name like concat('%', #{vo.unitName}, '%')
                 </if>
+                <if test="vo.unitAbbreviation != null and vo.unitAbbreviation != ''">
+                    and unit_abbreviation like concat('%', #{vo.unitAbbreviation}, '%')
+                </if>
                 <if test="vo.dutyPerson != null and vo.dutyPerson != ''">
                     and duty_person like concat('%', #{vo.dutyPerson}, '%')
                 </if>
@@ -136,9 +139,9 @@
         </if>
     </select>
     <select id="queryAdminCheck" resultType="AdminCheck">
-        select t.unit_name as name,'缺勤' as status,COUNT(1) as number
+        select t.unit_name as name,t.unit_abbreviation as abbreviation,'缺勤' as status,COUNT(1) as number
         from (
-                 select unit_name,DATE_FORMAT(time,'%Y-%m-%d'),dept_id,count(*) as num from duty_sign_in_record
+                 select unit_name,unit_abbreviation,DATE_FORMAT(time,'%Y-%m-%d'),dept_id,count(*) as num from duty_sign_in_record
                  where `status` = '4'
                     <if test="startTime != null and endTime != null">
                         and (DATE_FORMAT(time,'%Y-%m-%d') between #{startTime} and #{endTime})
@@ -148,9 +151,9 @@
              ) t
         GROUP BY t.dept_id
         UNION
-        select t.unit_name as name,'缺卡' as status,COUNT(1) as number
+        select t.unit_name as name,t.unit_abbreviation as abbreviation,'缺卡' as status,COUNT(1) as number
         from (
-                 select unit_name,DATE_FORMAT(time,'%Y-%m-%d'),dept_id,count(*) as num from duty_sign_in_record
+                 select unit_name,unit_abbreviation,DATE_FORMAT(time,'%Y-%m-%d'),dept_id,count(*) as num from duty_sign_in_record
                  where `status` = '4'
                     <if test="startTime != null and endTime != null">
                         and (DATE_FORMAT(time,'%Y-%m-%d') between #{startTime} and #{endTime})
@@ -160,7 +163,7 @@
              ) t
         GROUP BY t.dept_id
         UNION
-        select unit_name as name,(select dict_label from duty_dict_data where dict_type = 'sign_status' and dict_value = `status`) as status,count(*) as number
+        select unit_name as name,unit_abbreviation as abbreviation,(select dict_label from duty_dict_data where dict_type = 'sign_status' and dict_value = `status`) as status,count(*) as number
         from duty_sign_in_record
         where `status` != '4'
         <if test="startTime != null and endTime != null">

+ 3 - 0
duty-service/src/main/resources/mapper/DutyWeekReportRecordMapper.xml

@@ -63,6 +63,9 @@
                 <if test="vo.unitName != null and vo.unitName != ''">
                     and unit_name like concat('%', #{vo.unitName}, '%')
                 </if>
+                <if test="vo.unitAbbreviation != null and vo.unitAbbreviation != ''">
+                    and unit_abbreviation like concat('%', #{vo.unitAbbreviation}, '%')
+                </if>
                 <if test="vo.submitter != null and vo.submitter != ''">
                     and submitter like concat('%', #{vo.submitter}, '%')
                 </if>