Browse Source

Merge branch 'master' of http://39.98.153.250:9080/bowintek/EmploymentSite

pengjing 10 months ago
parent
commit
6250af7793

+ 6 - 4
doc/就业驿站管理系统.pdb

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<?PowerDesigner AppLocale="UTF16" ID="{2D964471-9870-48BE-90E9-524D40D03B42}" Label="" LastModificationDate="1714959146" Name="就业驿站管理系统" Objects="579" Symbols="48" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.0.0.3514"?>
+<?PowerDesigner AppLocale="UTF16" ID="{2D964471-9870-48BE-90E9-524D40D03B42}" Label="" LastModificationDate="1715052985" Name="就业驿站管理系统" Objects="568" Symbols="48" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.0.0.3514"?>
 <!-- do not edit this file -->
 
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -4694,7 +4694,7 @@ Reference.ParentRole 1</a:SymbolContent>
 <o:ReferenceSymbol Id="o53">
 <a:CreationDate>1701934197</a:CreationDate>
 <a:ModificationDate>1701934341</a:ModificationDate>
-<a:Rect>((-121277,70117), (-86530,74445))</a:Rect>
+<a:Rect>((-121277,70117), (-86530,74446))</a:Rect>
 <a:ListOfPoints>((-120877,73349),(-89530,73349),(-89530,70517))</a:ListOfPoints>
 <a:CornerStyle>2</a:CornerStyle>
 <a:ArrowStyle>1</a:ArrowStyle>
@@ -8241,9 +8241,11 @@ LABL 0 Arial,8,N</a:FontList>
 <a:Code>WorkYear</a:Code>
 <a:CreationDate>1700726393</a:CreationDate>
 <a:Creator>bowinuser</a:Creator>
-<a:ModificationDate>1701231590</a:ModificationDate>
+<a:ModificationDate>1715052985</a:ModificationDate>
 <a:Modifier>bowinuser</a:Modifier>
-<a:DataType>int</a:DataType>
+<a:DataType>decimal(18,2)</a:DataType>
+<a:Length>18</a:Length>
+<a:Precision>2</a:Precision>
 </o:Column>
 <o:Column Id="o338">
 <a:ObjectID>D65E7851-2F97-4846-88E7-862E6EA3699D</a:ObjectID>

File diff suppressed because it is too large
+ 438 - 427
doc/就业驿站管理系统.pdm


+ 3 - 1
doc/待更新脚本

@@ -16,4 +16,6 @@ update sys_menu set ViewPath = 'views/workLog/edit'  where MenuNo='T01040203';
 update sys_menu set ViewPath = 'views/workLog/detail'  where MenuNo='T01040205';
 
 update sys_menu set OrderNo = '7' where MenuNo='T0105';
-update sys_menu set OrderNo = '8' where MenuNo='T0106';
+update sys_menu set OrderNo = '8' where MenuNo='T0106';
+--2024-5-8 工作日志表添加驿站ID
+ALTER TABLE `employmentsitedb`.`pc_dowork` ADD COLUMN `SiteID` VARCHAR ( 50 ) NULL AFTER `WorkTime`;

+ 2 - 1
src/main/java/com/hz/employmentsite/controller/taskAndLog/DoWorkController.java

@@ -70,7 +70,7 @@ public class DoWorkController {
             if (curSiteUserInfo != null) {
                 data.siteUserID = curSiteUserInfo.getSiteUserID();
                 data.userId = curSiteUserInfo.getUserID();
-                // 查询提交用户的所属驿站,获取区县与街道编码
+                // 查询提交用户的所属驿站,获取ID、区县与街道编码
                 PcSiteExample siteExample = new PcSiteExample();
                 PcSiteExample.Criteria siteExampleCriteria = siteExample.createCriteria();
                 siteExampleCriteria.andSiteIDEqualTo(curSiteUserInfo.getSiteID());
@@ -78,6 +78,7 @@ public class DoWorkController {
                 if (pcSites != null) {
                     data.setRegionCode(pcSites.getRegionCode());
                     data.setStreetCode(pcSites.getStreetCode());
+                    data.setSiteID(pcSites.getSiteID());
                 }
             }
         }

+ 10 - 0
src/main/java/com/hz/employmentsite/model/PcDowork.java

@@ -25,6 +25,8 @@ public class PcDowork {
 
     private Date workTime;
 
+    private String siteID;
+
     public String getDoworkID() {
         return doworkID;
     }
@@ -112,4 +114,12 @@ public class PcDowork {
     public void setWorkTime(Date workTime) {
         this.workTime = workTime;
     }
+
+    public String getSiteID() {
+        return siteID;
+    }
+
+    public void setSiteID(String siteID) {
+        this.siteID = siteID;
+    }
 }

+ 2 - 0
src/main/java/com/hz/employmentsite/services/impl/taskAndLog/DoWorkImpl.java

@@ -67,6 +67,7 @@ public class DoWorkImpl implements DoWorkService {
             dbData.setRegionCode(data.getRegionCode());
             dbData.setStreetCode(data.getStreetCode());
             dbData.setWorkTime(data.getWorkTime());
+            dbData.setSiteID(data.getSiteID());
             dbData.setCreateUserID(userId);
             dbData.setCreateTime(new Date());
             result = pcDoworkMapper.insert(dbData);
@@ -79,6 +80,7 @@ public class DoWorkImpl implements DoWorkService {
             dbData.setRegionCode(data.regionCode);
             dbData.setStreetCode(data.streetCode);
             dbData.setWorkTime(data.workTime);
+            dbData.setSiteID(data.siteID);
             dbData.setModifyUserID(userId);
             dbData.setModifyTime(new Date());
             result = pcDoworkMapper.updateByPrimaryKey(dbData);

+ 2 - 2
src/main/java/com/hz/employmentsite/vo/taskAndLog/DoWorkVo.java

@@ -42,8 +42,8 @@ public class DoWorkVo {
     public Integer RecordsJobuserNum;
 
     @SiteID
-    private String siteID;
-    private String siteName;
+    public String siteID;
+    public String siteName;
     @InstitutionID
     public String institutionID;
 }

+ 44 - 29
src/main/resources/mapping/PcDoworkMapper.xml

@@ -13,6 +13,7 @@
     <result column="RegionCode" jdbcType="VARCHAR" property="regionCode" />
     <result column="StreetCode" jdbcType="VARCHAR" property="streetCode" />
     <result column="WorkTime" jdbcType="TIMESTAMP" property="workTime" />
+    <result column="SiteID" jdbcType="VARCHAR" property="siteID"/>
   </resultMap>
 
   <resultMap id="RecordsCountMap" type="com.hz.employmentsite.vo.taskAndLog.RecordsCountVo">
@@ -81,7 +82,7 @@
   </sql>
   <sql id="Base_Column_List">
     DoworkID, SiteUserID, DoTypeID, WorkContent, CreateUserID, CreateTime, ModifyUserID, 
-    ModifyTime, RegionCode, StreetCode, WorkTime
+    ModifyTime, RegionCode, StreetCode, WorkTime, SiteID
   </sql>
   <select id="selectByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample" resultMap="BaseResultMap">
     select
@@ -114,14 +115,14 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.hz.employmentsite.model.PcDowork">
-    insert into pc_dowork (DoworkID, SiteUserID, DoTypeID, 
-      WorkContent, CreateUserID, CreateTime, 
-      ModifyUserID, ModifyTime, RegionCode, 
-      StreetCode, WorkTime)
-    values (#{doworkID,jdbcType=VARCHAR}, #{siteUserID,jdbcType=VARCHAR}, #{doTypeID,jdbcType=INTEGER}, 
-      #{workContent,jdbcType=VARCHAR}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{regionCode,jdbcType=VARCHAR}, 
-      #{streetCode,jdbcType=VARCHAR}, #{workTime,jdbcType=TIMESTAMP})
+    insert into pc_dowork (DoworkID, SiteUserID, DoTypeID,
+                           WorkContent, CreateUserID, CreateTime,
+                           ModifyUserID, ModifyTime, RegionCode,
+                           StreetCode, WorkTime, SiteID)
+    values (#{doworkID,jdbcType=VARCHAR}, #{siteUserID,jdbcType=VARCHAR}, #{doTypeID,jdbcType=INTEGER},
+            #{workContent,jdbcType=VARCHAR}, #{createUserID,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
+            #{modifyUserID,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{regionCode,jdbcType=VARCHAR},
+            #{streetCode,jdbcType=VARCHAR}, #{workTime,jdbcType=TIMESTAMP}, #{siteID,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.hz.employmentsite.model.PcDowork">
     insert into pc_dowork
@@ -159,6 +160,9 @@
       <if test="workTime != null">
         WorkTime,
       </if>
+      <if test="siteID != null">
+        SiteID,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="doworkID != null">
@@ -194,6 +198,9 @@
       <if test="workTime != null">
         #{workTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="siteID != null">
+        #{siteID,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.hz.employmentsite.model.PcDoworkExample" resultType="java.lang.Long">
@@ -238,6 +245,9 @@
       <if test="row.workTime != null">
         WorkTime = #{row.workTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="row.siteID != null">
+        SiteID = #{row.siteID,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -246,16 +256,17 @@
   <update id="updateByExample" parameterType="map">
     update pc_dowork
     set DoworkID = #{row.doworkID,jdbcType=VARCHAR},
-      SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
-      DoTypeID = #{row.doTypeID,jdbcType=INTEGER},
-      WorkContent = #{row.workContent,jdbcType=VARCHAR},
-      CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
-      CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
-      ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
-      RegionCode = #{row.regionCode,jdbcType=VARCHAR},
-      StreetCode = #{row.streetCode,jdbcType=VARCHAR},
-      WorkTime = #{row.workTime,jdbcType=TIMESTAMP}
+    SiteUserID = #{row.siteUserID,jdbcType=VARCHAR},
+    DoTypeID = #{row.doTypeID,jdbcType=INTEGER},
+    WorkContent = #{row.workContent,jdbcType=VARCHAR},
+    CreateUserID = #{row.createUserID,jdbcType=VARCHAR},
+    CreateTime = #{row.createTime,jdbcType=TIMESTAMP},
+    ModifyUserID = #{row.modifyUserID,jdbcType=VARCHAR},
+    ModifyTime = #{row.modifyTime,jdbcType=TIMESTAMP},
+    RegionCode = #{row.regionCode,jdbcType=VARCHAR},
+    StreetCode = #{row.streetCode,jdbcType=VARCHAR},
+    WorkTime = #{row.workTime,jdbcType=TIMESTAMP},
+    SiteID = #{row.siteID,jdbcType=TIMESTAMP}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -293,21 +304,25 @@
       <if test="workTime != null">
         WorkTime = #{workTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="siteID != null">
+        SiteID = #{siteID,jdbcType=VARCHAR},
+      </if>
     </set>
     where DoworkID = #{doworkID,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKey" parameterType="com.hz.employmentsite.model.PcDowork">
     update pc_dowork
-    set SiteUserID = #{siteUserID,jdbcType=VARCHAR},
-      DoTypeID = #{doTypeID,jdbcType=INTEGER},
-      WorkContent = #{workContent,jdbcType=VARCHAR},
-      CreateUserID = #{createUserID,jdbcType=VARCHAR},
-      CreateTime = #{createTime,jdbcType=TIMESTAMP},
-      ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
-      ModifyTime = #{modifyTime,jdbcType=TIMESTAMP},
-      RegionCode = #{regionCode,jdbcType=VARCHAR},
-      StreetCode = #{streetCode,jdbcType=VARCHAR},
-      WorkTime = #{workTime,jdbcType=TIMESTAMP}
+    set SiteUserID   = #{siteUserID,jdbcType=VARCHAR},
+        DoTypeID     = #{doTypeID,jdbcType=INTEGER},
+        WorkContent  = #{workContent,jdbcType=VARCHAR},
+        CreateUserID = #{createUserID,jdbcType=VARCHAR},
+        CreateTime   = #{createTime,jdbcType=TIMESTAMP},
+        ModifyUserID = #{modifyUserID,jdbcType=VARCHAR},
+        ModifyTime   = #{modifyTime,jdbcType=TIMESTAMP},
+        RegionCode   = #{regionCode,jdbcType=VARCHAR},
+        StreetCode   = #{streetCode,jdbcType=VARCHAR},
+        WorkTime     = #{workTime,jdbcType=TIMESTAMP},
+        SiteID       = #{siteID,jdbcType=VARCHAR}
     where DoworkID = #{doworkID,jdbcType=VARCHAR}
   </update>
 

+ 2 - 2
src/main/resources/mapping/cquery/DoWorkCQuery.xml

@@ -14,14 +14,14 @@
         SELECT COUNT(jobuser.JobuserID) FROM pc_jobuser jobuser WHERE jobuser.CreateUserID = siteUser.UserId AND
         DATE(jobuser.CreateTime) = DATE(workLog.WorkTime)
         ) AS RecordsJobuserNum
-        ,site.SiteID as siteID,inSites.InstitutionID as institutionID
+        ,inSites.InstitutionID as institutionID
         from pc_dowork workLog
         left join (select * from sys_dictionary_item where DictionaryCode ='LogType' ) dic_logType on workLog.doTypeID =
         dic_logType.Value
         left join area_code region on workLog.RegionCode = region.code
         left join area_code street on workLog.StreetCode = street.code
         left join pc_site_user siteUser on workLog.SiteUserID = siteUser.SiteUserID
-        left join pc_site site on siteUser.siteID = site.siteID
+        left join pc_site site on workLog.siteID = site.siteID
         left join pc_site_institution inSites on site.SiteID = inSites.SiteID
         left join pc_institution institution on inSites.institutionID = institution.InstitutionID
         left join sys_user modifyUser on workLog.ModifyUserID = modifyUser.UserID

+ 3 - 3
vue/src/views/taskAndLog/dotask/edit.vue

@@ -294,9 +294,9 @@ export default defineComponent(
       }
 
       const onClose = (reload: any) => {
-        tabsViewStore.closeCurrentTabByPath('/taskAndLog/dotask/add');
-        tabsViewStore.closeCurrentTabByPath('/taskAndLog/dotask/edit');
-        tabsViewStore.openTab('/taskAndLog/dotask/index', {reload: reload});
+        tabsViewStore.closeCurrentTabByPath('/workTask/add');
+        tabsViewStore.closeCurrentTabByPath('/workTask/edit');
+        tabsViewStore.openTab('/workTask/index', {reload: reload});
       };
 
       const onFinish = () => {

+ 28 - 4
vue/src/views/taskAndLog/dowork/edit.vue

@@ -48,6 +48,21 @@
           </a-form-item>
         </a-col>
         <a-col :span="8">
+          <a-form-item
+            label="所属驿站"
+            :label-col="{ span: 7 }"
+            name="siteID"
+            :rules="[{ required: true, message: '请选择所属驿站!' }]"
+          >
+            <a-select
+              ref="select"
+              v-model:value="dataModel.siteID"
+              :options="siteList"
+              :disabled="userInfo.userTypeID == 3"
+              :field-names="{ label: 'siteName', value: 'siteID' }"
+            >
+            </a-select>
+          </a-form-item>
         </a-col>
       </a-row>
       <a-row>
@@ -80,6 +95,7 @@ import {getSysDictionaryList} from "@/api/system/dictionary";
 import {getRegionCodeList, getStreetCodeList} from "@/api/system/area/index";
 import {getSiteUserDataList} from "@/api/baseSettings/userInfo";
 import {useUserStore} from "@/store/modules/user";
+import {getSiteList} from "@/api/baseSettings/siteInfo";
 
 interface InstitutionModel {
   dataModel: any;
@@ -109,6 +125,7 @@ export default defineComponent({
     const streetList = ref<SelectProps['options']>();
     const logTypeList = ref<SelectProps["options"]>();
     const siteUserList = ref<SelectProps["options"]>();
+    const siteList = ref<any>([]);
     const recordsCount = reactive({
       RecordsCompanyNum:null,
       RecordsJobuserNum:null,
@@ -141,11 +158,17 @@ export default defineComponent({
       const logTypeResult :any = await getSysDictionaryList("LogType");
       logTypeList.value = logTypeResult;
     }
+    const getAllSites = () => {
+      getSiteList({pageIndex: 1, pageSize: 9999}).then((result: any) => {
+        siteList.value = result.list;
+      })
+    }
 
     const loadData = (doWorkID: string) => {
       getRegionList();
       getLogTypeList();
       getSiteUserList();
+      getAllSites();
       get(doWorkID).then((result: any) => {
         formData.dataModel = result;
         findRecordsCount();
@@ -161,9 +184,9 @@ export default defineComponent({
     };
 
     const onClose = (reload: any) => {
-      tabsViewStore.closeCurrentTabByPath('/taskAndLog/workLog/add');
-      tabsViewStore.closeCurrentTabByPath('/taskAndLog/workLog/edit');
-      tabsViewStore.openTab('/taskAndLog/workLog/index',{reload:reload});
+      tabsViewStore.closeCurrentTabByPath('/workLog/add');
+      tabsViewStore.closeCurrentTabByPath('/workLog/edit');
+      tabsViewStore.openTab('/workLog/index', {reload: reload});
     };
 
     const onFinish = () => {
@@ -229,7 +252,8 @@ export default defineComponent({
       recordsCount,
       siteUserChange,
       workTimeChange,
-      userInfo
+      userInfo,
+      siteList
     };
   },
   created() {